Skip to content

Commit 09d8f29

Browse files
committed
Fixes to arange
1 parent d6975a1 commit 09d8f29

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/blosc2/ndarray.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3706,15 +3706,14 @@ def arange_fill(inputs, output, offset):
37063706
else: # use linspace to have finer control over exclusion of endpoint for float types
37073707
output[:] = np.linspace(start, stop, lout, endpoint=False, dtype=output.dtype)
37083708

3709-
NUM = int((stop - start) / step)
3710-
37113709
if step is None: # not array-api compliant but for backwards compatibility
37123710
step = 1
37133711
if stop is None:
37143712
stop = start
37153713
start = 0
3714+
NUM = int((stop - start) / step)
37163715
if shape is None:
3717-
shape = (max(NUM, 0),)
3716+
shape = (builtins.max(NUM, 0),)
37183717
else:
37193718
# Check that the shape is consistent with the start, stop and step values
37203719
if math.prod(shape) != NUM:

0 commit comments

Comments
 (0)