Skip to content

Commit 9662895

Browse files
committed
shape: Deprecate .reshape()
1 parent f1f0e5a commit 9662895

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/impl_methods.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1625,6 +1625,9 @@ where
16251625
///
16261626
/// **Panics** if shapes are incompatible.
16271627
///
1628+
/// *This method is obsolete, because it is inflexible in how logical order
1629+
/// of the array is handled. See [`.to_shape()`].*
1630+
///
16281631
/// ```
16291632
/// use ndarray::{rcarr1, rcarr2};
16301633
///
@@ -1634,6 +1637,7 @@ where
16341637
/// [3., 4.]])
16351638
/// );
16361639
/// ```
1640+
#[deprecated(note="Obsolete, use `to_shape` or `into_shape` instead.", since="0.15.2")]
16371641
pub fn reshape<E>(&self, shape: E) -> ArrayBase<S, E::Dim>
16381642
where
16391643
S: DataShared + DataOwned,

0 commit comments

Comments
 (0)