Skip to content

docs: improve doctests for ndarray instances in ndarray/every - #14179

Merged
kgryte merged 1 commit into
stdlib-js:developfrom
AryanSharma48:docs/ndarray-every-doctests
Aug 12, 2026
Merged

kgryte merged 1 commit into
stdlib-js:developfrom
AryanSharma48:docs/ndarray-every-doctests

Conversation

@AryanSharma48

@AryanSharma48 AryanSharma48 commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Progresses #9329.

Description

What is the purpose of this pull request?

This pull request:

  • Updates the JSDoc examples and REPL documentation in @stdlib/ndarray/every to replace verbose .get() and ndarray2array decomposition logic with the more concise nested ndarray instance notation (e.g., // returns <ndarray>[ ... ]).
  • Removes the ndarray2array import wherever it was only being used for illustrative doctest values.

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

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.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

I used an AI coding assistant to help locate the specific documentation files within @stdlib/ndarray/every and apply the formatting updates to the // returns annotations. However, I manually reviewed all the modifications to ensure strict adherence to the RFC, specifically making sure no executable console.log() examples were altered.


@stdlib-js/reviewers

@AryanSharma48
AryanSharma48 requested a review from a team August 11, 2026 21:38
@stdlib-bot stdlib-bot added First-time Contributor A pull request from a contributor who has never previously committed to the project repository. Needs Review A pull request which needs code review. Good First PR A pull request resolving a Good First Issue. labels Aug 11, 2026
Replaces verbose .get() and ndarray2array element extraction in documentation with nested ndarray instance notation as described in RFC stdlib-js#9329.

Signed-off-by: Aryan Sharma <aryansharma24106@gmail.com>
@AryanSharma48
AryanSharma48 force-pushed the docs/ndarray-every-doctests branch from 214eb2a to 4dce3f3 Compare August 11, 2026 21:44
@kgryte kgryte added Documentation Improvements, additions, or changes to documentation. difficulty: 1 Low degree of difficulty. Should be straightforward to implement and/or resolve. and removed Needs Review A pull request which needs code review. labels Aug 11, 2026

@kgryte kgryte left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

No coverage information available.

@kgryte kgryte changed the title docs: improve doctests for ndarray instances in @stdlib/ndarray/every docs: improve doctests for ndarray instances in ndarray/every Aug 12, 2026
@kgryte
kgryte merged commit 29ec5d9 into stdlib-js:develop Aug 12, 2026
65 checks passed
@kgryte

kgryte commented Aug 12, 2026

Copy link
Copy Markdown
Member

Thank you for your contribution and congratulations on your first PR!

@AryanSharma48

Copy link
Copy Markdown
Contributor Author

Thank you @kgryte! Happy to contribute. Looking forward to opening more PRs!

@AryanSharma48
AryanSharma48 deleted the docs/ndarray-every-doctests branch August 12, 2026 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

difficulty: 1 Low degree of difficulty. Should be straightforward to implement and/or resolve. Documentation Improvements, additions, or changes to documentation. First-time Contributor A pull request from a contributor who has never previously committed to the project repository. Good First PR A pull request resolving a Good First Issue. review: 5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants