(self, dtype=None, copy=None)
| 318 | self._array = np.asanyarray(array) |
| 319 | |
| 320 | def __array__(self, dtype=None, copy=None): |
| 321 | if dtype is not None and dtype != self._array.dtype: |
| 322 | if copy is not None and not copy: |
| 323 | raise ValueError( |
| 324 | f"Converting array from {self._array.dtype} to " |
| 325 | f"{dtype} requires a copy" |
| 326 | ) |
| 327 | |
| 328 | arr = np.asarray(self._array, dtype=dtype) |
| 329 | return (arr if not copy else np.copy(arr)) |
| 330 | |
| 331 | @property |
| 332 | def shape(self): |