Skip to content

Commit 934af52

Browse files
committed
Handle 0 shape arrays too
1 parent 809b082 commit 934af52

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

blosc/b2nd.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,11 @@ int b2nd_get_slice_nchunks(const b2nd_array_t *array, const int64_t *start, cons
616616

617617
int8_t ndim = array->ndim;
618618

619+
if (array->nitems == 0){
620+
*chunks_idx = malloc(0);
621+
return 0;
622+
}
623+
619624
// 0-dim case
620625
if (ndim == 0) {
621626
*chunks_idx = malloc(1 * sizeof(int64_t));

0 commit comments

Comments
 (0)