Skip to content

Commit dd1aab1

Browse files
committed
API: Undeprecate .scalar_sum()
It's a judgment call; deprecations feel like breaking changes to some people, so we should be pragmatic about it. Renaming a bunch of methods in a minor release seems ok (subview and slice methods, they are more obscure) but we should be careful with widely used API. Will be deprecated in 0.13
1 parent 8057cce commit dd1aab1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

README.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ Recent Changes (ndarray)
101101
- Rename ``scalar_sum`` to ``sum``, ``subview`` to ``index_axis``,
102102
``subview_mut`` to ``index_axis_mut``, ``subview_inplace`` to
103103
``collapse_axis``, ``into_subview`` to ``index_axis_move``, and
104-
``slice_inplace`` to ``slice_collapse`` (deprecating the old names).
104+
``slice_inplace`` to ``slice_collapse`` (deprecating the old names,
105+
except for ``scalar_sum`` which will be in 0.13).
105106
- Deprecate ``remove_axis`` and fix soundness hole when removing a zero-length axis.
106107
- Implement ``Clone`` for ``LanesIter``.
107108
- Implement ``Debug``, ``Copy``, and ``Clone`` for ``FoldWhile``.

src/numeric/impl_numeric.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ impl<A, S, D> ArrayBase<S, D>
4747
}
4848

4949
/// Return the sum of all elements in the array.
50-
#[deprecated(note="renamed to `sum`", since="0.12.1")]
50+
///
51+
/// *This method has been renamed to `.sum()` and will be deprecated in the
52+
/// next version.*
53+
// #[deprecated(note="renamed to `sum`", since="0.13")]
5154
pub fn scalar_sum(&self) -> A
5255
where A: Clone + Add<Output=A> + libnum::Zero,
5356
{

0 commit comments

Comments
 (0)