Skip to content

Commit

Permalink
Fix newer error
Browse files Browse the repository at this point in the history
  • Loading branch information
callumforrester committed Aug 19, 2024
1 parent 2527d04 commit 89c18c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scanspec/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ def __init__(
self.lengths = np.array([len(f) for f in stack])
#: Index of the end frame, one more than the last index that will be
#: produced
self.end_index = np.prod(self.lengths)
self.end_index = int(np.prod(self.lengths))
if num is not None and start + num < self.end_index:
self.end_index = start + num

Expand Down Expand Up @@ -616,7 +616,7 @@ def consume(self, num: int | None = None) -> Frames[Axis]:

def __len__(self) -> int:
"""Number of frames left in a scan, reduces when `consume` is called."""
return int(self.end_index - self.index)
return self.end_index - self.index


class Midpoints(Generic[Axis]):
Expand Down

0 comments on commit 89c18c0

Please sign in to comment.