diff options
author | pierregm <pierregm@localhost> | 2009-05-13 22:24:09 +0000 |
---|---|---|
committer | pierregm <pierregm@localhost> | 2009-05-13 22:24:09 +0000 |
commit | 673de279532eaf153ac97449b0c81a5c4b239ef3 (patch) | |
tree | a59aff8c7f3c78ca260dd2086f2e208dd1e4dbea /numpy/setup.py | |
parent | fef030ee54c9b2bf4ad510766038fa288dce6014 (diff) | |
download | numpy-673de279532eaf153ac97449b0c81a5c4b239ef3.tar.gz |
* getdata : prevent unnecessary copies (thx to Eric Firing)
* _Domained/MaskedUnary/BinaryOperations: optimization by preventing the use of np.where and the calculation of domain.
Here's the catch: we're basically cheating. We force np.seterr(divide='ignore',invalid='ignore') before computing the results, then mask the invalid values (if any) and reset the corresponding entries in .data to the input. Finally, we reset the error status. This playing around with the error status may (or may not) fail in multi-thread. It's still faaar faster than computing the domain (especially _DomainSafeDivide) when the inputs are large...
Diffstat (limited to 'numpy/setup.py')
0 files changed, 0 insertions, 0 deletions