summaryrefslogtreecommitdiff
path: root/numpy/core/numeric.py
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2020-01-06 18:18:57 +0200
committerGitHub <noreply@github.com>2020-01-06 18:18:57 +0200
commit682177360bff78786d8d45bb9203839c4ad44357 (patch)
tree7bcb6186447565adff24837cc6529b74564b4520 /numpy/core/numeric.py
parentb66864cfcaf0875f80bf68ccbd0cbbaaabc94f85 (diff)
parentb6379539924568dad725f2ecc820477685f8d938 (diff)
downloadnumpy-682177360bff78786d8d45bb9203839c4ad44357.tar.gz
Merge pull request #15256 from eric-wieser/use-keyword-only-arguments
MAINT: Implement keyword-only arguments as syntax
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r--numpy/core/numeric.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py
index 505218a2e..f18ab6336 100644
--- a/numpy/core/numeric.py
+++ b/numpy/core/numeric.py
@@ -1716,7 +1716,7 @@ def indices(dimensions, dtype=int, sparse=False):
@set_module('numpy')
-def fromfunction(function, shape, **kwargs):
+def fromfunction(function, shape, *, dtype=float, **kwargs):
"""
Construct an array by executing a function over each coordinate.
@@ -1767,7 +1767,6 @@ def fromfunction(function, shape, **kwargs):
[2, 3, 4]])
"""
- dtype = kwargs.pop('dtype', float)
args = indices(shape, dtype=dtype)
return function(*args, **kwargs)