File tree Expand file tree Collapse file tree 2 files changed +2
-13
lines changed Expand file tree Collapse file tree 2 files changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -158,12 +158,6 @@ pub trait Dimension : Clone + Eq + Debug + Send + Sync + Default +
158
158
/// **Panics** if `Self` has a fixed size that is not `ndim`.
159
159
fn zeros ( ndim : usize ) -> Self ;
160
160
161
- #[ doc( hidden) ]
162
- // Return an index of same dimensionality
163
- fn zero_index ( & self ) -> Self {
164
- Self :: default ( )
165
- }
166
-
167
161
#[ doc( hidden) ]
168
162
#[ inline]
169
163
fn first_index ( & self ) -> Option < Self > {
@@ -815,11 +809,6 @@ impl Dimension for IxDyn
815
809
self
816
810
}
817
811
818
- #[ inline]
819
- fn zero_index ( & self ) -> Self {
820
- IxDyn :: zeros ( self . ndim ( ) )
821
- }
822
-
823
812
#[ inline]
824
813
fn zeros ( ndim : usize ) -> Self {
825
814
IxDyn :: zeros ( ndim)
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ pub fn indices<E>(shape: E) -> Indices<E::Dim>
31
31
{
32
32
let dim = shape. into_dimension ( ) ;
33
33
Indices {
34
- start : dim. zero_index ( ) ,
34
+ start : E :: Dim :: zeros ( dim. ndim ( ) ) ,
35
35
dim : dim,
36
36
}
37
37
}
@@ -210,7 +210,7 @@ pub fn indices_iter_f<E>(shape: E) -> IndicesIterF<E::Dim>
210
210
where E : IntoDimension ,
211
211
{
212
212
let dim = shape. into_dimension ( ) ;
213
- let zero = dim. zero_index ( ) ;
213
+ let zero = E :: Dim :: zeros ( dim. ndim ( ) ) ;
214
214
IndicesIterF {
215
215
has_remaining : dim. size_checked ( ) != Some ( 0 ) ,
216
216
index : zero,
You can’t perform that action at this time.
0 commit comments