We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2855133 commit 75b8c59Copy full SHA for 75b8c59
array_api_strict/_array_object.py
@@ -167,10 +167,10 @@ def __repr__(self) -> str:
167
def __buffer__(self, flags):
168
if self._device != CPU_DEVICE:
169
raise RuntimeError(f"Can not convert array on the '{self._device}' device to a Numpy array.")
170
- return memoryview(self._array)
+ return self._array.__buffer__(flags)
171
+
172
def __release_buffer__(self, buffer):
- # XXX anything to do here?
173
- pass
+ self._array.__release_buffer__()
174
175
def __array__(self, *args, **kwds):
176
# a stub for python < 3.12; otherwise numpy silently produces object arrays
0 commit comments