Skip to content

Commit 49d863d

Browse files
committed
shape: Deprecate .reshape()
1 parent 9447328 commit 49d863d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/impl_methods.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1932,6 +1932,9 @@ where
19321932
///
19331933
/// **Panics** if shapes are incompatible.
19341934
///
1935+
/// *This method is obsolete, because it is inflexible in how logical order
1936+
/// of the array is handled. See [`.to_shape()`].*
1937+
///
19351938
/// ```
19361939
/// use ndarray::{rcarr1, rcarr2};
19371940
///
@@ -1941,6 +1944,7 @@ where
19411944
/// [3., 4.]])
19421945
/// );
19431946
/// ```
1947+
#[deprecated(note="Obsolete, use `to_shape` or `into_shape` instead.", since="0.15.2")]
19441948
pub fn reshape<E>(&self, shape: E) -> ArrayBase<S, E::Dim>
19451949
where
19461950
S: DataShared + DataOwned,

0 commit comments

Comments
 (0)