Method
_new
(
self,
dims=_default,
data=_default,
attrs=_default,
)
Source from the content-addressed store, hash-verified
| 404 | self.encoding = encoding |
| 405 | |
| 406 | def _new( |
| 407 | self, |
| 408 | dims=_default, |
| 409 | data=_default, |
| 410 | attrs=_default, |
| 411 | ): |
| 412 | dims_ = copy.copy(self._dims) if dims is _default else dims |
| 413 | |
| 414 | if attrs is _default: |
| 415 | attrs_ = None if self._attrs is None else self._attrs.copy() |
| 416 | else: |
| 417 | attrs_ = attrs |
| 418 | |
| 419 | if data is _default: |
| 420 | return type(self)(dims_, copy.copy(self._data), attrs_) |
| 421 | else: |
| 422 | cls_ = type(self) |
| 423 | return cls_(dims_, data, attrs_) |
| 424 | |
| 425 | @property |
| 426 | def _in_memory(self) -> bool: |
Tested by
no test coverage detected