@@ -98,19 +98,19 @@ static mp_obj_t numerical_all_any(mp_obj_t oin, mp_obj_t axis, uint8_t optype) {
9898 l ++ ;
9999 } while (l < ndarray -> shape [ULAB_MAX_DIMS - 1 ]);
100100 #if ULAB_MAX_DIMS > 1
101- array -= ndarray -> strides [ULAB_MAX_DIMS - 1 ] * ndarray -> shape [ULAB_MAX_DIMS - 1 ];
101+ array -= ndarray -> strides [ULAB_MAX_DIMS - 1 ] * ndarray -> shape [ULAB_MAX_DIMS - 1 ];
102102 array += ndarray -> strides [ULAB_MAX_DIMS - 2 ];
103103 k ++ ;
104104 } while (k < ndarray -> shape [ULAB_MAX_DIMS - 2 ]);
105105 #endif
106106 #if ULAB_MAX_DIMS > 2
107- array -= ndarray -> strides [ULAB_MAX_DIMS - 2 ] * ndarray -> shape [ULAB_MAX_DIMS - 2 ];
107+ array -= ndarray -> strides [ULAB_MAX_DIMS - 2 ] * ndarray -> shape [ULAB_MAX_DIMS - 2 ];
108108 array += ndarray -> strides [ULAB_MAX_DIMS - 3 ];
109109 j ++ ;
110110 } while (j < ndarray -> shape [ULAB_MAX_DIMS - 3 ]);
111111 #endif
112112 #if ULAB_MAX_DIMS > 3
113- array -= ndarray -> strides [ULAB_MAX_DIMS - 3 ] * ndarray -> shape [ULAB_MAX_DIMS - 3 ];
113+ array -= ndarray -> strides [ULAB_MAX_DIMS - 3 ] * ndarray -> shape [ULAB_MAX_DIMS - 3 ];
114114 array += ndarray -> strides [ULAB_MAX_DIMS - 4 ];
115115 i ++ ;
116116 } while (i < ndarray -> shape [ULAB_MAX_DIMS - 4 ]);
@@ -141,33 +141,33 @@ static mp_obj_t numerical_all_any(mp_obj_t oin, mp_obj_t axis, uint8_t optype) {
141141 // optype == NUMERICAL_ANY
142142 * rarray = 1 ;
143143 // since we are breaking out of the loop, move the pointer forward
144- array += ndarray -> strides [ _shape_strides .index ] * (ndarray -> shape [ _shape_strides .index ] - l );
144+ array += _shape_strides .strides [ 0 ] * (_shape_strides .shape [ 0 ] - l );
145145 break ;
146146 } else if ((value == MICROPY_FLOAT_CONST (0.0 )) & anytype ) {
147147 // optype == NUMERICAL_ALL
148148 * rarray = 0 ;
149149 // since we are breaking out of the loop, move the pointer forward
150- array += ndarray -> strides [ _shape_strides .index ] * (ndarray -> shape [ _shape_strides .index ] - l );
150+ array += _shape_strides .strides [ 0 ] * (_shape_strides .shape [ 0 ] - l );
151151 break ;
152152 }
153- array += ndarray -> strides [ _shape_strides .index ];
153+ array += _shape_strides .strides [ 0 ];
154154 l ++ ;
155- } while (l < ndarray -> shape [ _shape_strides .index ]);
155+ } while (l < _shape_strides .shape [ 0 ]);
156156 #if ULAB_MAX_DIMS > 1
157157 rarray ++ ;
158- array -= ndarray -> strides [ _shape_strides .index ] * ndarray -> shape [ _shape_strides .index ];
158+ array -= _shape_strides .strides [ 0 ] * _shape_strides .shape [ 0 ];
159159 array += _shape_strides .strides [ULAB_MAX_DIMS - 1 ];
160160 k ++ ;
161161 } while (k < _shape_strides .shape [ULAB_MAX_DIMS - 1 ]);
162162 #endif
163163 #if ULAB_MAX_DIMS > 2
164- array -= _shape_strides .strides [ULAB_MAX_DIMS - 1 ] * _shape_strides .shape [ULAB_MAX_DIMS - 1 ];
164+ array -= _shape_strides .strides [ULAB_MAX_DIMS - 1 ] * _shape_strides .shape [ULAB_MAX_DIMS - 1 ];
165165 array += _shape_strides .strides [ULAB_MAX_DIMS - 2 ];
166166 j ++ ;
167167 } while (j < _shape_strides .shape [ULAB_MAX_DIMS - 2 ]);
168168 #endif
169169 #if ULAB_MAX_DIMS > 3
170- array -= _shape_strides .strides [ULAB_MAX_DIMS - 2 ] * _shape_strides .shape [ULAB_MAX_DIMS - 2 ];
170+ array -= _shape_strides .strides [ULAB_MAX_DIMS - 2 ] * _shape_strides .shape [ULAB_MAX_DIMS - 2 ];
171171 array += _shape_strides .strides [ULAB_MAX_DIMS - 3 ];
172172 i ++ ;
173173 } while (i < _shape_strides .shape [ULAB_MAX_DIMS - 3 ])
0 commit comments