Skip to content
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

Adding ndarray implementations for ArgminRandom and ArgminMinMax #231

Merged
merged 2 commits into from
Dec 9, 2022

Conversation

hypotrochoid
Copy link
Contributor

Adds missing trait implementations for ndarray inputs.

@stefan-k
Copy link
Member

Thanks for the contribution! Could you have a look at the clippy lints and run rustfmt, please? Other than that it looks good to me :)

@stefan-k
Copy link
Member

On other thing I noticed: Could you add tests, please? I know that the other backends are also missing tests, but this could be a good place to start testing this ;) One thing I could imagine in case of ArgminRandom is checking that the values are within the provided bounds.

@stefan-k
Copy link
Member

stefan-k commented Jul 15, 2022

The remaining clippy errors are due to an update of clippy. You can simply add Eq to the derive as suggested in the logs.

@hypotrochoid
Copy link
Contributor Author

Sure. I'll add a couple tests when I get some free time.

@stefan-k
Copy link
Member

Sounds great! The fix for the clippy lints are now in main, therefore rebasing should fix the failing CI.

@codecov-commenter
Copy link

Codecov Report

Base: 91.67% // Head: 91.50% // Decreases project coverage by -0.16% ⚠️

Coverage data is based on head (65bf067) compared to base (caab45a).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #231      +/-   ##
==========================================
- Coverage   91.67%   91.50%   -0.17%     
==========================================
  Files         116      117       +1     
  Lines       17601    17632      +31     
==========================================
  Hits        16135    16135              
- Misses       1466     1497      +31     
Impacted Files Coverage Δ
argmin-math/src/ndarray_m/random.rs 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@stefan-k
Copy link
Member

stefan-k commented Dec 9, 2022

I rebased this commit and removed the ndarray ArgminMinMax implementation in favor of the one which was added to main since this PR was opened. I also implemented the trait directly for all basic types instead of using traits because this causes fewer problems down the line in my experience.

I am merging this PR despite the missing tests which will be added later.

Thanks again for this contribution! :)

@stefan-k stefan-k merged commit c874876 into argmin-rs:main Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants