summaryrefslogtreecommitdiff
path: root/numpy/_array_api/_creation_functions.py
diff options
context:
space:
mode:
authorAaron Meurer <asmeurer@gmail.com>2021-07-16 15:03:05 -0600
committerAaron Meurer <asmeurer@gmail.com>2021-07-16 15:03:05 -0600
commit7c5380d61e31db60f44bdc86047c71f2b1f63458 (patch)
tree4595d42ae52aa011c7460fb9fc3b4cd30fc765fd /numpy/_array_api/_creation_functions.py
parent56345ffb82af39149f7cdf8720089e0ba42e798c (diff)
downloadnumpy-7c5380d61e31db60f44bdc86047c71f2b1f63458.tar.gz
Remove an unnecessary indexing
Diffstat (limited to 'numpy/_array_api/_creation_functions.py')
-rw-r--r--numpy/_array_api/_creation_functions.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/_array_api/_creation_functions.py b/numpy/_array_api/_creation_functions.py
index 24d28a3fa..e8c88d9b5 100644
--- a/numpy/_array_api/_creation_functions.py
+++ b/numpy/_array_api/_creation_functions.py
@@ -97,7 +97,7 @@ def full(shape: Union[int, Tuple[int, ...]], fill_value: Union[int, float], *, d
# Note: Device support is not yet implemented on Array
raise NotImplementedError("Device support is not yet implemented")
if isinstance(fill_value, Array) and fill_value.ndim == 0:
- fill_value = fill_value._array[...]
+ fill_value = fill_value._array
res = np.full(shape, fill_value, dtype=dtype)
if res.dtype not in _all_dtypes:
# This will happen if the fill value is not something that NumPy