summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--print.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/print.c b/print.c
index 1d0856d..409de45 100644
--- a/print.c
+++ b/print.c
@@ -76,7 +76,7 @@ pparray(Array *a)
int j = 1;
int spaceprinted = 0;
for(int dim = 0; dim < a->rank && i+1 != a->size; dim++){
- j *= a->shape[dim];
+ j *= a->shape[a->rank-dim-1];
tmp = res;
if((i+1)%j == 0){
spaceprinted = 1;