File: higher_order_f.rs

package info (click to toggle)
rust-ndarray 0.16.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,028 kB
  • sloc: sh: 30; makefile: 2
file content (9 lines) | stat: -rw-r--r-- 163 bytes parent folder | download
1
2
3
4
5
6
7
8
9
use ndarray::prelude::*;

#[test]
#[should_panic]
fn test_fold_axis_oob()
{
    let a = arr2(&[[1., 2.], [3., 4.]]);
    a.fold_axis(Axis(2), 0., |x, y| x + y);
}