Closed Chris00 closed 5 months ago
Thanks for the added checks! Please fix the CI errors then I'll merge.
I fixed the cargo fmt
part. The other error is unrelated to my changes — and would require a redesign of the cblas
interface as, say, idamax
returning an Index
that no function accepts as argument makes idamax
useless.
Indeed! New rust unused items analyzer is great. I'll send a fix for it. Thanks!
The functions
fit::linear
,... were not checking that the lengthn
was not too large (in which case the function would access memory outside the slice 😨). This PR fixes that.P.S. IMHO, the strides and length parameters should be optional. For example a trait for “slice or (slice, stride)” would be simple and convenient (for strides, not the length
n
). For a better “Rust like” user experience, bigger changes are needed (I can try to propose something if you agree that such a change is beneficial).