Skip to content

Commit

Permalink
Fix numpy
Browse files Browse the repository at this point in the history
  • Loading branch information
ranlu committed Nov 30, 2023
1 parent e5c023f commit b9ed8e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/cut_chunk_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def cut_data(data, start_coord, end_coord, padding):
bb = tuple(slice(start_coord[i], end_coord[i]) for i in range(3))
if data.shape[3] == 1:
if data.dtype == 'float32':
pmap = np.squeeze(data[bb])
affinity = [np.minimum(np.roll(pmap, shift=1, axis=axis), pmap) for axis in range(3)]
pmap = numpy.squeeze(data[bb])
affinity = [numpy.minimum(numpy.roll(pmap, shift=1, axis=axis), pmap) for axis in range(3)]
return pad_data(numpy.stack(affinity, axis=-1), padding)
else:
return pad_data(data[bb], padding)
Expand Down

0 comments on commit b9ed8e7

Please sign in to comment.