| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
see gh-4422
|
| |
|
|
|
|
| |
The function returns bytes not strings. This is relevant in python3.
|
|
|
|
| |
fixes gh-4730
|
| |
|
|
|
|
|
| |
Improves performance by using the simple indexing path and memory by
avoiding creating a full meshgrid.
|
|\
| |
| | |
ENH: apply_along_axis accepts named arguments
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When `x` has more than one element the condlist `[True, False]`
is being made equivalent to `[[True, False]]`, which is correct.
However, when `x` is zero dimensional the expected condlist is
`[[True], [False]]`: this commit addresses the issue. Besides,
the documentation stated that there could be undefined values
but actually these are 0 by default: using `nan` would be desirable,
but for the moment the docs were corrected. Closes #331.
|
|\ \
| | |
| | | |
MAINT: improve readablility of cross and improve test coverage
|
| | | |
|
|\ \ \
| | | |
| | | | |
BUG: improve log2 windows compiler fallback of log2
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fallback (similar to python3.4 math.log2) provides int(log(2**i)) == i
in default rounding mode.
Non-default rounding modes not tested but if it does not work we are at
least not worse than python.
Closes gh-4787
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
np.unique produces wrong results when passed a list of tuples and
no keyword arguments, as it fails to recognize it as a multidim
array, but handles it as a 1D array of objects. The only way around
this seems to be to completely eliminate the fast path for non-array
inputs using `set`.
|
|\ \
| | |
| | | |
BUG: Avoid double iterator deallocation in `ufunc_object.c`
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In `PyUFunc_GeneralizedFunction`, whenever a call to
`NpyIter_GetIterNext` fails, `NpyIter_Deallocate` is called twice, one
right after the error check, the second in the `goto fail`. Removed
the first one.
|
|\ \ \
| |/ /
|/| | |
ENH: use copyswap instead of memmove for flat assignment
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
improves d.flat = x performance by about 35% for basic types as the
copyswap functions have known elementsizes and these are implemented
optimally by the compiler while for the generic call the compiler needs
to call out to libc.
|
|\ \ \
| |/ /
|/| | |
BUG: fix where not filling string types properly
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
the copyswap part of where used the input arrays descriptions to copy
into the destination so if they had a smaller size the destination was
not properly padded with zeros.
Closes gh-4778
|
|/ /
| |
| |
| | |
closes gh-4774
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
The version check was not valid for python3, though the whole logic can
be removed with a finally clause.
This requires that the savez tests need to cleanup the NpyzFile results
which still hold an open file descriptor.
|
| |
| |
| |
| |
| | |
also improves code generation with gcc-4.8 leading up to a 10%
performance increase on some cpus by removing a stack spill.
|
|\ \
| | |
| | | |
ENH: rewrite ma.median to improve poor performance for multiple dimensions
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
many masked median along a small dimension is extremely slow due to the
usage of apply_along_axis which iterates fully in python. The unmasked
median is about 1000x faster.
Work around this issue by using indexing to select the median element
instead of apply_along_axis.
Further improvements are possible, e.g. using the current np.nanmedian
approach for masked medians along large dimensions so partition is used
instead of sort or to extend partition to allow broadcasting over
multiple elements.
Closes gh-4683.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
tolist() converts numpy integers to python integers which are converted
back to numpy integers by the indexing.
meshgrid(indexing='ij') returns the indices wanted here as the right type.
triples performance of sorting a size=(200, 200, 50) array along axis 2
and reduces memory usage by almost 40%.
|
|\ \ \
| | | |
| | | | |
ENH: add storage format 2.0 with 4 byte header size
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The new format only increases the header length field to 4 bytes.
allows storing structured arrays with a large number of named columns.
The dtype serialization for these can exceed the 2 byte header length
field required by the 1.0 format.
The generic functions automatically use the 2.0 format if the to be
stored data requires it. To avoid unintentional incompatibilies a
UserWarning is emitted when this happens.
If the format is not required the more compatible 1.0 format is used.
Closes gh-4690
|
| |/ /
|/| | |
|
|\ \ \
| |/ /
|/| |
| | |
| | | |
ENH: Optimization for pickling random states
the constructor intended for pickling initializes its state via reading /dev/urandom which can be expensive on virtual machines. as the pickle constructor just needs to create any state which will later be initialized these urandom reads are unnecessary.
|
| | |
| | |
| | |
| | | |
-- Addresses https://github.com/numpy/numpy/issues/4763
|
|/ /
| |
| |
| | |
[ci skip]
|
| | |
|
| |
| |
| |
| |
| | |
histogramdd rounds by decimal=6 so the random numbers may not be
outliers if they are below 1. + 1e6
|
| | |
|
| | |
|
|\ \
| | |
| | | |
BUG: Don't let meshgrid ignore unknown kwargs. Fixes #4755.
|
| | | |
|
|\ \ \
| | | |
| | | | |
BUG: avoid infinite loop for small kappa in vonmises
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
rho results in 0. for kappa < 1.4e-8 whch leads to nans appearing and an
infinite loop.
the second order taylor expansion is more precise up to at least 1e-5.
Closes gh-4720
|
|\ \ \ \
| |_|/ /
|/| | | |
BUG: fix crash when sending interrupt signal to fft functions
|
| | | |
| | | |
| | | |
| | | | |
also rename GCC_ATTRIBUTES to FUNCTION_ATTRIBUTES
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
the SIGINT handling code must be in the GIL released section so the
longjmp does not skip the retaking.
This implies that the signal handlers must use thread local storage to
avoid a crash when sending interrupt to threaded fft functions.
Distribution of SIGINT to each threads must be handled by the
application as only the master thread receives it
Closes gh-4634
|
|\ \ \ \
| | | | |
| | | | | |
ENH: improve VOID_compare performance
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
use small memory cache for the temporary data allocation in the compare
loop and use npy_is_aligned instead of the very expensive signed
division.
Improves unaligned compares which occur in structured arrays with
strings:
d = np.ones((2,10000), dtype=np.dtype([('f0', 'S5'), ('f1', '<i4')]))
%timeit np.argsort(d)
100 loops, best of 3: 8.6 ms per loop
vs before:
100 loops, best of 3: 23.7 ms per loop
|
|\ \ \ \ \
| | | | | |
| | | | | | |
BUG: nanpercentile 0-d with output given.
|
| | |_|/ /
| |/| | |
| | | | |
| | | | | |
Also some PEP-8 fixes and test improvements
|