diff options
| author | default-303 <ajayds2001@gmail.com> | 2021-05-26 07:29:49 +0530 |
|---|---|---|
| committer | default-303 <ajayds2001@gmail.com> | 2021-05-26 07:29:49 +0530 |
| commit | 115ed1d8d5432ff4307d1e07819fec33bb72755c (patch) | |
| tree | 96819ebf197f11f6f1c2237daf2b6544a1923498 /numpy/ma | |
| parent | b3e54cc7ea0808642829b9aa71fa8e51dcc6050e (diff) | |
| download | numpy-115ed1d8d5432ff4307d1e07819fec33bb72755c.tar.gz | |
MAINT: Removed suitable unused variables shown in LGTM
Diffstat (limited to 'numpy/ma')
| -rw-r--r-- | numpy/ma/core.py | 2 | ||||
| -rw-r--r-- | numpy/ma/extras.py | 1 | ||||
| -rw-r--r-- | numpy/ma/mrecords.py | 2 |
3 files changed, 0 insertions, 5 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py index 4c204cac2..fdc7f9e83 100644 --- a/numpy/ma/core.py +++ b/numpy/ma/core.py @@ -2842,8 +2842,6 @@ class MaskedArray(ndarray): # Backwards compatibility w/ numpy.core.ma. if hasattr(data, '_mask') and not isinstance(data, ndarray): _data._mask = data._mask - # FIXME _sharedmask is never used. - _sharedmask = True # Process mask. # Type of the mask mdtype = make_mask_descr(_data.dtype) diff --git a/numpy/ma/extras.py b/numpy/ma/extras.py index c139f4640..73abfc296 100644 --- a/numpy/ma/extras.py +++ b/numpy/ma/extras.py @@ -743,7 +743,6 @@ def _median(a, axis=None, out=None, overwrite_input=False): return np.ma.mean(asorted[indexer], axis=axis, out=out) if asorted.ndim == 1: - counts = count(asorted) idx, odd = divmod(count(asorted), 2) mid = asorted[idx + odd - 1:idx + 1] if np.issubdtype(asorted.dtype, np.inexact) and asorted.size > 0: diff --git a/numpy/ma/mrecords.py b/numpy/ma/mrecords.py index 9ea4e4e36..6814931b0 100644 --- a/numpy/ma/mrecords.py +++ b/numpy/ma/mrecords.py @@ -129,7 +129,6 @@ class MaskedRecords(MaskedArray): msg = "Mask and data not compatible: data size is %i, " + \ "mask size is %i." raise MAError(msg % (nd, nm)) - copy = True if not keep_mask: self.__setmask__(mask) self._sharedmask = True @@ -376,7 +375,6 @@ class MaskedRecords(MaskedArray): try: if issubclass(dtype, ndarray): output = ndarray.view(self, dtype) - dtype = None else: output = ndarray.view(self, dtype) # OK, there's the change |
