diff --git a/src/value/impl_tensor/create.rs b/src/value/impl_tensor/create.rs index c0e2717..b2cb7cd 100644 --- a/src/value/impl_tensor/create.rs +++ b/src/value/impl_tensor/create.rs @@ -620,6 +620,14 @@ impl OwnedTensorArrayData for (D, Box<[T } } +impl TensorArrayData for (D, Arc<[T]>) { + fn ref_parts(&self) -> Result<(Vec, &[T], Option>)> { + let shape = self.0.to_dimensions(Some(self.1.len()))?; + let data = &*self.1; + Ok((shape, data, Some(Box::new(self.1.clone())))) + } +} + impl TensorArrayData for (D, Arc>) { fn ref_parts(&self) -> Result<(Vec, &[T], Option>)> { let shape = self.0.to_dimensions(Some(self.1.len()))?;