diff options
author | Ralf Gommers <ralf.gommers@gmail.com> | 2019-12-02 19:46:00 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-02 19:46:00 -0800 |
commit | 3a9a63f81aa37b48bc3eb4efdc2e695210805aa5 (patch) | |
tree | 7ee7391f2d7214878a56c76d2e4a2d42a835f65a /numpy/ma/core.py | |
parent | 7999f7c038a50d79b06edf2d45eb5ff2c25a5a42 (diff) | |
parent | 9b4d0ac95d178409d030a4c77651f8ed1d305dea (diff) | |
download | numpy-3a9a63f81aa37b48bc3eb4efdc2e695210805aa5.tar.gz |
Merge pull request #14794 from mattip/nep-0034-impl
DEP: issue deprecation warning when creating ragged array (NEP 34)
Diffstat (limited to 'numpy/ma/core.py')
-rw-r--r-- | numpy/ma/core.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py index 2baf547a4..5aced840a 100644 --- a/numpy/ma/core.py +++ b/numpy/ma/core.py @@ -2828,8 +2828,8 @@ class MaskedArray(ndarray): elif isinstance(data, (tuple, list)): try: # If data is a sequence of masked array - mask = np.array([getmaskarray(m) for m in data], - dtype=mdtype) + mask = np.array([getmaskarray(np.asanyarray(m, dtype=mdtype)) + for m in data], dtype=mdtype) except ValueError: # If data is nested mask = nomask |