-
-
Notifications
You must be signed in to change notification settings - Fork 835
feat: add math/base/special/nanmin
#2342
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
Conversation
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.
👋 Hi there! 👋
And thank you for opening your first pull request! We will review it shortly. 🏃 💨
@RidamGarg Are you planning on adding the C implementation to this PR or in a subsequent PR? |
math/base/special/nanmin
@RidamGarg Looks like you'll also need to resolve some CI failures for linting and benchmarks. |
@kgryte I am able to make the changes by cloning the project again. Can you please check once if you can merge PR now? |
@kgryte made the linting changes again & pushed the code. Can You please tell me? How Can I check these linting errors on my system? |
@RidamGarg You'll want to consult the project development guide and leverage various |
Okay @kgryte I'll go through this. Thanks for sharing! |
@kgryte, Can you please check? If we are able to merge the code now once. As I resolved the required eslint issues. So, that after this I can start my work on another issue? |
/stdlib update-copyright-years |
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.
Thanks @RidamGarg for your PR! Looks good overall; left a few suggestions, the main relating to the package description.
lib/node_modules/@stdlib/math/base/special/nanmin/docs/types/index.d.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: Ridam Garg <67867319+RidamGarg@users.noreply.github.com>
@Planeshifter made the required changes |
Signed-off-by: Philipp Burckhardt <pburckhardt@outlook.com>
Thank you for making the changes and your contribution, @RidamGarg. It is much appreciated! |
@RidamGarg Could you please tick the checkbox that you read and accept the contributing guidelines, which is present in the PR template and which I inserted into your opening comment? Will merge your PR afterwards. Thank you! |
Done @Planeshifter |
``` | ||
|
||
|
||
If both argument are `NaN`, the function returns `NaN`. |
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.
If both argument are `NaN`, the function returns `NaN`. | |
If both arguments are `NaN`, the function returns `NaN`. |
var nanmin = require( './../lib' ); | ||
|
||
var m = nanmin( 3.0, 4.0 ); | ||
// returns 3.0 |
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.
We should be logging each return value to the console.
*/ | ||
function nanmin( x, y ) { | ||
if ( isnan( x ) ) { | ||
return ( isnan(y) ) ? NaN : y; |
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.
return ( isnan(y) ) ? NaN : y; | |
return ( isnan( y ) ) ? NaN : y; |
Consistent spacing.
</section> | ||
|
||
<!-- /.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.
This readme is missing various sections (eg, examples, links, etc).
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.
I added the section previously but got this comment from @Planeshifter. We auto-populate these sections from metadata, so this should be left empty. Should I add this in my next PR?
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.
@RidamGarg Sorry if my comment was not fully clear; the suggested change was to remove the inner content of the sections, not remove them altogether.
So
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
<section class="related">
* * *
## See Also
- <span class="package-name">[`@stdlib/math/base/special/max`][@stdlib/math/base/special/max]</span><span class="delimiter">: </span><span class="description">return the maximum value.</span>
- <span class="package-name">[`@stdlib/math/base/special/minabs`][@stdlib/math/base/special/minabs]</span><span class="delimiter">: </span><span class="description">return the minimum absolute value.</span>
- <span class="package-name">[`@stdlib/math/base/special/minn`][@stdlib/math/base/special/minn]</span><span class="delimiter">: </span><span class="description">return the minimum value.</span>
</section>
<!-- /.related -->
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
<section class="links">
<!-- <related-links> -->
[@stdlib/math/base/special/max]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/max
[@stdlib/math/base/special/minabs]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/minabs
[@stdlib/math/base/special/minn]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/minn
<!-- </related-links> -->
</section>
<!-- /.links -->
should have become
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
<section class="related">
</section>
<!-- /.related -->
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
<section class="links">
<!-- <related-links> -->
<!-- </related-links> -->
</section>
<!-- /.links -->
We auto-populate the contents for the related packages, but that will only work if the sections are there.
Notice that the examples section is separate from that. It should contain the example from examples/index.js
file; see other packages for reference.
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.
Ooh, Okay @Planeshifter, Now I got it. Thanks for the clarification.
@RidamGarg You'll want to address the small comments in a follow-up PR. |
PR-URL: stdlib-js#2342 Closes: stdlib-js#2318 --------- Signed-off-by: Ridam Garg <ridamgarg8979@gmail> Signed-off-by: Philipp Burckhardt <pburckhardt@outlook.com> Co-authored-by: RidamGarg <ridamgarg8979@gmail> Co-authored-by: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com> Co-authored-by: Philipp Burckhardt <pburckhardt@outlook.com>
PR-URL: stdlib-js#2342 Closes: stdlib-js#2318 --------- Signed-off-by: Ridam Garg <ridamgarg8979@gmail> Signed-off-by: Philipp Burckhardt <pburckhardt@outlook.com> Co-authored-by: RidamGarg <ridamgarg8979@gmail> Co-authored-by: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com> Co-authored-by: Philipp Burckhardt <pburckhardt@outlook.com>
Added Package
@stdlib/math/base/special/nanmin
.Resolves: #2318
Checklist
@stdlib-js/reviewers