diff options
Diffstat (limited to 'numpy/ma/core.py')
| -rw-r--r-- | numpy/ma/core.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py index 472b04429..a06971d6a 100644 --- a/numpy/ma/core.py +++ b/numpy/ma/core.py @@ -6253,6 +6253,12 @@ class MaskedConstant(MaskedArray): __iop__ del __iop__ # don't leave this around + def copy(self, *args, **kwargs): + """ Copy is a no-op on the maskedconstant, as it is a scalar """ + # maskedconstant is a scalar, so copy doesn't need to copy. There's + # precedent for this with `np.bool_` scalars. + return self + masked = masked_singleton = MaskedConstant() masked_array = MaskedArray |
