afarray

Crates.ioafarray
lib.rsafarray
created_at2021-01-07 04:16:54.112388
updated_at2023-01-24 11:22:45.845888
descriptionConvenience methods for working with ArrayFire arrays in Rust
homepage
repositoryhttps://github.com/haydnv/afarray
max_upload_size
id333565
Haydn Vestal

documentation

README

# afarray Convenience methods for working with ArrayFire arrays in Rust, compatible with [number-general](http://github.com/haydnv/number-general). Usage example: ```rust use std::iter::FromIterator; use afarray::Array; use number_general::Number; let a = [1, 2, 3]; let b = [5]; let product = &Array::from(&a[..]) * &Array::from(&b[..]); assert_eq!(product, Array::from_iter(vec![5, 10, 15])); assert_eq!(product.sum(), Number::from(30)) ``` Note that you must have [ArrayFire](http://arrayfire.org) installed in order to build this crate. The installation instructions are at [http://arrayfire.org/docs/installing.htm](http://arrayfire.org/docs/installing.htm). You can find detailed instructions for building the Rust `arrayfire` crate from crates.io at: [https://crates.io/crates/arrayfire](https://crates.io/crates/arrayfire).
Commit count: 118

cargo fmt