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 +
158158 /// **Panics** if `Self` has a fixed size that is not `ndim`.
159159 fn zeros ( ndim : usize ) -> Self ;
160160
161- #[ doc( hidden) ]
162- // Return an index of same dimensionality
163- fn zero_index ( & self ) -> Self {
164- Self :: default ( )
165- }
166-
167161 #[ doc( hidden) ]
168162 #[ inline]
169163 fn first_index ( & self ) -> Option < Self > {
@@ -815,11 +809,6 @@ impl Dimension for IxDyn
815809 self
816810 }
817811
818- #[ inline]
819- fn zero_index ( & self ) -> Self {
820- IxDyn :: zeros ( self . ndim ( ) )
821- }
822-
823812 #[ inline]
824813 fn zeros ( ndim : usize ) -> Self {
825814 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>
3131{
3232 let dim = shape. into_dimension ( ) ;
3333 Indices {
34- start : dim. zero_index ( ) ,
34+ start : E :: Dim :: zeros ( dim. ndim ( ) ) ,
3535 dim : dim,
3636 }
3737}
@@ -210,7 +210,7 @@ pub fn indices_iter_f<E>(shape: E) -> IndicesIterF<E::Dim>
210210 where E : IntoDimension ,
211211{
212212 let dim = shape. into_dimension ( ) ;
213- let zero = dim. zero_index ( ) ;
213+ let zero = E :: Dim :: zeros ( dim. ndim ( ) ) ;
214214 IndicesIterF {
215215 has_remaining : dim. size_checked ( ) != Some ( 0 ) ,
216216 index : zero,
You can’t perform that action at this time.
0 commit comments