| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
Currently, copy.deepcopy() on certain objects in scikit-learn results
in the copied object being broken, as underlying methods depend on
members being F-contiguous. I can think of no reason that F-contiguous
arrays should not remain F-contiguous through a copy.copy/copy.deepcopy,
therefore this alters the methods to use NPY_KEEPORDER when allocating
the copy.
|
|\
| |
| | |
DOC: fix comments in min and ptp.
|
| | |
|
|\ \
| | |
| | | |
DOC: Clarify and add C-compatible integer types to list of dtypes
|
| | |
| | |
| | |
| | |
| | | |
Also mention np.intp, which at least personally I think is not an
unimportant type.
|
| | |
| | |
| | |
| | |
| | |
| | | |
SIMD functions are called via a minimal dispatcher function.
Minizes extra code in loops.c.src and hopefully transparently allows to
simply enable more complex (runtime) dispatching rules.
|
| | | |
|
| | |
| | |
| | |
| | | |
allows simple extension to AVX
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
fabs on x86 can be implemented by masking out the sign bit.
Obtaining such a bit pattern is best done by a bitwise not on the
negative zero.
This is the same operation the compiler will convert fabs to on amd64.
Improves performance by ~1.7/3.5 for float/double for cached data
and ~1.4/1.1 for non-cached data.
If one simplifies the loops gcc could also autovectorize it but with all
hints its almost the same code length and slightly worse assembly.
The code can easily be extended to support AVX by changing vpre and
vtype to 256.
|
| | | |
|
| |/
|/|
| |
| |
| |
| | |
i386 does not have 16 byte long double by default (only 12 byte/float96)
so the import prevents numpy startup.
Introduced in 1.8.0dev 40000f508
|
| |
| |
| |
| | |
enables a few extra tests
|
| | |
|
|\ \
| | |
| | | |
ENH: linalg: Add an `axis` argument to linalg.norm
|
| | |
| | |
| | |
| | | |
tweak the norm function's docstring.
|
| | | |
|
| | |
| | |
| | |
| | | |
which case matrix norms of the collection of 2-D matrices are computed.
|
| | | |
|
| | | |
|
| |/
| |
| |
| |
| | |
Also fixed a bug that occurred with integer arrays and negative ord. For example,
norm([1, 3], -1) returned 1.0, but the correct value is 0.75.
|
| |
| |
| |
| | |
Addresses part of gh-3399.
|
|/
|
|
|
| |
Was overlooked as loops.c.src where np.isnan lives includes it directly.
Now all isnan calls in numpy profit from the improvement.
|
|
|
|
|
| |
introduced in 1.8.0dev 914294a42a
closes gh-3384
|
| |
|
|
|
|
|
| |
some cpus don't support loads that are not aligned to the elementsize.
regression introduced in 99cb95f7379a9.
|
|
|
|
|
| |
removes some duplication and allows older gcc that can't detect the
byteswap pattern to use the faster swapping instructions.
|
|
|
|
|
|
|
|
| |
The custom build compiler "GNU Fortran (rubenvb-4.8.0) 4.8.0" was
incorrectly parsed as version '-4.8.0' and the flag "-mno-cygwin" was
added to the compilation.
See http://cens.ioc.ee/pipermail/f2py-users/2010-October/002092.html.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Correct the implementation of the npv function, its documentation, and
the mirr function that depends on it. The test_financial.py is also
corrected to take into account those modifications
The npv function behavior was contrary to what the documentation stated
as it summed indexes 1 to M instead of 0 to M-1. The mirr function used
a corrective factor to get the correct result in spite of that error so
that factor is removed.
Closes #649
|
|\
| |
| | |
ENH: Fix SyntaxError when matrix() is called with invalid string
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The numpy.matrix constructor uses eval(str.translate(table)) to convert
input strings to numeric matrix contents. str.translate(table) will
return empty string if str consists only of invalid characters, causing
SyntaxError in eval(). This is confusing, as one would expect an
exception like TypeError when trying to construct a matrix from invalid
input.
This fix makes sure eval() is only called if str is not empty and
TypeError is raised otherwise.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
memmap needs to call it in __array_finalize__ to determine if it can
drop the references on copies.
The python version if may_share_memory caused significant slowdowns when
slicing these maps.
closes gh-3364
|
| |
| |
| |
| | |
See doc/TESTS.rst.txt for the reason.
|
| |
| |
| |
| | |
Ensure that the multivariate_normal size argument can be a numpy integer. Add regression test. Apply PEP8 to test_regression.py. Regenerate mtrand.c.
|
|\ \
| | |
| | | |
DOC: Correcting docstring for asscalar
|
| | | |
|
|\ \ \
| | | |
| | | | |
TST: rename 2nd test_hypergeometric_range function
|
| | | |
| | | |
| | | | |
See doc/TESTS.rst.txt for the reason.
|
| | | |
| | | |
| | | | |
There are two test functions named `test_hypergeometric_range`
|
|/ / / |
|
| | |
| | |
| | |
| | | |
Closes gh-3302
|
|\ \ \
| | | |
| | | | |
vectorize sqrt ufunc with SSE2
|
| | | | |
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
specialize the sqrt ufunc for float and double and vectorize it using
SSE2.
improves performance by 4/2 for float/double if one is not memory bound
due to non-cached data.
performance is always better on all tested machines (amd phenom X2,
intel xeon 5xxx/7xxx, core2duo, corei7)
This version will not set errno on invalid input, but numpy only checks
the fpu flags so the behavior is the same.
In principle the compiler could autovectorize it when setting ffast-math
(for no errno) and specializing the loop for the vectorizable strides
and giving it some hints (restrict, __builtin_assume_aligned, etc.),
but its simpler and more reliable to simply vectorize it by hand.
|
| |/
|/|
| |
| |
| | |
implicit declarations, wrong declarations, unused variables and fixes a
comparison typo bug in multiarraymodule.c
|
|\ \
| |/
|/| |
Make comparison function (gt, ge, ...) respect __array_priority__.
|