summaryrefslogtreecommitdiff
path: root/numpy/lib/twodim_base.py
diff options
context:
space:
mode:
authorJulian Taylor <jtaylor.debian@googlemail.com>2014-07-24 23:44:50 +0200
committerJulian Taylor <jtaylor.debian@googlemail.com>2014-07-27 21:12:57 +0200
commit91369d30a13dcc6484f27195d73e6ea9ba2edd2d (patch)
treefd544500c21793fdadc689d21960636fd6b7e447 /numpy/lib/twodim_base.py
parente04e79ae2cef411ff0ae26ca6089a5ac4f249021 (diff)
downloadnumpy-91369d30a13dcc6484f27195d73e6ea9ba2edd2d.tar.gz
ENH: add a ndarray super-fast path to _array_from_object
When the argument is exactly an ndarray and the rest of the arguments are their defaults we can skip the very slow PyArg_ParseTupleAndKeywords. This improves np.array(ndarray, copy=False) performance by about a factor three and np.asarray(ndarray) by about a factor of two.
Diffstat (limited to 'numpy/lib/twodim_base.py')
0 files changed, 0 insertions, 0 deletions