[−][src]Trait ndarray_stats::MaybeNan
A number type that can have not-a-number values.
Associated Types
type NotNan
A type that is guaranteed not to be a NaN value.
Required methods
fn is_nan(&self) -> bool
Returns true
if the value is a NaN value.
fn try_as_not_nan(&self) -> Option<&Self::NotNan>
Tries to convert the value to NotNan
.
Returns None
if the value is a NaN value.
fn from_not_nan(_: Self::NotNan) -> Self
Converts the value.
If the value is None
, a NaN value is returned.
fn from_not_nan_opt(_: Option<Self::NotNan>) -> Self
Converts the value.
If the value is None
, a NaN value is returned.
fn from_not_nan_ref_opt(_: Option<&Self::NotNan>) -> &Self
Converts the value.
If the value is None
, a NaN value is returned.
fn remove_nan_mut(_: ArrayViewMut1<Self>) -> ArrayViewMut1<Self::NotNan>
Returns a view with the NaN values removed.
This modifies the input view by moving elements as necessary. The final order of the elements is unspecified. However, this method is idempotent, and given the same input data, the result is always ordered the same way.