@@ -4,7 +4,11 @@ Version 0.15.0 (Not released yet)
4
4
New features
5
5
------------
6
6
7
- - Support inserting new axes while slicing by [ @jturner314 ]
7
+ - Support inserting new axes while slicing by [ @jturner314 ] . This is an example:
8
+
9
+ ``` rust
10
+ let view = arr . slice (s! [.. , - 1 , NewAxis , .. ;- 1 ]);
11
+ ```
8
12
9
13
https://github.com/rust-ndarray/ndarray/pull/570
10
14
@@ -72,6 +76,30 @@ Enhancements
72
76
API changes
73
77
-----------
74
78
79
+ - Changes to the slicing-related types and macro by [ @jturner314 ] and [ @bluss ] :
80
+
81
+ - Remove the ` Dimension::SliceArg ` associated type, and add a new ` SliceArg `
82
+ trait for this purpose.
83
+ - Change the return type of the ` s![] ` macro to an owned ` SliceInfo ` rather
84
+ than a reference.
85
+ - Replace the ` SliceOrIndex ` enum with ` SliceInfoElem ` , which has an
86
+ additional ` NewAxis ` variant and does not have a ` step_by ` method.
87
+ - Change the type parameters of ` SliceInfo ` in order to support the ` NewAxis `
88
+ functionality and remove some tricky ` unsafe ` code.
89
+ - Mark the ` SliceInfo::new ` method as ` unsafe ` . The new implementations of
90
+ ` TryFrom ` can be used as a safe alternative.
91
+ - Remove the ` AsRef<SliceInfo<[SliceOrIndex], D>> for SliceInfo<T, D> `
92
+ implementation. Add the similar `From<&'a SliceInfo<T, Din, Dout>> for
93
+ SliceInfo<&'a [ SliceInfoElem] , Din, Dout>` conversion as an alternative.
94
+ - Change the * expr* ` ; ` * step* case in the ` s![] ` macro to error at compile
95
+ time if an unsupported type for * expr* is used instead of panicking at
96
+ runtime.
97
+
98
+ https://github.com/rust-ndarray/ndarray/pull/570
99
+ https://github.com/rust-ndarray/ndarray/pull/940
100
+ https://github.com/rust-ndarray/ndarray/pull/943
101
+ https://github.com/rust-ndarray/ndarray/pull/945
102
+
75
103
- Removed already deprecated methods by [ @bluss ] :
76
104
77
105
- Remove deprecated ` .all_close() ` - use approx feature and methods like ` .abs_diff_eq ` instead
@@ -142,6 +170,12 @@ Bug fixes
142
170
143
171
https://github.com/rust-ndarray/ndarray/pull/855
144
172
173
+ - Mark the ` SliceInfo::new ` method as ` unsafe ` due to the requirement that
174
+ ` indices.as_ref() ` always return the same value when called multiple times,
175
+ by [ @bluss ] and [ @jturner314 ]
176
+
177
+ https://github.com/rust-ndarray/ndarray/pull/570
178
+
145
179
Other changes
146
180
-------------
147
181
0 commit comments