Skip to content

Commit 0e58a83

Browse files
Jeffrey WhitakerJeffrey Whitaker
authored andcommitted
update
1 parent 9252b35 commit 0e58a83

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/netCDF4/utils.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -426,9 +426,10 @@ def _StartCountStride(elem, shape, dimensions=None, grp=None, datashape=None,\
426426

427427
# ITERABLE #
428428
elif np.iterable(e) and np.array(e).dtype.kind in 'i': # Sequence of integers
429-
print(i, elem, e, sdim)
430-
start[...,i] = np.apply_along_axis(lambda x: e*x, i, np.ones(sdim[:-1]))
431-
print(start[...,i])
429+
if e:
430+
start[...,i] = np.apply_along_axis(lambda x: e*x, i, np.ones(sdim[:-1]))
431+
else:
432+
start[...,i] = e
432433
indices[...,i] = np.apply_along_axis(lambda x: np.arange(sdim[i])*x, i, np.ones(sdim[:-1], int))
433434

434435
count[...,i] = 1

0 commit comments

Comments
 (0)