File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ rand = "0.8.3"
37
37
thiserror = " 1.0.24"
38
38
39
39
[dependencies .ndarray ]
40
- version = " 0.15.2 "
40
+ version = " 0.16.0 "
41
41
features = [" blas" , " approx" , " std" ]
42
42
default-features = false
43
43
@@ -48,9 +48,9 @@ default-features = false
48
48
49
49
[dev-dependencies ]
50
50
paste = " 1.0.5"
51
- criterion = " 0.3.4 "
51
+ criterion = " 0.5.1 "
52
52
# Keep the same version as ndarray's dependency!
53
- approx = { version = " 0.4.0 " , features = [" num-complex" ] }
53
+ approx = { version = " 0.5 " , features = [" num-complex" ] }
54
54
rand_pcg = " 0.3.1"
55
55
56
56
[[bench ]]
Original file line number Diff line number Diff line change @@ -12,23 +12,23 @@ where
12
12
S : Data ,
13
13
{
14
14
let n = a. len ( ) ;
15
- a. into_shape ( ( n, 1 ) ) . unwrap ( )
15
+ a. into_shape_with_order ( ( n, 1 ) ) . unwrap ( )
16
16
}
17
17
18
18
pub fn into_row < S > ( a : ArrayBase < S , Ix1 > ) -> ArrayBase < S , Ix2 >
19
19
where
20
20
S : Data ,
21
21
{
22
22
let n = a. len ( ) ;
23
- a. into_shape ( ( 1 , n) ) . unwrap ( )
23
+ a. into_shape_with_order ( ( 1 , n) ) . unwrap ( )
24
24
}
25
25
26
26
pub fn flatten < S > ( a : ArrayBase < S , Ix2 > ) -> ArrayBase < S , Ix1 >
27
27
where
28
28
S : Data ,
29
29
{
30
30
let n = a. len ( ) ;
31
- a. into_shape ( n) . unwrap ( )
31
+ a. into_shape_with_order ( n) . unwrap ( )
32
32
}
33
33
34
34
pub fn into_matrix < A , S > ( l : MatrixLayout , a : Vec < A > ) -> Result < ArrayBase < S , Ix2 > >
99
99
// https://github.com/bluss/rust-ndarray/issues/325
100
100
let strides: Vec < isize > = a. strides ( ) . to_vec ( ) ;
101
101
let new = if a. is_standard_layout ( ) {
102
- ArrayBase :: from_shape_vec ( a. dim ( ) , a. into_raw_vec ( ) ) . unwrap ( )
102
+ ArrayBase :: from_shape_vec ( a. dim ( ) , a. into_raw_vec_and_offset ( ) . 0 ) . unwrap ( )
103
103
} else {
104
- ArrayBase :: from_shape_vec ( a. dim ( ) . f ( ) , a. into_raw_vec ( ) ) . unwrap ( )
104
+ ArrayBase :: from_shape_vec ( a. dim ( ) . f ( ) , a. into_raw_vec_and_offset ( ) . 0 ) . unwrap ( )
105
105
} ;
106
106
assert_eq ! (
107
107
new. strides( ) ,
You can’t perform that action at this time.
0 commit comments