summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
* MAINT: Use np.errstate context manager.Charles Harris2013-07-1120-409/+194
| | | | | | | | | | | | | Now that Python < 2.6 is no longer supported we can use the errstate context manager in places where constructs like ``` old = seterr(invalid='ignore') try: blah finally: seterr(**old) ``` were used.
* Merge pull request #3510 from mwtoews/masterCharles Harris2013-07-091-0/+12
|\ | | | | Add regression tests for pickleable record arrays
| * Add regression tests for pickleable record arraysmwtoews2013-07-091-0/+12
| |
* | Merge pull request #3501 from inducer/masterCharles Harris2013-07-092-0/+50
|\ \ | |/ |/| Fix "numpy scalar * array-like == performance horror"
| * BUG: Check earlier for higher priority in binary operators, add testAndreas Kloeckner2013-07-082-0/+50
| | | | | | | | Fixes #3375
* | Merge pull request #3491 from ContinuumIO/astype_fix2Charles Harris2013-07-083-20/+77
|\ \ | | | | | | Fix creation of string arrays from object types
| * | STY: Formatting changesJay Bourque2013-07-083-18/+13
| | |
| * | BUG: Fix creation of string arrays from object typesJay Bourque2013-07-083-17/+79
| | |
* | | ENH: vectorize boolean comparisons of floatsJulian Taylor2013-07-084-2/+238
| | | | | | | | | | | | | | | | | | the new code will more often propagate the invalid floating point exception if comparing against nan, so allclose now ignores it (but still returns False)
* | | Merge pull request #3500 from charris/fix-3592njsmith2013-07-082-23/+54
|\ \ \ | | | | | | | | Fix exceptions being swallowed by fromiter.
| * | | STY: Fix trailing whitespace and replace test doctrings by comments.Charles Harris2013-07-031-13/+13
| | | |
| * | | BUG: Remove xrange that slipped into test_numeric.py.Charles Harris2013-07-031-1/+1
| | | |
| * | | TST: Add tests for exceptions raised by fromiter.Fernando Perez2013-07-031-6/+30
| | | | | | | | | | | | | | | | | | | | | | | | This improves the testing of the edge cases. Work done with @certik.
| * | | BUG: Fix exceptions being swallowed by fromiter.Fernando Perez2013-07-031-10/+17
| | |/ | |/| | | | | | | | | | | | | | | | All exceptions from underlying iterator were being collapsed into a generic one. This allows the original exception to propagate. Closes gh-2592.
* | | TST: New test to ensure np.pad allows pad_width of zero.Jostein Bø Fløystad2013-07-051-0/+8
| | |
* | | BUG: Allow to pad arrays by zero entries.Jostein Bø Fløystad2013-07-051-1/+1
|/ / | | | | | | | | np.pad will now accept a pad_width containing zeros. The functionality was already implemented, but validation of input was too strict.
* | BUG: Fix failure to return monic polynomials from roots.Charles Harris2013-07-022-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug affected the various polynomial class methods fromroots due to the ability to specify both window and domain. In that circumstance the roots are mapped from the domain to the window by the substitution `x = off + scl*x`. The polynomial that was being generated was monic in the window before substitution, but if scl was not one it was not monic considered as a function of the variable x in the domain. The fix is to divide the generated coefficients by `scl ** deg` so that the scaling of the highest degree term after substitution is canceled. It might be better to make the scaling optional in the future, but this fix makes the result match the documentation. Closes #3467.
* | Merge pull request #2875 from ahojnnes/array-initnjsmith2013-06-302-18/+211
|\ \ | | | | | | Add convenience functions nans, infs, nans_like, infs_like
| * | Rename filled, filled_like to full, full_likeJohannes Schönberger2013-06-302-21/+21
| | |
| * | Update default dtype of filled function in doc stringJohannes Schönberger2013-06-061-1/+1
| | |
| * | Rename fill value parameter for consistency across numpy+Johannes Schönberger2013-06-062-11/+11
| | |
| * | Add examples to doc string of filled and filled_likeJohannes Schönberger2013-06-061-0/+25
| | |
| * | Add separate parameter description to filled, filled_like and onesJohannes Schönberger2013-06-061-6/+35
| | |
| * | Fix Python 3 test cases for filled* functionsJohannes Schönberger2013-06-061-3/+7
| | |
| * | Do not compare string or unicode valuesJohannes Schönberger2013-06-061-1/+1
| | |
| * | Add doc string to creation test classJohannes Schönberger2013-06-061-0/+2
| | |
| * | Comment test casesJohannes Schönberger2013-06-061-6/+10
| | |
| * | Add tests for zeros, ones, empty and filledJohannes Schönberger2013-06-061-0/+45
| | |
| * | Add filled_like to doc string of test classJohannes Schönberger2013-06-061-1/+1
| | |
| * | Use more idiomatic way of None-checkJohannes Schönberger2013-06-061-1/+1
| | |
| * | Use commin method to compare array valuesJohannes Schönberger2013-06-061-40/+16
| | |
| * | Add tests for filled_like functionJohannes Schönberger2013-06-062-21/+54
| | |
| * | Fix doc stringJohannes Schönberger2013-06-061-3/+1
| | |
| * | Replace nans, nans_like, infs, infs_like with filled functionsJohannes Schönberger2013-06-061-93/+15
| | |
| * | Fix typo in doc stringJohannes Schönberger2013-06-061-4/+4
| | |
| * | Add short note in doc string about dtype for non-numbersJohannes Schönberger2013-06-061-0/+12
| | |
| * | Add more related functionsJohannes Schönberger2013-06-061-0/+5
| | |
| * | Add nans, infs, nans_like, infs_like convenience functionsJohannes Schönberger2013-06-061-1/+139
| | |
* | | Merge pull request #3461 from charris/fix-load-resource-warningCharles Harris2013-06-292-5/+22
|\ \ \ | |_|/ |/| | BUG: Make np.load transfer file ownership to the returned NpzFile.
| * | BUG: Make np.load transfer file ownership to the returned NpzFile.Charles Harris2013-06-222-5/+22
| | | | | | | | | | | | | | | | | | | | | This assures that when the loaded file is closed it also closes the file descriptor, avoiding a resource warning in Python3. Closes #3457.
* | | BUG: numpy.random.binomial raised ValueError for n == 0HaroldMills2013-06-283-1557/+1608
| | | | | | | | | | | | | | | | | | Range test for n was incorrect. Closes #3480
* | | BUG: add module extensions to load_library search listJulian Taylor2013-06-251-11/+5
| | | | | | | | | | | | | | | on mac, windows and linux (with >= py3.2) shared libraries and loadable module have different extensions, so check both for all platforms.
* | | Merge pull request #3466 from juliantaylor/vectorize-boolCharles Harris2013-06-232-7/+60
|\ \ \ | | | | | | | | vectorize boolean reductions
| * | | ENH: vectorize boolean reductionsJulian Taylor2013-06-232-0/+54
| | | | | | | | | | | | | | | | | | | | Improves performance by a factor of 5 to 10 depending on the cpu. These operations currently can't be autovectorized by gcc 4.8.
| * | | MAINT: make binary_scalar2 static and put __m128i into a templateJulian Taylor2013-06-231-7/+6
| |/ /
* | | Merge pull request #3429 from juliantaylor/copy-unrollCharles Harris2013-06-234-2/+40
|\ \ \ | |/ / |/| | ENH: tell gcc to unroll strided copy loops
| * | ENH: tell gcc to unroll strided copy loopsJulian Taylor2013-06-134-2/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The strided copy loops profit a lot from unrolling as the number of operations executed is in each iterations very small. GCC needs to be told explicitly to do unrolling even on O3. Unrolling is only profitable if the move can be done in a single instruction, else the increased code size makes it slower, thus the flag is only used for operations on element sizes less equal the native pointer size. Tested to improve performance of by 20-50% on intel core2duo, xeon 5xxx/7xxx and amd phenom x4.
* | | BUG: Campanion Matrix was scalar, not matrix for degree 1.Charles Harris2013-06-2012-6/+102
| | | | | | | | | | | | | | | | | | | | | | | | The companion matrices returned by the various polynomial types was a scalar in the degree one case instead of a 2-D array. Fix that and add a test to check for that result. Closes #3459.
* | | Merge pull request #3455 from Hoops/copy_and_swap_stride_dstCharles Harris2013-06-191-7/+6
|\ \ \ | | | | | | | | Possible memory overwrite in copy_and_swap
| * | | Call to byte_swap_vector should use dst, not d1, because this isAndrew Horton2013-06-161-7/+6
| | | | | | | | | | | | | | | | | | | | modified by the call to the strided memcpy and will end up pointing after the end of the destination buffer in that case.