pub struct ScipySparseIntegration;
Expand description
SciPy sparse matrix integration utilities
Implementations§
Source§impl ScipySparseIntegration
impl ScipySparseIntegration
Sourcepub fn to_scipy_data(sparse: &dyn SparseTensor) -> TorshResult<ScipySparseData>
pub fn to_scipy_data(sparse: &dyn SparseTensor) -> TorshResult<ScipySparseData>
Convert ToRSh sparse tensor to SciPy sparse data
Sourcepub fn from_scipy_data(
data: &ScipySparseData,
) -> TorshResult<Box<dyn SparseTensor + Send + Sync>>
pub fn from_scipy_data( data: &ScipySparseData, ) -> TorshResult<Box<dyn SparseTensor + Send + Sync>>
Convert SciPy sparse data to ToRSh sparse tensor
Sourcepub fn to_dict(
sparse: &dyn SparseTensor,
) -> TorshResult<HashMap<String, Vec<f64>>>
pub fn to_dict( sparse: &dyn SparseTensor, ) -> TorshResult<HashMap<String, Vec<f64>>>
Serialize sparse tensor to dictionary format compatible with SciPy
Sourcepub fn to_python_code(
sparse: &dyn SparseTensor,
var_name: &str,
) -> TorshResult<String>
pub fn to_python_code( sparse: &dyn SparseTensor, var_name: &str, ) -> TorshResult<String>
Generate Python code to create equivalent SciPy sparse matrix
Auto Trait Implementations§
impl Freeze for ScipySparseIntegration
impl RefUnwindSafe for ScipySparseIntegration
impl Send for ScipySparseIntegration
impl Sync for ScipySparseIntegration
impl Unpin for ScipySparseIntegration
impl UnwindSafe for ScipySparseIntegration
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