summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
* DOC: document behavior of ma.sort(endswith=) for unmasked min/max valuesJulian Taylor2014-07-271-0/+4
| | | | see gh-4422
* DOC: add version added tag to reduction keepdims argumentJulian Taylor2014-07-271-0/+2
|
* DOC: fix documented return value of tostring/tobytesJulian Taylor2014-07-271-10/+12
| | | | The function returns bytes not strings. This is relevant in python3.
* BUG: object array np.conjugate, ndarray.conjugate inconsistentEric Moore2014-07-232-1/+38
| | | | fixes gh-4730
* DOC: fix return shape of tensorinv docFrederic2014-07-171-1/+1
|
* ENH: avoid meshgrid and fancy indexing for 1d masked sortJulian Taylor2014-07-161-8/+20
| | | | | Improves performance by using the simple indexing path and memory by avoiding creating a full meshgrid.
* Merge pull request #4454 from jurnix/namedargsJulian Taylor2014-06-082-4/+19
|\ | | | | ENH: apply_along_axis accepts named arguments
| * PEP8 nitpicksjurnix2014-06-061-4/+7
| |
| * ENH: apply_along_axis accepts named argumentsAlbert2014-03-272-4/+16
| |
* | BUG: Fixed piecewise function for 0d inputJuan Luis Cano Rodríguez2014-06-082-20/+22
| | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #4786 from juliantaylor/cross-styleJulian Taylor2014-06-082-29/+75
|\ \ | | | | | | MAINT: improve readablility of cross and improve test coverage
| * | MAINT: improve readablility of cross and improve test coverageJulian Taylor2014-06-072-29/+75
| | |
* | | Merge pull request #4790 from juliantaylor/log2-windowsJulian Taylor2014-06-082-1/+51
|\ \ \ | | | | | | | | BUG: improve log2 windows compiler fallback of log2
| * | | BUG: improve log2 windows compiler fallback of log2Julian Taylor2014-06-082-1/+51
| |/ / | | | | | | | | | | | | | | | | | | | | | 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
* | | BUG: Correct behavior for lists of tuples in unique, closes #4785jaimefrio2014-06-062-7/+11
|/ / | | | | | | | | | | | | | | 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`.
* | Merge pull request #4784 from jaimefrio/iter-dealloc-gufuncCharles Harris2014-06-041-2/+1
|\ \ | | | | | | BUG: Avoid double iterator deallocation in `ufunc_object.c`
| * | BUG: Avoid double iterator deallocation in `ufunc_object.c`jaimefrio2014-06-041-2/+1
| | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #4783 from juliantaylor/flat-assign-improveCharles Harris2014-06-041-4/+1
|\ \ \ | |/ / |/| | ENH: use copyswap instead of memmove for flat assignment
| * | ENH: use copyswap instead of memmove for flat assignmentJulian Taylor2014-06-051-4/+1
| | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #4782 from juliantaylor/where-string-fixCharles Harris2014-06-042-4/+18
|\ \ \ | |/ / |/| | BUG: fix where not filling string types properly
| * | BUG: fix where not filling string types properlyJulian Taylor2014-06-052-4/+18
| | | | | | | | | | | | | | | | | | | | | 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
* | | BUG: check alignment of strides for byteswapJulian Taylor2014-06-041-3/+3
|/ / | | | | | | closes gh-4774
* | TST: add a format 2.0 roundtrip testJulian Taylor2014-06-031-0/+7
| |
* | BUG: fix test deleting temporary file before using it on windowsJulian Taylor2014-06-031-22/+28
| | | | | | | | | | | | | | 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.
* | MAINT: reduce scope of some variables in indexing codeJulian Taylor2014-06-031-10/+8
| | | | | | | | | | also improves code generation with gcc-4.8 leading up to a 10% performance increase on some cpus by removing a stack spill.
* | Merge pull request #4760 from juliantaylor/masked-medianCharles Harris2014-06-025-23/+80
|\ \ | | | | | | ENH: rewrite ma.median to improve poor performance for multiple dimensions
| * | ENH: use masked median for small multidimensional nanmediansJulian Taylor2014-06-022-2/+36
| | |
| * | ENH: rewrite ma.median to improve poor performance for multiple dimensionsJulian Taylor2014-06-022-16/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | ENH: use sparse meshgrid instead of indices().tolist()Julian Taylor2014-06-021-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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%.
* | | Merge pull request #4765 from juliantaylor/npyformat-2.0Charles Harris2014-06-022-34/+194
|\ \ \ | | | | | | | | ENH: add storage format 2.0 with 4 byte header size
| * | | ENH: add storage format 2.0 with 4 byte header length sizeJulian Taylor2014-06-022-34/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | DOC: Fix indentation and add missing blank lines for meshgrid doc.Charles Harris2014-06-021-4/+7
| |/ / |/| |
* | | Merge pull request #4768 from depristo/masterJulian Taylor2014-06-021-1/+9
|\ \ \ | |/ / |/| | | | | | | | 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.
| * | Optimization for pickling random statesmarkdepristo2014-06-021-1/+9
| | | | | | | | | | | | -- Addresses https://github.com/numpy/numpy/issues/4763
* | | DOC: add versionadded tags to meshgrid argumentsJulian Taylor2014-06-021-0/+3
|/ / | | | | | | [ci skip]
* | Fix minor error in "squeeze" docstringMichael Aquilina2014-05-311-1/+1
| |
* | TST: fix random failing histogram testJulian Taylor2014-05-301-1/+1
| | | | | | | | | | histogramdd rounds by decimal=6 so the random numbers may not be outliers if they are below 1. + 1e6
* | MAINT: Removed code emulating keepdims in covDavid Freese2014-05-301-4/+2
| |
* | MAINT: fix a few harmless compiler warningsJulian Taylor2014-05-303-4/+3
| |
* | Merge pull request #4758 from mforbes/issue_4755Julian Taylor2014-05-302-3/+14
|\ \ | | | | | | BUG: Don't let meshgrid ignore unknown kwargs. Fixes #4755.
| * | BUG: Don't let meshgrid ignore unknown kwargs. Fixes #4755.Michael McNeil Forbes2014-05-302-3/+14
| | |
* | | Merge pull request #4751 from juliantaylor/vonmises-fixCharles Harris2014-05-292-4/+20
|\ \ \ | | | | | | | | BUG: avoid infinite loop for small kappa in vonmises
| * | | BUG: avoid infinite loop for small kappa in vonmisesJulian Taylor2014-05-282-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge pull request #4692 from juliantaylor/fft-interruptCharles Harris2014-05-295-24/+55
|\ \ \ \ | |_|/ / |/| | | BUG: fix crash when sending interrupt signal to fft functions
| * | | MAINT: move variable attribute checks into a common variableJulian Taylor2014-05-222-11/+14
| | | | | | | | | | | | | | | | also rename GCC_ATTRIBUTES to FUNCTION_ATTRIBUTES
| * | | BUG: fix crash when sending interrupt signal to fft functionsJulian Taylor2014-05-094-14/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge pull request #4746 from juliantaylor/void-compare-optCharles Harris2014-05-281-7/+8
|\ \ \ \ | | | | | | | | | | ENH: improve VOID_compare performance
| * | | | ENH: improve VOID_compare performanceJulian Taylor2014-05-261-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | Merge pull request #4749 from seberg/0d-nanperc-outJulian Taylor2014-05-292-65/+95
|\ \ \ \ \ | | | | | | | | | | | | BUG: nanpercentile 0-d with output given.
| * | | | | BUG: nanpercentile/nanmedian 0-d with output given.Sebastian Berg2014-05-282-65/+95
| | |_|/ / | |/| | | | | | | | | | | | | Also some PEP-8 fixes and test improvements