Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add ndarray/base/shift #8118

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

Merged
kgryte merged 8 commits into stdlib-js:develop from headlessNode:ndarray-base-shift
Sep 25, 2025
Merged

Conversation

Copy link
Member

@headlessNode headlessNode commented Sep 21, 2025


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: passed
  • 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: passed
  • task: lint_typescript_tests status: passed
  • task: lint_license_headers status: passed ---

Resolves stdlib-js/metr-issue-tracker#87.

Description

What is the purpose of this pull request?

This pull request:

  • add ndarray/base/shift

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: passed
 - 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: passed
 - task: lint_typescript_tests
 status: passed
 - task: lint_license_headers
 status: passed
---
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Sep 21, 2025
@headlessNode headlessNode added Feature Issue or pull request for adding a new feature. and removed Needs Review A pull request which needs code review. labels Sep 21, 2025
Signed-off-by: Muhammad Haris <101793258+headlessNode@users.noreply.github.com>
Copy link
Contributor

stdlib-bot commented Sep 21, 2025
edited
Loading

Coverage Report

Package Statements Branches Functions Lines
ndarray/base/shift $\color{green}160/160$
$\color{green}+100.00\%$
$\color{green}7/7$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}160/160$
$\color{green}+100.00\%$

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

Copy link
Member

@kgryte kgryte left a comment

Choose a reason for hiding this comment

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

@headlessNode I ended up making a number of changes in #8108 that we'll want to incorporate in this PR.

One of the biggest changes is the removal of the strict argument, which doesn't make sense for pop and shift. That argument makes sense for the slice* APIs because a user provides one or more slice arguments. And it is those arguments that the strict argument applies to.

Furthermore, I added explicit error handling for dimension normalization. As discussed elsewhere, we already do this in other very similar base APIs (e.g., slice-dimension-to, slice-dimension-from) and there isn't much a reason why pop and shift should deviate.

@kgryte kgryte added Needs Changes Pull request which needs changes before being merged. and removed Needs Review A pull request which needs code review. labels Sep 22, 2025
headlessNode and others added 3 commits September 24, 2025 20:20
---
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: na
 - task: lint_javascript_tests
 status: na
 - task: lint_javascript_benchmarks
 status: passed
 - 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: passed
 - task: lint_typescript_tests
 status: passed
 - 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: na
 - task: lint_package_json
 status: na
 - task: lint_repl_help
 status: na
 - task: lint_javascript_src
 status: na
 - task: lint_javascript_cli
 status: na
 - task: lint_javascript_examples
 status: na
 - 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 Needs Review A pull request which needs code review. and removed Needs Changes Pull request which needs changes before being merged. labels Sep 24, 2025
---
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: 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
---
---
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: na
 - 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: 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
---
---
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: na
 - task: lint_package_json
 status: na
 - task: lint_repl_help
 status: na
 - task: lint_javascript_src
 status: na
 - task: lint_javascript_cli
 status: na
 - task: lint_javascript_examples
 status: na
 - 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
---
@kgryte kgryte removed the Needs Review A pull request which needs code review. label Sep 25, 2025
@kgryte kgryte merged commit 534fbd0 into stdlib-js:develop Sep 25, 2025
14 checks passed
@headlessNode headlessNode deleted the ndarray-base-shift branch September 26, 2025 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@kgryte kgryte kgryte approved these changes

Assignees
No one assigned
Labels
Feature Issue or pull request for adding a new feature.
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

[RFC]: add ndarray/base/shift

AltStyle によって変換されたページ (->オリジナル) /