-
-
Notifications
You must be signed in to change notification settings - Fork 890
feat: add ndarray/find
#4398
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 ndarray/find
#4398
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: 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: 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 --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na ---
Coverage Report
The above coverage report was generated for the changes in this PR. |
@gururaj1512 Before you start doing too many of things in #2656 and us needing to go back and fix things, I'd put these on pause. As mentioned in #2656, the issue is that find
(and every
) are reductions, and thus should support specifying axes over which to perform the reductions. And furthermore, the implementation proposed in this PR may work for the flattened case; however, it won't work for the axes case. And lastly, we should always return ndarrays, not scalars. In short, there is a bit of R&D which needs to be done in order for these to move forward.
One other thing: each top-level ndarray implementation should be a wrapper around a "base" implementation. Notice how in base/for-each
, we write kernels for efficient iteration: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/for-each/lib. I would expect something similar for reductions.
So before top-level implementations, we need to create the "base" implementations.
@gururaj1512 Before you start doing too many of things in #2656 and us needing to go back and fix things, I'd put these on pause. As mentioned in #2656, the issue is that
find
(andevery
) are reductions, and thus should support specifying axes over which to perform the reductions. And furthermore, the implementation proposed in this PR may work for the flattened case; however, it won't work for the axes case. And lastly, we should always return ndarrays, not scalars. In short, there is a bit of R&D which needs to be done in order for these to move forward.
Yaa I had similar doubts while creating this PR. Just created this quick PR to discuss about it.
@kgryte, Should we pause this, or is there something I can work on? I would love to work on issues related to this.
@gururaj1512 Yes, let's pause. I pinged you on the tracking issue.
@headlessNode Once #7426 is merged, would you mind taking this PR over, refactoring, and basing on ndarray/base/find
?
@headlessNode Now that #7426 has been merged, this is now ready for you.
/stdlib merge
/stdlib help
@headlessNode, available slash commands include:
/stdlib check-files
- Check for required files./stdlib make-commands
- Printmake
commands for package changed in PR./stdlib update-copyright-years
- Update copyright header years./stdlib lint-autofix
- Auto-fix lint errors./stdlib merge
- Merge changes from develop branch into this PR./stdlib rebase
- Rebase this PR on top of develop branch.
Signed-off-by: Muhammad Haris <101793258+headlessNode@users.noreply.github.com>
Signed-off-by: Muhammad Haris <101793258+headlessNode@users.noreply.github.com>
Signed-off-by: Muhammad Haris <101793258+headlessNode@users.noreply.github.com>
--- 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: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - 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: na - task: lint_license_headers status: passed ---
--- 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: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - 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: na - task: lint_license_headers status: passed ---
--- 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: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - 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: na - task: lint_license_headers status: passed ---
--- 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: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - 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: na - task: lint_license_headers status: passed ---
--- 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: na - 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: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed ---
@kgryte ping
Uh oh!
There was an error while loading. Please reload this page.
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes. report:
type: pre_push_report
description: Results of running various checks prior to pushing changes. report:
Resolves stdlib-js/metr-issue-tracker#70.
Description
This pull request:
ndarray/find
Related Issues
This pull request:
ndarray/find
metr-issue-tracker#70 .Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers