-
Notifications
You must be signed in to change notification settings - Fork 24
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
using .quantile_mut() on Array1::<f64> #58
Comments
Rust's floats ( If you remove Not a Number from the equation (using something like As an action item on our side, we should probably provide a |
Thanks for the quick response @LukeMathWalker , that's annoying f32/f64 doen't impelment It was potentially me reading the docs wrong as I had the impression that the q value needed to be noisy rather than the array which didn't make much sense to me. Thanks for clearning it up! |
The |
@jturner314 that sounds like a great idea, thanks for pointing out |
Yes, that's what I meant @jturner314. |
@CharlieBickerton Note that 1d arrays have a single axis (axis 0). use ndarray::prelude::*;
use ndarray_stats::{interpolate::Nearest, QuantileExt};
use noisy_float::types::n64;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut arr: Array1<f64> = array![0., std::f64::NAN, 1., std::f64::NAN, 2., 3., 4.];
assert_eq!(
2.,
arr.quantile_axis_skipnan_mut(Axis(0), n64(0.5), &Nearest)?
.into_scalar()
);
Ok(())
} It would be more convenient to have a |
Hi guys, I'm trying to use .quantile_mut() on a 1D array of f64 numbers. I'm getting this error:
I have a few questions:
The text was updated successfully, but these errors were encountered: