Struct ndarray_rand::F32 [−][src]
👎 Deprecated since 0.14.0:
Redundant with rand 0.8
A wrapper type that allows casting f64 distributions to f32
use ndarray::Array; use ndarray_rand::{RandomExt, F32}; use ndarray_rand::rand_distr::Normal; let distribution_f64 = Normal::new(0., 1.).expect("Failed to create normal distribution"); let a = Array::random((2, 5), F32(distribution_f64)); println!("{:8.4}", a); // Example Output: // [[ -0.6910, 1.1730, 1.0902, -0.4092, -1.7340], // [ -0.6810, 0.1678, -0.9487, 0.3150, 1.2981]]
Trait Implementations
impl<S: Clone> Clone for F32<S>
[src]
impl<S: Copy> Copy for F32<S>
[src]
impl<S: Debug> Debug for F32<S>
[src]
impl<S> Distribution<f32> for F32<S> where
S: Distribution<f64>,
[src]
S: Distribution<f64>,
Auto Trait Implementations
impl<S> RefUnwindSafe for F32<S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
impl<S> Send for F32<S> where
S: Send,
S: Send,
impl<S> Sync for F32<S> where
S: Sync,
S: Sync,
impl<S> Unpin for F32<S> where
S: Unpin,
S: Unpin,
impl<S> UnwindSafe for F32<S> where
S: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,