Skip to content

Commit 49b315a

Browse files
committed
API: Mark .scalar_sum() as deprecated (Renamed to .sum())
1 parent 0cc42b5 commit 49b315a

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

src/numeric/impl_numeric.rs

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,17 @@ where
4848
sum
4949
}
5050

51+
/// Return the sum of all elements in the array.
52+
///
53+
/// *This method has been renamed to `.sum()`*
54+
#[deprecated(note="renamed to `sum`", since="0.15.0")]
55+
pub fn scalar_sum(&self) -> A
56+
where
57+
A: Clone + Add<Output = A> + num_traits::Zero,
58+
{
59+
self.sum()
60+
}
61+
5162
/// Returns the [arithmetic mean] x̅ of all elements in the array:
5263
///
5364
/// ```text
@@ -75,18 +86,6 @@ where
7586
}
7687
}
7788

78-
/// Return the sum of all elements in the array.
79-
///
80-
/// *This method has been renamed to `.sum()` and will be deprecated in the
81-
/// next version.*
82-
// #[deprecated(note="renamed to `sum`", since="0.13")]
83-
pub fn scalar_sum(&self) -> A
84-
where
85-
A: Clone + Add<Output = A> + num_traits::Zero,
86-
{
87-
self.sum()
88-
}
89-
9089
/// Return the product of all elements in the array.
9190
///
9291
/// ```

0 commit comments

Comments
 (0)