summaryrefslogtreecommitdiff
path: root/numpy/ma/core.py
diff options
context:
space:
mode:
authorTyler Reddy <tyler.je.reddy@gmail.com>2023-02-24 22:04:33 -0700
committerTyler Reddy <tyler.je.reddy@gmail.com>2023-02-24 22:04:33 -0700
commit75dbe93dd9250d23eb37c6cb5883281647c66536 (patch)
treef3be8b9bf21719b8f88c012fe6878b7988444332 /numpy/ma/core.py
parent2282c6d8e6c9ea81e6e687c4bccb628d1b209adc (diff)
downloadnumpy-75dbe93dd9250d23eb37c6cb5883281647c66536.tar.gz
MAINT: PR 23269 revisions
* the deepcopy of masked array object type now also includes the components beyond just `_data`; add a related test case
Diffstat (limited to 'numpy/ma/core.py')
-rw-r--r--numpy/ma/core.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py
index 107687e8b..564b80517 100644
--- a/numpy/ma/core.py
+++ b/numpy/ma/core.py
@@ -6311,7 +6311,7 @@ class MaskedArray(ndarray):
# contain compound types--you cannot depend on normal
# copy semantics to do the right thing here
if self.dtype.hasobject:
- copied = deepcopy(self._data)
+ copied._data[:] = deepcopy(copied._data)
return copied