Return each element rounded to the given number of decimals. Refer to `numpy.around` for full documentation. See Also -------- numpy.ndarray.round : corresponding function for ndarrays numpy.around : equivalent function
(self, decimals=0, out=None)
| 5484 | return dvar |
| 5485 | |
| 5486 | def round(self, decimals=0, out=None): |
| 5487 | """ |
| 5488 | Return each element rounded to the given number of decimals. |
| 5489 | |
| 5490 | Refer to `numpy.around` for full documentation. |
| 5491 | |
| 5492 | See Also |
| 5493 | -------- |
| 5494 | numpy.ndarray.round : corresponding function for ndarrays |
| 5495 | numpy.around : equivalent function |
| 5496 | """ |
| 5497 | result = self._data.round(decimals=decimals, out=out).view(type(self)) |
| 5498 | if result.ndim > 0: |
| 5499 | result._mask = self._mask |
| 5500 | result._update_from(self) |
| 5501 | elif self._mask: |
| 5502 | # Return masked when the scalar is masked |
| 5503 | result = masked |
| 5504 | # No explicit output: we're done |
| 5505 | if out is None: |
| 5506 | return result |
| 5507 | if isinstance(out, MaskedArray): |
| 5508 | out.__setmask__(self._mask) |
| 5509 | return out |
| 5510 | |
| 5511 | def argsort(self, axis=np._NoValue, kind=None, order=None, |
| 5512 | endwith=True, fill_value=None): |