-
-
Notifications
You must be signed in to change notification settings - Fork 258
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
NdArray bump follow up #121
Conversation
@@ -43,10 +50,113 @@ pub trait Float: | |||
+ for<'a> SubAssign<&'a Self> | |||
+ for<'a> DivAssign<&'a Self> | |||
+ SampleUniform | |||
+ ScalarOperand |
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.
Maybe we could add num_traits::MulAdd<Output = F>
(see sparsemat/sprs#278 (comment)) to ease the upgrade to sprs 0.10
?
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.
yes! Haven't seen the post
Codecov Report
@@ Coverage Diff @@
## master #121 +/- ##
==========================================
- Coverage 58.30% 58.23% -0.08%
==========================================
Files 75 76 +1
Lines 6697 6700 +3
==========================================
- Hits 3905 3902 -3
- Misses 2792 2798 +6
Continue to review full report at Codecov.
|
This is the followup to the PR #110. It tries to simplify our story of cauchy::Scalar and num_trait::Float by moving the trait bound of cauchy behind an associated type and avoiding thus the ambiguity when mixing both bounds.
It adds a function Float::map_cauchy_bound and pulls in the trait bound here for an example in
linfa-clustering
: https://github.com/rust-ml/linfa/pull/121/files#diff-cc618ed2646ccdd41e994796498d4b9ed256dc0d99c1976302eba1c496caaf64R256.I also added a
F::cast
function to shorten number casting and avoid num_traits::FromPrimitive 😅@relf