Commit 408f42b
committed
Panic on remove_axis if length of axis is zero
Before, this would print uninitialized values:
```rust
use ndarray::prelude::*;
let v = ArrayView2::<i32>::from_shape((0, 2), &[]).unwrap();
println!("{:?}", v.remove_axis(Axis(0)));
```
Now, it panics.1 parent d5224a2 commit 408f42b
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1512 | 1512 | | |
1513 | 1513 | | |
1514 | 1514 | | |
| 1515 | + | |
| 1516 | + | |
1515 | 1517 | | |
1516 | 1518 | | |
1517 | 1519 | | |
1518 | | - | |
| 1520 | + | |
1519 | 1521 | | |
1520 | 1522 | | |
1521 | 1523 | | |
| |||
0 commit comments