summaryrefslogtreecommitdiff
path: root/numpy/lib/function_base.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r--numpy/lib/function_base.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
index 9bc128f92..844c069c0 100644
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -1779,7 +1779,7 @@ def place(arr, mask, vals):
Parameters
----------
- arr : array_like
+ arr : ndarray
Array to put data into.
mask : array_like
Boolean mask array. Must have the same size as `a`.
@@ -1801,6 +1801,10 @@ def place(arr, mask, vals):
[44, 55, 44]])
"""
+ if not isinstance(arr, np.ndarray):
+ raise TypeError("argument 1 must be numpy.ndarray, "
+ "not {name}".format(name=type(arr).__name__))
+
return _insert(arr, mask, vals)