docs: improve doctests for ndarray instances in ndarray/fill#12248
Conversation
|
Hello! Thank you for your contribution to stdlib. We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:
This acknowledgment confirms that you've read the guidelines, which include:
We can't review or accept contributions without this acknowledgment. Thank you for your understanding and cooperation. We look forward to reviewing your contribution! |
59fc641 to
8f2b477
Compare
Coverage Report
The above coverage report was generated for the changes in this PR. |
|
An automated check found potentially unrelated issue/PR references in this PR:
Why this matters: GitHub automatically closes issues referenced with closing keywords (Resolves, Closes, Fixes) when the PR is merged. Incorrect references can accidentally close unrelated issues. What to do:
This assessment was generated by an AI model and is informational only. Generated by Claude Code |
|
I noticed your PR description contains closing keywords ("Resolves", "Closes", or "Fixes") referencing a "Tracking Issue". Why this matters: Required action: Thank you for your contribution to the project! |
Progresses #9329
Summary
ndarray/fillusage doctest's explicitndarray2arrayconversion with ndarray instance notation.@stdlib/ndarray/to-arrayimport from that doctest.Impact
This keeps the example focused on the returned ndarray while preserving the existing
fillidentity check.Validation
git diff --check- passedNODE_PATH=lib/node_modules node -e "const fill=require('@stdlib/ndarray/fill'); const zeros=require('@stdlib/ndarray/zeros'); const ndarray2array=require('@stdlib/ndarray/to-array'); const x=zeros([3,1,2], {'dtype':'float64'}); const y=fill(x,10.0); if (y !== x) { throw new Error('fill did not return input ndarray'); } const expected=[[[10,10]],[[10,10]],[[10,10]]]; const actual=ndarray2array(x); if (JSON.stringify(actual)!==JSON.stringify(expected)) { throw new Error('unexpected filled values: '+JSON.stringify(actual)); }"- passedChecklist