Skip to content

Commit

Permalink
Catch Xarray dimension inconsistencies
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisHeimbigner committed Sep 4, 2022
1 parent 7e48f2a commit 00a80ec
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libnczarr/zsync.c
Original file line number Diff line number Diff line change
Expand Up @@ -2163,9 +2163,12 @@ parsedimrefs(NC_FILE_INFO_T* file, NClist* dimnames, size64_t* shape, NC_DIM_INF
/* If not found and create then create it */
if((stat = createdim(file, dimname, shape[i], &dims[i])))
goto done;
} else {
/* Verify consistency */
if(dims[i]->len != shape[i])
{stat = NC_EDIMSIZE; goto done;}
}
assert(dims[i] != NULL);
assert(dims[i]->len == shape[i]);
}
done:
nclistfreeall(segments);
Expand Down

0 comments on commit 00a80ec

Please sign in to comment.