-
-
Notifications
You must be signed in to change notification settings - Fork 877
docs: improve examples of ndarray/iter
namespace
#1686
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
docs: improve examples of ndarray/iter
namespace
#1686
Conversation
Updated examples to span over the functionalities implemented in the namespace. Addresses: stdlib-js#1589
Hello, thought I should just push a draft PR for one namespace and receive feedback before moving to another in the package in ndarray!
Also, I have these questions:
- Do we include the outputs of the examples as comments for README.md?
- Do we need to format the output in some particular way? That is, in the second example, the log is like: Index: [ 0, 0 ] Value: 1, and for the last one, we print the initial type of the object like: Original ndarray: ndarray( 'generic', [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ], [ 3, 3 ], [ 3, 1 ], 0, 'row-major' ). So, is that necessary or we should just always log the final output?
Thank you so much!!
Update the copyright year Signed-off-by: Rutam <138517416+performant23@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer modifying the existing example code. Project conventions are to not create multiple separate Markdown code blocks. Prefer instead a single Markdown code block with various example usage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ES5.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These examples seem to just be pulling from the READMEs of the child packages. I think we would prefer something fresh, which ideally combines the functionality of multiple packages to demonstrate how they can all work together.
ndarray/iter
namespace (追記ここまで)
Updated example for the namespace using functionalities from stats, random, and ndarray Fixes: stdlib-js#1589
...ndarray/iter_namespace' into docs/improve_README_examples_of_ndarray/iter_namespace
Thank you so much for the review, @kgryte! I have modified the commit to include an example which uses functionalities from other packages! Please do let me know if there are any further changes necessary.
Also, I found that packages followed the convention of including comments below code. Since I was getting the below message, I left a line between the code and the necessary comments. Please do let me know in case we need to include corresponding comments above the code.
Missing empty line before comment stdlib/empty-line-before-comment
..._ndarray/iter_namespace
ndarray/iter
namespace (削除ここまで)ndarray/iter
namespace (追記ここまで)
/stdlib merge
...DME_examples_of_ndarray/iter_namespace
Coverage Report
The above coverage report was generated for the changes in this PR. |
Uh oh!
There was an error while loading. Please reload this page.
Updated examples to span over the functionalities implemented in the namespace.
Resolves #1589
Description
Provide better examples for the namespace to demonstrate its capabilities and usage.
This pull request:
Related Issues
This pull request:
ndarray/iter
namespace #1589Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers