(self, dtype=_NotPassed, type=_NotPassed)
| 505 | del _equality_check |
| 506 | |
| 507 | def view(self, dtype=_NotPassed, type=_NotPassed): |
| 508 | if type is _NotPassed and dtype not in (_NotPassed, self.dtype): |
| 509 | raise TypeError("Can't view LabelArray as another dtype.") |
| 510 | |
| 511 | # The text signature on ndarray.view makes it look like the default |
| 512 | # values for dtype and type are `None`, but passing None explicitly has |
| 513 | # different semantics than not passing an arg at all, so we reconstruct |
| 514 | # the kwargs dict here to simulate the args not being passed at all. |
| 515 | kwargs = {} |
| 516 | if dtype is not _NotPassed: |
| 517 | kwargs['dtype'] = dtype |
| 518 | if type is not _NotPassed: |
| 519 | kwargs['type'] = type |
| 520 | return super(LabelArray, self).view(**kwargs) |
| 521 | |
| 522 | def astype(self, |
| 523 | dtype, |
no outgoing calls