-
-
Notifications
You must be signed in to change notification settings - Fork 775
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
feat: add accessor protocol support and refactor stats/base/nanmin
#6211
base: develop
Are you sure you want to change the base?
Conversation
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: passed - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed ---
Coverage Report
The above coverage report was generated for the changes in this PR. |
Hi @kgryte, Please review my PR. thanks |
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed ---
Signed-off-by: Athan <[email protected]>
stats/base/nanmin
stats/base/nanmin
Signed-off-by: Athan <[email protected]>
Signed-off-by: Athan <[email protected]>
x[ i ] = round( (randu()*100.0) - 50.0 ); | ||
} | ||
} | ||
var x = discreteUniform( 10, -50, 50, { |
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.
How you refactored this example does not preserve the original logic. See, e.g., https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/strided/dnanmax#examples
x[ i ] = round( (randu()*100.0) - 50.0 ); | ||
} | ||
} | ||
var x = discreteUniform( 10, -50, 50, { |
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.
Same comment as README.
/** | ||
* Computes the minimum value of a strided array, ignoring `NaN` values. | ||
* | ||
* @param {PositiveInteger} N - number of indexed elements |
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.
* @param {PositiveInteger} N - number of indexed elements | |
* @private | |
* @param {PositiveInteger} N - number of indexed elements |
This function is not part of the package's public API.
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.
Would you mind renaming this file to main.js
and updating index.js
accordingly?
@@ -41,46 +41,8 @@ var isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' ); | |||
* var v = nanmin( N, x, 1 ); |
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.
Let's go ahead and remove L39 and replace N
here with x.length
. The use of N
in this example doesn't really add anything.
@@ -44,33 +46,38 @@ var isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' ); | |||
* var v = nanmin( N, x, 2, 1 ); |
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.
You need to replace usage of floor
in this example.
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.
That may also apply to index.js
.
@@ -21,7 +21,7 @@ | |||
// MODULES // | |||
|
|||
var tape = require( 'tape' ); | |||
var floor = require( '@stdlib/math/base/special/floor' ); | |||
var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' ); | |||
var isnan = require( '@stdlib/math/base/assert/is-nan' ); | |||
var isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' ); | |||
var Float64Array = require( '@stdlib/array/float64' ); |
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.
L28 will need to be updated after renaming nanmin.js
. May apply elsewhere, as well.
Signed-off-by: Athan <[email protected]>
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.
Left an initial round of comments.
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
Hi @kgryte, I have addressed requested changes. |
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes. report:
Resolves #5659 .
Description
This pull request:
lib/accessors.js
file.lib/nanmin.js
andlib/ndarray.js
.Related Issues
This pull request:
stats/base/nanmin
#5659Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers