Skip to content

feat: add ndarray/base/nullary-strided1d #7772

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

headlessNode
Copy link
Member


type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes. report:

  • task: lint_filenames status: passed
  • task: lint_editorconfig status: passed
  • task: lint_markdown status: passed
  • task: lint_package_json status: passed
  • task: lint_repl_help status: passed
  • task: lint_javascript_src status: passed
  • task: lint_javascript_cli status: na
  • task: lint_javascript_examples status: passed
  • task: lint_javascript_tests status: passed
  • task: lint_javascript_benchmarks status: na
  • task: lint_python status: na
  • task: lint_r status: na
  • task: lint_c_src status: na
  • task: lint_c_examples status: na
  • task: lint_c_benchmarks status: na
  • task: lint_c_tests_fixtures status: na
  • task: lint_shell status: na
  • task: lint_typescript_declarations status: na
  • task: lint_typescript_tests status: na
  • task: lint_license_headers status: passed ---

Progresses #2656.

Description

What is the purpose of this pull request?

This pull request:

  • add ndarray/base/nullary-strided1d

Related Issues

Does this pull request have any related issues?

This pull request:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.


@stdlib-js/reviewers

---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: passed
  - task: lint_package_json
    status: passed
  - task: lint_repl_help
    status: passed
  - task: lint_javascript_src
    status: passed
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: passed
  - task: lint_javascript_tests
    status: passed
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: na
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
@headlessNode headlessNode added Feature Issue or pull request for adding a new feature. GSoC Google Summer of Code. gsoc: 2025 Google Summer of Code (2025). labels Jul 29, 2025
@stdlib-bot
Copy link
Contributor

stdlib-bot commented Jul 29, 2025

Coverage Report

Package Statements Branches Functions Lines
ndarray/base/nullary-strided1d $\color{red}1884/2748$
$\color{green}+68.56\%$
$\color{red}20/21$
$\color{green}+95.24\%$
$\color{red}2/22$
$\color{green}+9.09\%$
$\color{red}1884/2748$
$\color{green}+68.56\%$

The above coverage report was generated for the changes in this PR.

---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: passed
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: passed
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: passed
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: na
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: passed
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: passed
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: na
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
@headlessNode headlessNode marked this pull request as ready for review July 31, 2025 04:24
@headlessNode headlessNode requested a review from kgryte July 31, 2025 04:24
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Jul 31, 2025

# nullaryStrided1d

> Apply a one-dimensional strided array function to a list of specified dimensions in an input ndarray.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> Apply a one-dimensional strided array function to a list of specified dimensions in an input ndarray.
> Apply a one-dimensional strided array function to a list of specified dimensions in an output ndarray.


#### nullaryStrided1d( fcn, arrays, dims\[, options] )

Applies a one-dimensional strided array function to a list of specified dimensions in an input ndarray.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Applies a one-dimensional strided array function to a list of specified dimensions in an input ndarray.
Applies a one-dimensional strided array function to a list of specified dimensions in an output ndarray.

// Define the index offsets:
var ox = 0;

// Create an input ndarray-like object:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Create an input ndarray-like object:
// Create an output ndarray-like object:


The function accepts the following arguments:

- **fcn**: function which will be applied to a one-dimensional input subarray.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **fcn**: function which will be applied to a one-dimensional input subarray.
- **fcn**: function which will be applied to a one-dimensional output subarray.


where

- **arrays**: array containing a one-dimensional subarray of the input ndarray and any additional ndarray arguments as zero-dimensional ndarrays.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **arrays**: array containing a one-dimensional subarray of the input ndarray and any additional ndarray arguments as zero-dimensional ndarrays.
- **arrays**: array containing a one-dimensional subarray of the output ndarray and any additional ndarray arguments as zero-dimensional ndarrays.

* // Define the index offsets:
* var ox = 0;
*
* // Create an input ndarray-like object:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* // Create an input ndarray-like object:
* // Create an output ndarray-like object:

* }
* ];
*
* // Define an input strategy:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* // Define an input strategy:
* // Define an output strategy:

Comment on lines +37 to +38
* @param {ndarrayLike} x - input ndarray
* @returns {ndarrayLike} input ndarray
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param {ndarrayLike} x - input ndarray
* @returns {ndarrayLike} input ndarray
* @param {ndarrayLike} x - output ndarray
* @returns {ndarrayLike} output ndarray

Comment on lines +188 to +194
* @param {ndarrayLike} x - input ndarray
* @param {string} x.dtype - input ndarray data type
* @param {Collection} x.data - input ndarray data buffer
* @param {NonNegativeIntegerArray} x.shape - input ndarray shape
* @param {IntegerArray} x.strides - input ndarray strides
* @param {NonNegativeInteger} x.offset - input ndarray index offset
* @param {string} x.order - input ndarray memory layout
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param {ndarrayLike} x - input ndarray
* @param {string} x.dtype - input ndarray data type
* @param {Collection} x.data - input ndarray data buffer
* @param {NonNegativeIntegerArray} x.shape - input ndarray shape
* @param {IntegerArray} x.strides - input ndarray strides
* @param {NonNegativeInteger} x.offset - input ndarray index offset
* @param {string} x.order - input ndarray memory layout
* @param {ndarrayLike} x - output ndarray
* @param {string} x.dtype - output ndarray data type
* @param {Collection} x.data - output ndarray data buffer
* @param {NonNegativeIntegerArray} x.shape - output ndarray shape
* @param {IntegerArray} x.strides - output ndarray strides
* @param {NonNegativeInteger} x.offset - output ndarray index offset
* @param {string} x.order - output ndarray memory layout

{
"name": "@stdlib/ndarray/base/nullary-strided1d",
"version": "0.0.0",
"description": "Apply a one-dimensional strided array function to a list of specified dimensions in an input ndarray.",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"description": "Apply a one-dimensional strided array function to a list of specified dimensions in an input ndarray.",
"description": "Apply a one-dimensional strided array function to a list of specified dimensions in an output ndarray.",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Issue or pull request for adding a new feature. GSoC Google Summer of Code. gsoc: 2025 Google Summer of Code (2025). Needs Review A pull request which needs code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants