File tree 1 file changed +4
-2
lines changed 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2226,7 +2226,6 @@ PyUFunc_GeneralizedFunction(PyUFuncObject *ufunc,
2226
2226
2227
2227
/* Fill in op_axes for all the operands */
2228
2228
j = broadcast_ndim ;
2229
- core_dim_ixs_size = 0 ;
2230
2229
for (i = 0 ; i < nop ; ++ i ) {
2231
2230
int n ;
2232
2231
if (op [i ]) {
@@ -2268,7 +2267,6 @@ PyUFunc_GeneralizedFunction(PyUFuncObject *ufunc,
2268
2267
}
2269
2268
2270
2269
op_axes [i ] = op_axes_arrays [i ];
2271
- core_dim_ixs_size += ufunc -> core_num_dims [i ];
2272
2270
}
2273
2271
2274
2272
/* Get the buffersize and errormask */
@@ -2383,6 +2381,10 @@ PyUFunc_GeneralizedFunction(PyUFuncObject *ufunc,
2383
2381
* Set up the inner strides array. Because we're not doing
2384
2382
* buffering, the strides are fixed throughout the looping.
2385
2383
*/
2384
+ core_dim_ixs_size = 0 ;
2385
+ for (i = 0 ; i < nop ; ++ i ) {
2386
+ core_dim_ixs_size += ufunc -> core_num_dims [i ];
2387
+ }
2386
2388
inner_strides = (npy_intp * )PyArray_malloc (
2387
2389
NPY_SIZEOF_INTP * (nop + core_dim_ixs_size ));
2388
2390
if (inner_strides == NULL ) {
You can’t perform that action at this time.
0 commit comments