ndarray-tensorflow 0.3.0

Adapter for Tensorflow tensors to expose the ndarray API
docs.rs failed to build ndarray-tensorflow-0.3.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: ndarray-tensorflow-0.2.0

Tensor wrapper that exposes the ndarray API.

This crate provides a small wrapper around the Tensor data structure of the tensorflow crate, to make it possible to use the ndarray API. This wrapper, NdTensor, provides the view and view_mut methods to respectively obtain ArrayView and ArrayViewMut instances.

The following example shows how to wrap a Tensor and obtain an ArrayView:

use ndarray::{arr2, Ix2};
use ndarray_tensorflow::NdTensor;
use tensorflow::Tensor;

let tensor = Tensor::new(&[2, 3])
.with_values(&[0u32, 1, 2, 3, 4, 5])
.unwrap();
let array: NdTensor<_, Ix2> =
NdTensor::from_tensor(tensor)
.unwrap();
assert_eq!(array.view(),
arr2(&[[0, 1, 2], [3, 4, 5]]));