pub struct RawArray {
pub element: Element,
pub shape: Vec<usize>,
/* private fields */
}Expand description
A decoded numpy buffer, still in its wire element type.
Fields§
§element: ElementThe dtype the server declared.
shape: Vec<usize>Dimensions, in C order.
Implementations§
Source§impl RawArray
impl RawArray
Sourcepub fn to_f32(&self) -> Vec<f32>
pub fn to_f32(&self) -> Vec<f32>
Widen every element to f32.
Integer dtypes are converted, not reinterpreted: a quantized int8 embedding comes
back as the integer values the server sent.
Trait Implementations§
impl Eq for RawArray
impl StructuralPartialEq for RawArray
Auto Trait Implementations§
impl Freeze for RawArray
impl RefUnwindSafe for RawArray
impl Send for RawArray
impl Sync for RawArray
impl Unpin for RawArray
impl UnsafeUnpin for RawArray
impl UnwindSafe for RawArray
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.