Skip to content

Commit fa9fb4a

Browse files
committed
shape: Deprecate .reshape()
1 parent eb12613 commit fa9fb4a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/impl_methods.rs

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

0 commit comments

Comments
 (0)