Skip to content

Commit 96fe29d

Browse files
committed
found copy-paster errors in diff macro
1 parent e387404 commit 96fe29d

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

code/numerical/numerical.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -365,13 +365,13 @@ extern mp_obj_module_t ulab_numerical_module;
365365
(rarray) -= (results)->strides[ULAB_MAX_DIMS - 1] * (results)->shape[ULAB_MAX_DIMS - 1];\
366366
(rarray) += (results)->strides[ULAB_MAX_DIMS - 2];\
367367
l++;\
368-
} while(l < (shape)[ULAB_MAX_DIMS - 2]);\
369-
(array) -= (ndarray)->[ULAB_MAX_DIMS - 2] * (results)->shape[ULAB_MAX_DIMS-2];\
370-
(array) += (ndarray)->[ULAB_MAX_DIMS - 3];\
368+
} while(l < (results)->shape[ULAB_MAX_DIMS - 2]);\
369+
(array) -= (ndarray)->strides[ULAB_MAX_DIMS - 2] * (results)->shape[ULAB_MAX_DIMS-2];\
370+
(array) += (ndarray)->strides[ULAB_MAX_DIMS - 3];\
371371
(rarray) -= (results)->strides[ULAB_MAX_DIMS - 2] * (results)->shape[ULAB_MAX_DIMS - 2];\
372372
(rarray) += (results)->strides[ULAB_MAX_DIMS - 3];\
373373
k++;\
374-
} while(k < (shape)[ULAB_MAX_DIMS - 3]);\
374+
} while(k < (results)->shape[ULAB_MAX_DIMS - 3]);\
375375
} while(0)
376376

377377
#define HEAPSORT(ndarray, type, array, shape, strides, index, increment, N) do {\
@@ -511,19 +511,19 @@ extern mp_obj_module_t ulab_numerical_module;
511511
(rarray) -= (results)->strides[ULAB_MAX_DIMS - 1] * (results)->shape[ULAB_MAX_DIMS - 1];\
512512
(rarray) += (results)->strides[ULAB_MAX_DIMS - 2];\
513513
l++;\
514-
} while(l < (shape)[ULAB_MAX_DIMS - 2]);\
515-
(array) -= (strides)[ULAB_MAX_DIMS - 2] * (shape)[ULAB_MAX_DIMS-2];\
516-
(array) += (strides)[ULAB_MAX_DIMS - 3];\
514+
} while(l < (results)->shape[ULAB_MAX_DIMS - 2]);\
515+
(array) -= (ndarray)->strides[ULAB_MAX_DIMS - 2] * (results)->shape[ULAB_MAX_DIMS-2];\
516+
(array) += (ndarray)->strides[ULAB_MAX_DIMS - 3];\
517517
(rarray) -= (results)->strides[ULAB_MAX_DIMS - 2] * (results)->shape[ULAB_MAX_DIMS - 2];\
518518
(rarray) += (results)->strides[ULAB_MAX_DIMS - 3];\
519519
k++;\
520-
} while(k < (shape)[ULAB_MAX_DIMS - 3]);\
521-
(array) -= (strides)[ULAB_MAX_DIMS - 3] * (shape)[ULAB_MAX_DIMS-3];\
522-
(array) += (strides)[ULAB_MAX_DIMS - 4];\
520+
} while(k < (results)->shape[ULAB_MAX_DIMS - 3]);\
521+
(array) -= (ndarray)->strides[ULAB_MAX_DIMS - 3] * (results)->shape[ULAB_MAX_DIMS-3];\
522+
(array) += (ndarray)->strides[ULAB_MAX_DIMS - 4];\
523523
(rarray) -= (results)->strides[ULAB_MAX_DIMS - 3] * (results)->shape[ULAB_MAX_DIMS - 3];\
524524
(rarray) += (results)->strides[ULAB_MAX_DIMS - 4];\
525525
j++;\
526-
} while(j < (shape)[ULAB_MAX_DIMS - 4]);\
526+
} while(j < (results)->shape[ULAB_MAX_DIMS - 4]);\
527527
} while(0)
528528

529529
#define HEAPSORT(ndarray, type, array, shape, strides, index, increment, N) do {\

0 commit comments

Comments
 (0)