pub struct SerializationUtils;Expand description
Serialization utilities for ML data structures
Implementations§
Source§impl SerializationUtils
impl SerializationUtils
Sourcepub fn serialize_array2(array: &Array2<f64>) -> UtilsResult<Vec<u8>>
pub fn serialize_array2(array: &Array2<f64>) -> UtilsResult<Vec<u8>>
Serialize array to binary format
Sourcepub fn deserialize_array2(data: &[u8]) -> UtilsResult<Array2<f64>>
pub fn deserialize_array2(data: &[u8]) -> UtilsResult<Array2<f64>>
Deserialize array from binary format
Sourcepub fn serialize_to_file<P: AsRef<Path>>(
path: P,
array: &Array2<f64>,
) -> UtilsResult<()>
pub fn serialize_to_file<P: AsRef<Path>>( path: P, array: &Array2<f64>, ) -> UtilsResult<()>
Serialize to file
Sourcepub fn deserialize_from_file<P: AsRef<Path>>(
path: P,
) -> UtilsResult<Array2<f64>>
pub fn deserialize_from_file<P: AsRef<Path>>( path: P, ) -> UtilsResult<Array2<f64>>
Deserialize from file
Auto Trait Implementations§
impl Freeze for SerializationUtils
impl RefUnwindSafe for SerializationUtils
impl Send for SerializationUtils
impl Sync for SerializationUtils
impl Unpin for SerializationUtils
impl UnwindSafe for SerializationUtils
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more