summaryrefslogtreecommitdiff
path: root/numpy/core/fromnumeric.py
diff options
context:
space:
mode:
authorAlexander Blinne <alexander.blinne@uni-jena.de>2019-05-21 19:02:35 +0200
committerSebastian Berg <sebastian@sipsolutions.net>2019-05-21 10:02:35 -0700
commit504b287bdf4745256044f336f17c88ddcb0175dd (patch)
treef336cec06e07f439ff619632b75f11ab9ada3f10 /numpy/core/fromnumeric.py
parent73e545e8ab277c2baef7c025b1df21496ccce7c1 (diff)
downloadnumpy-504b287bdf4745256044f336f17c88ddcb0175dd.tar.gz
ENH: Add sparse option to np.core.numeric.indices (#13506)
This adds a sparse keyword-option to np.core.numeric.indices. This is inspired by the same option in the np.meshgrid function. The same functionality can in principle already be achieved by using the np.ogrid index tricks like this: def indices_sparse(dimensions): return np.ogrid[tuple(slice(0, l) for l in dimensions)] However, the implementation of ogrid is much more complicated than the simple change to np.core.numeric.indices in this PR (gh-13506).
Diffstat (limited to 'numpy/core/fromnumeric.py')
0 files changed, 0 insertions, 0 deletions