Skip to content

Commit 7d35df4

Browse files
committed
Fix docs for panics of var_axis and std_axis
1 parent f7fb81f commit 7d35df4

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/numeric/impl_numeric.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ impl<A, S, D> ArrayBase<S, D>
164164
/// ```
165165
///
166166
/// **Panics** if `ddof` is greater than or equal to the length of the
167-
/// axis, if `axis` is out of bounds, or if the length of the axis is zero.
167+
/// axis or if `axis` is out of bounds.
168168
///
169169
/// # Example
170170
///
@@ -228,7 +228,7 @@ impl<A, S, D> ArrayBase<S, D>
228228
/// ```
229229
///
230230
/// **Panics** if `ddof` is greater than or equal to the length of the
231-
/// axis, if `axis` is out of bounds, or if the length of the axis is zero.
231+
/// axis or if `axis` is out of bounds.
232232
///
233233
/// # Example
234234
///

tests/array.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -816,10 +816,9 @@ fn var_axis_bad_dof() {
816816
}
817817

818818
#[test]
819-
#[should_panic]
820819
fn var_axis_empty_axis() {
821820
let a = array![[], []];
822-
a.var_axis(Axis(1), 0.);
821+
a.var_axis(Axis(1), -1.);
823822
}
824823

825824
#[test]
@@ -830,10 +829,9 @@ fn std_axis_bad_dof() {
830829
}
831830

832831
#[test]
833-
#[should_panic]
834832
fn std_axis_empty_axis() {
835833
let a = array![[], []];
836-
a.std_axis(Axis(1), 0.);
834+
a.std_axis(Axis(1), -1.);
837835
}
838836

839837
#[test]

0 commit comments

Comments
 (0)