[Numpy-svn] [numpy/numpy] a80946: ENH: speed-up of triangular matrix functions
GitHub
noreply at github.com
Wed Mar 26 17:17:07 EDT 2014
Branch: refs/heads/master
Home: https://github.com/numpy/numpy
Commit: a80946d77e6b488189024d14667d3fe191bdb2f8
https://github.com/numpy/numpy/commit/a80946d77e6b488189024d14667d3fe191bdb2f8
Author: jaimefrio <jaime.frio at gmail.com>
Date: 2014-03-25 (Tue, 25 Mar 2014)
Changed paths:
M numpy/lib/tests/test_twodim_base.py
M numpy/lib/twodim_base.py
Log Message:
-----------
ENH: speed-up of triangular matrix functions
* `np.tri` now produces less intermediate arrays. Runs about 40% faster for
general dtypes, up to 3x faster for boolean arrays.
* `np.tril` now does smarter type conversions (thanks Julian!), and together
with the improvements in `np.tri` now runs about 30% faster. `np.triu`
runs almost 2x faster than before, but still runs 20% slower than
`np.tril`, which is an improvement over the 50% difference before.
* `np.triu_indices` and `np.tril_indices` do not call `np.mask_indices`,
instead they call `np.where` directly on a boolean array created with
`np.tri`. They now run roughly 2x faster.
* Removed the constraint for the array to be square in calls to
`np.triu_indices`, `np.tril_indices`, `np.triu_indices_from` and
`np.tril_indices_from`.
Commit: 73959002924a43893f16c7ed6e138519bbb24424
https://github.com/numpy/numpy/commit/73959002924a43893f16c7ed6e138519bbb24424
Author: Julian Taylor <juliantaylor108 at gmail.com>
Date: 2014-03-26 (Wed, 26 Mar 2014)
Changed paths:
M numpy/lib/tests/test_twodim_base.py
M numpy/lib/twodim_base.py
Log Message:
-----------
Merge pull request #4509 from jaimefrio/twodim-speedup
ENH: speed-up of triangular matrix functions
Compare: https://github.com/numpy/numpy/compare/8e47f39f7afb...73959002924a
More information about the Numpy-svn
mailing list