Performs the operation __float__.
(self: Array, /)
| 507 | return self.__class__._new(res) |
| 508 | |
| 509 | def __float__(self: Array, /) -> float: |
| 510 | """ |
| 511 | Performs the operation __float__. |
| 512 | """ |
| 513 | # Note: This is an error here. |
| 514 | if self._array.ndim != 0: |
| 515 | raise TypeError("float is only allowed on arrays with 0 dimensions") |
| 516 | if self.dtype in _complex_floating_dtypes: |
| 517 | raise TypeError("float is not allowed on complex floating-point arrays") |
| 518 | res = self._array.__float__() |
| 519 | return res |
| 520 | |
| 521 | def __floordiv__(self: Array, other: Union[int, float, Array], /) -> Array: |
| 522 | """ |
nothing calls this directly
no outgoing calls
no test coverage detected