Repository navigation
feat: add stats/mskmax - #8917
iampratik13 wants to merge 17 commits into
Conversation
Coverage Report
The above coverage report was generated for the changes in this PR. |
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Pratik <bhagwatpratik781@gmail.com>
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Pratik <bhagwatpratik781@gmail.com>
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Pratik <bhagwatpratik781@gmail.com>
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Pratik <bhagwatpratik781@gmail.com>
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Pratik <bhagwatpratik781@gmail.com>
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Pratik <bhagwatpratik781@gmail.com>
|
@kgryte done with changes. |
| var mdtypes = dtypes( 'mask_index_and_generic' ); | ||
| var odtypes = dtypes( 'real_and_generic' ); | ||
| var policies = { | ||
| 'output': 'same', // note: this is effectively ignored as we always specify the output data type explicitly |
There was a problem hiding this comment.
Per style guide, NOTE annotations are // NOTE: (uppercase). Fix the casing.
| 'output': 'same', // note: this is effectively ignored as we always specify the output data type explicitly | |
| 'output': 'same', // NOTE: this is effectively ignored as we always specify the output data type explicitly |
Generated by Claude Code
| 'float32', | ||
| 'uint8', // smskmax: x, mask | ||
| 'generic', | ||
| 'uint8' // gmskmax: x, mask (note: gmskmax actually expects generic mask, but we convert) |
There was a problem hiding this comment.
Same NOTE casing issue as above.
| 'uint8' // gmskmax: x, mask (note: gmskmax actually expects generic mask, but we convert) | |
| 'uint8' // gmskmax: x, mask (NOTE: gmskmax actually expects generic mask, but we convert) |
Generated by Claude Code
|
|
||
| function badValue( value ) { | ||
| return function badValue() { | ||
| mskmax( value ); |
There was a problem hiding this comment.
Several of the option-validation tests here forget to pass mask, so the call throws on the missing/invalid mask argument before it ever hits the check the test is supposed to cover. mskmax( value ) never reaches the x dtype check because mask is undefined. Same problem at line 136 (mskmax( value, {} )), 195 (dtype option), 228 (keepdims option), 263 (dims type check), and 357 (dims duplicate-index check) — none of those paths are exercised right now. Add a valid mask ndarray to each call.
Generated by Claude Code
|
|
||
| function badValue( value ) { | ||
| return function badValue() { | ||
| mskmax( x, mask, value ); |
There was a problem hiding this comment.
These argument-validation tests are off by one. "second argument is not an ndarray-like object" (and its options variant, line 243) holds mask fixed and valid while varying out — mask's ndarray-like check gets zero coverage. Same bug one level down: "third argument is not an object" (line 283) holds out fixed and valid while varying options — out's check gets zero coverage. Fix each test to vary the argument named in its title.
Generated by Claude Code
---
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_pkg_readmes
status: passed
- task: lint_markdown_docs
status: na
- task: lint_markdown
status: na
- task: lint_package_json
status: passed
- 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: 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: passed
- task: lint_typescript_tests
status: passed
- task: lint_license_headers
status: passed
---
|
@kgryte @Planeshifter Ready for review. Thanks! |
Resolves None
Description
This pull request:
stats/mskmaxRelated Issues
This pull request has the following related issues:
None
Questions
No.
Other
No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
{{TODO: add disclosure if applicable}}
@stdlib-js/reviewers