We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0181719 commit 9dfa7edCopy full SHA for 9dfa7ed
src/numeric/impl_numeric.rs
@@ -133,6 +133,11 @@ where
133
A: Clone + One + Mul<Output = A> + ScalarOperand,
134
D: Dimension + RemoveAxis,
135
{
136
+ // First check dimensionality
137
+ if self.ndim() > 1 && axis.is_none() {
138
+ panic!("axis parameter is required for arrays with more than one dimension");
139
+ }
140
+
141
let mut res = Array::ones(self.raw_dim());
142
143
match axis {
0 commit comments