Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion numpy_ringbuffer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ def is_full(self):
return len(self) == self._capacity

# numpy compatibility
def __array__(self):
def __array__(self, copy=True):
if not copy:
raise ValueError("Cannot create a numpy array without copying. Pass copy=True.")
return self._unwrap()

@property
Expand Down