@@ -98,19 +98,19 @@ static mp_obj_t numerical_all_any(mp_obj_t oin, mp_obj_t axis, uint8_t optype) {
98
98
l ++ ;
99
99
} while (l < ndarray -> shape [ULAB_MAX_DIMS - 1 ]);
100
100
#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 ];
102
102
array += ndarray -> strides [ULAB_MAX_DIMS - 2 ];
103
103
k ++ ;
104
104
} while (k < ndarray -> shape [ULAB_MAX_DIMS - 2 ]);
105
105
#endif
106
106
#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 ];
108
108
array += ndarray -> strides [ULAB_MAX_DIMS - 3 ];
109
109
j ++ ;
110
110
} while (j < ndarray -> shape [ULAB_MAX_DIMS - 3 ]);
111
111
#endif
112
112
#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 ];
114
114
array += ndarray -> strides [ULAB_MAX_DIMS - 4 ];
115
115
i ++ ;
116
116
} 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) {
141
141
// optype == NUMERICAL_ANY
142
142
* rarray = 1 ;
143
143
// 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 );
145
145
break ;
146
146
} else if ((value == MICROPY_FLOAT_CONST (0.0 )) & anytype ) {
147
147
// optype == NUMERICAL_ALL
148
148
* rarray = 0 ;
149
149
// 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 );
151
151
break ;
152
152
}
153
- array += ndarray -> strides [ _shape_strides .index ];
153
+ array += _shape_strides .strides [ 0 ];
154
154
l ++ ;
155
- } while (l < ndarray -> shape [ _shape_strides .index ]);
155
+ } while (l < _shape_strides .shape [ 0 ]);
156
156
#if ULAB_MAX_DIMS > 1
157
157
rarray ++ ;
158
- array -= ndarray -> strides [ _shape_strides .index ] * ndarray -> shape [ _shape_strides .index ];
158
+ array -= _shape_strides .strides [ 0 ] * _shape_strides .shape [ 0 ];
159
159
array += _shape_strides .strides [ULAB_MAX_DIMS - 1 ];
160
160
k ++ ;
161
161
} while (k < _shape_strides .shape [ULAB_MAX_DIMS - 1 ]);
162
162
#endif
163
163
#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 ];
165
165
array += _shape_strides .strides [ULAB_MAX_DIMS - 2 ];
166
166
j ++ ;
167
167
} while (j < _shape_strides .shape [ULAB_MAX_DIMS - 2 ]);
168
168
#endif
169
169
#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 ];
171
171
array += _shape_strides .strides [ULAB_MAX_DIMS - 3 ];
172
172
i ++ ;
173
173
} while (i < _shape_strides .shape [ULAB_MAX_DIMS - 3 ])
0 commit comments