summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2022-09-17 12:01:44 -0600
committerGitHub <noreply@github.com>2022-09-17 12:01:44 -0600
commitb7c2f078fa7dc31b91afa683d711a72c1d6af207 (patch)
tree55ced7dbea4223c90debc718d5cadbb3a10984ff
parent1d556d97b20d9a6e1d6fa4dbfd6672e4b2bedeff (diff)
downloadnumpy-b7c2f078fa7dc31b91afa683d711a72c1d6af207.tar.gz
BUG: Import ``numpy.ma`` at beginning of examples.
-rw-r--r--numpy/ma/extras.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/numpy/ma/extras.py b/numpy/ma/extras.py
index 85a6bc4cb..4e7f8e85e 100644
--- a/numpy/ma/extras.py
+++ b/numpy/ma/extras.py
@@ -1106,6 +1106,7 @@ def unique(ar1, return_index=False, return_inverse=False):
Examples
--------
+ >>> import numpy.ma as ma
>>> a = [1, 2, 1000, 2, 3]
>>> mask = [0, 0, 1, 0, 0]
>>> masked_a = ma.masked_array(a, mask)