Skip to content

Comments

docs: improve doctests for ndarray instances#9364

Closed
Venkat5599 wants to merge 3 commits intostdlib-js:developfrom
Venkat5599:docs/improve-count-if-doctests
Closed

docs: improve doctests for ndarray instances#9364
Venkat5599 wants to merge 3 commits intostdlib-js:developfrom
Venkat5599:docs/improve-count-if-doctests

Conversation

@Venkat5599
Copy link

@Venkat5599 Venkat5599 commented Dec 25, 2025

Resolves #8850

Description

This pull request improves the JSDoc examples in the ndarray/count-if package by updating doctests to use the new ndarray instance notation format instead of explicit .get() method calls.

Changes made:

  • Updated the JSDoc example in lib/main.js to use // returns <ndarray>[ 5 ] instead of calling .get() and separately showing the returned value
  • This makes the doctest more compact and clearly shows the expected output format

Why this change?
This RFC seeks to leverage recent improvements in the doctest framework which now supports ndarray instance notation. This change makes documentation examples more concise and easier to understand.

Related Issues

This pull request implements improvements requested in:

Questions

No questions for reviewers.

Other

This change follows the exact pattern established in commit 46d9a44 as referenced in the RFC. The modification is minimal, focused, and does not alter any functionality—only documentation clarity.

Checklist

AI Assistance

  • No

This PR was fully authored manually by myself without AI assistance.


@stdlib-js/reviewers

Copilot AI review requested due to automatic review settings December 25, 2025 04:22
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@stdlib-bot stdlib-bot added Needs Review A pull request which needs code review. First-time Contributor A pull request from a contributor who has never previously committed to the project repository. labels Dec 25, 2025
@stdlib-bot
Copy link
Contributor

👋 Hi there! 👋

And thank you for opening your first pull request! We will review it shortly. 🏃 💨

Getting Started

Next Steps

  1. A project maintainer will approve GitHub Actions workflows for your PR.
  2. All CI checks must pass before your submission can be fully reviewed.
  3. You'll need to address any failures in linting or unit tests.

Running Tests Locally

You can use make to run any of the CI commands locally from the root directory of the stdlib repository:

# Run tests for all packages in the math namespace:
make test TESTS_FILTER=".*/@stdlib/math/.*"

# Run benchmarks for a specific package:
make benchmark BENCHMARKS_FILTER=".*/@stdlib/math/base/special/sin/.*"

If you haven't heard back from us within two weeks, please ping us by tagging the "reviewers" team in a comment on this PR.

If you have any further questions while waiting for a response, please join our Zulip community to chat with project maintainers and other community members.

We appreciate your contribution!

Documentation Links

@stdlib-bot
Copy link
Contributor

Coverage Report

Package Statements Branches Functions Lines
ndarray/count-falsy $\color{red}336/439$
$\color{green}+76.54%$
$\color{green}4/4$
$\color{green}+100.00%$
$\color{red}0/3$
$\color{green}+0.00%$
$\color{red}336/439$
$\color{green}+76.54%$
ndarray/count-if $\color{red}360/539$
$\color{green}+66.79%$
$\color{green}4/4$
$\color{green}+100.00%$
$\color{red}0/3$
$\color{green}+0.00%$
$\color{red}360/539$
$\color{green}+66.79%$

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

@kgryte kgryte changed the title docs: improve doctests for ndarray instances in ndarray/count-if docs: improve doctests for ndarray instances in ndarray/count-if Dec 25, 2025
@kgryte kgryte added Documentation Improvements, additions, or changes to documentation. and removed Needs Review A pull request which needs code review. labels Dec 25, 2025
@kgryte kgryte changed the title docs: improve doctests for ndarray instances in ndarray/count-if docs: improve doctests for ndarray instances Dec 25, 2025
@kgryte
Copy link
Member

kgryte commented Dec 25, 2025

/stdlib merge

@stdlib-bot stdlib-bot added the bot: In Progress Pull request is currently awaiting automation. label Dec 25, 2025
@stdlib-bot stdlib-bot removed the bot: In Progress Pull request is currently awaiting automation. label Dec 25, 2025
@kgryte kgryte added the autoclose: Already Resolved Pull request which should be auto-closed due proposed changes duplicating already included changes. label Dec 25, 2025
@stdlib-bot
Copy link
Contributor

Thank you for working on this pull request. However, we cannot accept your contribution as the issue this pull request seeks to resolve has already been addressed in a different pull request or commit.

Thank you again for your interest in stdlib, and we look forward to reviewing your future contributions.

@stdlib-bot stdlib-bot closed this Dec 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autoclose: Already Resolved Pull request which should be auto-closed due proposed changes duplicating already included changes. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants