Skip to content

Commit 4f803b8

Browse files
committed
as_view_mut
1 parent c9e46a9 commit 4f803b8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

fftw/src/array.rs

+8
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ impl<T> AlignedVec<T> {
6464
{
6565
ArrayView::from_shape(shape, self.as_slice())
6666
}
67+
68+
pub fn as_view_mut<D, Shape>(&mut self, shape: Shape) -> Result<ArrayViewMut<T, D>, ShapeError>
69+
where
70+
D: Dimension,
71+
Shape: Into<StrideShape<D>>,
72+
{
73+
ArrayViewMut::from_shape(shape, self.as_slice_mut())
74+
}
6775
}
6876

6977
impl<T> Deref for AlignedVec<T> {

0 commit comments

Comments
 (0)