summaryrefslogtreecommitdiff
path: root/astroid/brain
diff options
context:
space:
mode:
authorDani Alcala <112832187+clavedeluna@users.noreply.github.com>2022-12-30 11:39:58 -0300
committerGitHub <noreply@github.com>2022-12-30 15:39:58 +0100
commit8c681f03b79c7b8d1d9273a39584fd72d5785880 (patch)
treec0c2bce21bc3dcf0c9a123de7a90f05a0bb8f02f /astroid/brain
parent380e88610346a957d22f1c0194ce622db647782a (diff)
downloadastroid-git-8c681f03b79c7b8d1d9273a39584fd72d5785880.tar.gz
brain tip for numpy masked_invalid (#1931)
* brain tip for numpy masked_invalid * add unit test * refactor tests and update changelog * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Diffstat (limited to 'astroid/brain')
-rw-r--r--astroid/brain/brain_numpy_ma.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/astroid/brain/brain_numpy_ma.py b/astroid/brain/brain_numpy_ma.py
index 241665c4..f1a7aa0b 100644
--- a/astroid/brain/brain_numpy_ma.py
+++ b/astroid/brain/brain_numpy_ma.py
@@ -11,7 +11,7 @@ from astroid.manager import AstroidManager
def numpy_ma_transform():
"""
- Infer the call of the masked_where function
+ Infer the call of various numpy.ma functions
:param node: node to infer
:param context: inference context
@@ -21,6 +21,9 @@ def numpy_ma_transform():
import numpy.ma
def masked_where(condition, a, copy=True):
return numpy.ma.masked_array(a, mask=[])
+
+ def masked_invalid(a, copy=True):
+ return numpy.ma.masked_array(a, mask=[])
"""
)