| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Also removed old (commented) macro, the use of PyNumber_Index is
now actually implemented in PyIntAsIntp and not necessary here.
Removes PyIndex_Check compatibility macros, since we do not support
python < 2.5 anymore.
Change integer conversion error to IndexError, previously these
fell through and eventually became an IndexError.
|
| | |
| | |
| | |
| | |
| | |
| | | |
For example NumPy indexing treats np.ones(()) very differently from
np.ones((1,)). It seems a bad idea to allow __index__ for arrays that
are not 0-d, as they cannot always be safely interpreted as integers.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This changes the conversion utils to give deprecations for a all
non-integers (this currently includes python bools). The biggest
change is PyArray_PyIntAsIntp in which the deprecation is done.
Some other conversions are then also pointed to it.
Uses the Index machinery even for numpy types, which is faster
then the current code.
|
| | |
| | |
| | |
| | | |
Following deprecations would cause problems otherwise.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|