#ndarray #convert #nalgebra #borrow #image #borrowing

no-std nshare

Conversion between n-dimensional types in different Rust crates

8 breaking releases

0.9.0 Feb 3, 2022
0.8.0 Nov 12, 2021
0.7.0 Jun 26, 2021
0.2.0 Dec 5, 2020
0.1.1 Apr 4, 2020

#636 in Rust patterns

Download history 197/week @ 2023-11-27 227/week @ 2023-12-04 409/week @ 2023-12-11 339/week @ 2023-12-18 122/week @ 2023-12-25 183/week @ 2024-01-01 336/week @ 2024-01-08 381/week @ 2024-01-15 201/week @ 2024-01-22 196/week @ 2024-01-29 229/week @ 2024-02-05 267/week @ 2024-02-12 317/week @ 2024-02-19 572/week @ 2024-02-26 339/week @ 2024-03-04 173/week @ 2024-03-11

1,423 downloads per month
Used in 8 crates (7 directly)

MIT license

28KB
421 lines

nshare

Discord Crates.io MIT/Apache docs.rs LoC ci

Provides traits that allow conversion between n-dimensional types in different Rust crates

NOTE: By default, this crate includes no conversions. You must choose which crates you want to use using the features:

  • ndarray
  • nalgebra
  • image

When crates are included, any available conversions between the enabled 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.

Supported Crates

  • image
  • ndarray
  • nalgebra

Dependencies

~13MB
~102K SLoC