Crates.io | nshare |
lib.rs | nshare |
version | 0.10.0 |
source | src |
created_at | 2020-04-04 02:57:37.181628 |
updated_at | 2024-08-29 00:57:34.400422 |
description | Conversion between n-dimensional types in different Rust crates |
homepage | |
repository | https://github.com/rust-cv/nshare |
max_upload_size | |
id | 226125 |
size | 31,883 |
Provides traits that allow conversion between n-dimensional types in different Rust crates
NOTE: By default, this crate includes conversions for all supported crates. If you want to limit compilation, use no-default-features = true
enable the corresponding feature for each dependency:
nalgebra
ndarray
image
When two crate features are enabled, any available conversions between the two crates are turned on.
Right now this crate really only provides conversions to owned and borrowed ndarray types. Some limitations exist with nalgebra
, as it only utilizes positive strides, while ndarray
supports negative strides as well. The image
crate has no concept of strides. Due to this, the ndarray
crate is the most flexible, and is ideal for interoperability between these various crates.
nalgebra
currently does not offer a solution to directly pass it an owned vector from ndarray
, so into
conversions do perform a copy. It is recommended to create the owned copy in nalgebra
and then borrow a mutable array view of it using ndarray. You can then populate it accordingly without any copies of the data.