summaryrefslogtreecommitdiff
path: root/numpy/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge pull request #6411 from larsmans/cov-memory-useCharles Harris2015-10-051-2/+2
|\ \ | | | | | | ENH: speed up cov by ~10% for large arrays
| * | ENH: speed up cov by ~10% for large arraysLars Buitinck2015-10-051-2/+2
| | | | | | | | | | | | Replaces n² divisions by one division and n² multiplications.
* | | Merge pull request #6396 from rudimeier/opt-corrcoefCharles Harris2015-10-051-1/+5
|\ \ \ | | | | | | | | MAINT: corrcoef, memory usage optimization
| * | | MAINT: corrcoef, memory usage optimizationRuediger Meier2015-09-301-1/+5
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We calculate sqrt on the small vector rather than on that huge product matrix and we combine the "outer" product with element-wise devision. So even though we have a slower loop over the rows now ... this code snippet runs about 3 times faster than before. However the speed improvement of the whole function is not really significant because cov() takes 80-99% of the time (dependent on blas/lapack implementation and number of CPU cores). More important is that we will safe 1/3 memory. For example corrcoef() for a [23k, m] matrix needs 8GB now instead of 12GB.
* | | Merge pull request #6403 from larsmans/cov-memory-useJaime2015-10-041-1/+3
|\ \ \ | | |/ | |/| ENH: halve the memory requirement of np.cov
| * | ENH: halve the memory requirement of np.covLars Buitinck2015-10-041-1/+3
| | | | | | | | | | | | | | | | | | | | | Prevents allocation of an n²-sized array. XXX For large arrays, multiplying by 1/fact is more than 10% faster than dividing by fact, but that doesn't pass the tests.
* | | DOC: typo: affectLars Buitinck2015-10-022-4/+4
|/ /
* | Merge pull request #6322 from pizzathief/issue5900Charles Harris2015-10-011-4/+5
|\ \ | |/ |/| DOC: numpy.diff docstring changed as per recommendation on
| * DOC: numpy.diff docstring changed as per recommendation onjason king2015-09-161-4/+5
| | | | | | | | | | | | https://github.com/numpy/numpy/issues/5900 Slight change for cumsame doco as well, to match.
* | Merge pull request #6371 from seberg/pr-5771Charles Harris2015-09-272-1/+10
|\ \ | | | | | | BUG: Make sure warning for array split is always applied
| * | TST: Test empty warning for split with manual inputsSebastian Berg2015-09-271-0/+9
| | |
| * | BUG: Expanded warning conditions for array_splitMichael Currie2015-09-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Zero arrays can also occur with any of the partitions sub_arys[i] induced by array_split, not just the final partition sub_arys[-1]. Modified by seberg. Closes gh-5771
* | | TST: Update test__version.py.Charles Harris2015-09-231-0/+13
| |/ |/| | | | | | | | | | | Added tests for the x.x.dev0+1234567 form together with alpha and beta versions of same. Updates lifted from scipy.
* | Merge pull request #6271 from charris/change-deprecated-indexes-to-errorCharles Harris2015-09-101-6/+12
|\ \ | | | | | | DEP,MAINT: Change deprecated indexing to errors.
| * | DEP,MAINT: Change deprecated indexing to errors.Charles Harris2015-09-061-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The deprecated operations changed to errors are * Conversion of floats and booleans to npy_intp indexes. * Conversion of single element integer arrays of ndim > 1 to indexes. * Multiple ellipsis in index. The affected deprecation tests have been been changed to check for raised errors instead, but remain in test_deprecations.py for the moment. They will be moved when the conversion of the remaining indexing deprecations is complete.
* | | ENH: gradient takes axis keyword, added release note commentMaximilian Trescher2015-09-061-4/+6
| | |
* | | possibility to calculate gradient over specific axes instead of all axesMaximilian Trescher2015-09-032-5/+60
|/ / | | | | | | when given axis=None, behave the same as axis not being provided
* | BUG: fix #4381: precision loss on string -> longdouble conversionAnne Archibald2015-08-282-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid going through python floats when converting string to longdouble. This makes it dramatically easier to produce full-precision long double numbers. Fixed are the constructor (np.longdouble("1.01")), np.fromfile, np.fromstring, np.loadtxt, and np.genfromtxt (and functions based on it). Also fixed is precision loss when using np.tofile. This also fixes #1481, poor handling of bad data in fromfile and fromstring. If the function strtod_l is not available, almost none of this will work, and many tests will fail.
* | Auto merge of #6206 - jaimefrio:searchsorted_ndarray, r=njsmithHomu2015-08-171-0/+9
|\ \ | | | | | | | | | | | | MANT: searchsorted should return base ndarrays always
| * | MANT: searchsorted should return base ndarrays alwaysJaime Fernandez2015-08-161-0/+9
| | |
* | | ENH: Adding in automatic number of bins estimation for np.histogram. Users ↵Varun Nayyar2015-08-152-1/+260
|/ / | | | | | | can now pass in bins='auto' (or 'scott','fd','rice','sturges') and get the corresponding rule of thumb estimator provide a decent estimate of the optimal number of bins for the given the data.
* | Clarify signature of numpy.pad.Antony Lee2015-08-072-5/+2
| | | | | | | | | | `mode` is a required argument so just declare it as such. This does not prevent it from being passed as a keyword argument.
* | BUG: fixed regression in np.histogram which caused input floating-point ↵Thomas Robitaille2015-07-272-1/+8
| | | | | | | | values to be modified
* | Merge pull request #6111 from charris/fix-getargspecRalf Gommers2015-07-261-7/+10
|\ \ | | | | | | MAINT: Use numpy versions of getargspec, formatargspec.
| * | MAINT: Use numpy versions of getargspec, formatargspec.Charles Harris2015-07-241-7/+10
| | | | | | | | | | | | | | | Both of these functions will be removed in Python 3.6 and were deprecated in 3.5. The numpy versions are not full versions, but hopefully suffice.
* | | STY: PEP8 and pyflakes fixes for numpy/lib/testsCharles Harris2015-07-253-237/+296
| | |
* | | Merge pull request #6046 from charris/pep8-and-pyflakes-cleanupsCharles Harris2015-07-252-10/+11
|\ \ \ | | | | | | | | | | | | | | | | PEP8 and pyflakes fixups for numpy/ma/*.py and numpy/ma/tests/*.py Merge cleanups prior to 1.10 release.
| * | | BUG: Fix imports in test_io.py and test_recfunctions.py.Charles Harris2015-07-042-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Those test functions were incorrectly importing test functions from numpy/ma/testutils that were actually not defined there, but rather in numpy/testing. That did not cause an error when testutils was '*' importing all the test functions, but it was deceptive as some of the functions might appear to support masked arrays when they do not.
* | | | ENH: Faster algorithm for computing histograms with equal-size binsThomas Robitaille2015-07-232-26/+113
| |/ / |/| |
* | | BUG: Fix tiling of zero-sized arrays numpy/numpy#6089 and add test case.Dimas Abreu Dutra2015-07-172-10/+13
| | |
* | | BUG: made view of new array to fix ix_ bugmlai2015-07-112-1/+10
|/ / | | | | | | | | | | closes gh-6062 done with help of Sebastian Berg! =)
* | DOC: Fix docstring warnings in documetation generation.Charles Harris2015-07-013-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | Most of these fixes involve putting blank lines around .. versionadded:: x.x.x and .. deprecated:: x.x.x Some of the examples were also fixed.
* | DOC: Add reference to new stack function in numpy/lib/info.py.Charles Harris2015-07-011-0/+1
| |
* | Merge pull request #5953 from yarikoptic/bf/guard-getmembersCharles Harris2015-06-271-1/+1
|\ \ | | | | | | BF: do not crash lookfor if inspection fails - catch any Exception
| * | BF: do not crash lookfor if inspection fails - catch any ExceptionYaroslav Halchenko2015-06-081-1/+1
| | |
* | | Merge pull request #6016 from njsmith/remove-gzip-monkeypatchCharles Harris2015-06-241-49/+2
|\ \ \ | | | | | | | | MAINT: remove legacy monkeypatching of GzipFile
| * | | MAINT: remove legacy monkeypatching of GzipFileNathaniel J. Smith2015-06-241-49/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm not sure exactly when GzipFile.seek started supporting the whence= argument by default -- sometime around python 2.5 from the looks of http://bugs.python.org/issue1355023. But in any case it was definitely there by 2.6, which is now the earliest version we support, so there's no longer any need to monkeypatch it in. This also fixes an error in python 3.5b2, which I haven't bothered to track down further because these are the wages of monkeypatching.
* | | | MAINT: remove use of 'raise StopIteration' from generatorsNathaniel J. Smith2015-06-241-2/+2
|/ / / | | | | | | | | | | | | | | | This triggers a PendingDeprecationWarning in py3.5 -- you're supposed to just write "return" instead (which on earlier versions is equivalent). See PEP 479: https://www.python.org/dev/peps/pep-0479/
* | | DOC, MAINT: fix typo in np.fill_diagonal docstring exampleFrançois Magimel2015-06-241-3/+5
| | |
* | | Updating unit tests for removed warning.empeeu2015-06-221-3/+3
| | |
* | | Moving warning outside of for loop.empeeu2015-06-221-4/+4
| | |
* | | BUG: Added proper handling of median and percentile when nan's are present ↵empeeu2015-06-222-27/+269
| | | | | | | | | | | | | | | | | | in array to close issue #586. Also added unit tests.
* | | BUG: np.float16 not recognized in np.common_typeMarten van Kerkwijk2015-06-222-11/+14
| | |
* | | DOC: Fix examples in npyio.py to properly import StringIO.Charles Harris2015-06-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In two places they were doing >>> from StringIO import StringIO Since Python 2.6 that should be >>> from io import StringIO Closes #5995.
* | | Merge pull request #5490 from charris/cleanup-gh-4986Charles Harris2015-06-211-4/+4
|\ \ \ | | | | | | | | DOC: Update indexing docs.
| * | | DOC: Update docs.Gabor Kovacs2015-06-211-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Update docs for boolean array indexing and nonzero order. Add links to row-major and column-major terms where they appear. Closes #3177
* | | | DEP,MAINT: Remove keywords "skiprows" and "missing" from genfromtxt.Charles Harris2015-06-211-32/+9
|/ / / | | | | | | | | | | | | Deprecated in NumPy 1.5. If this causes problems in the 1.10 release cycle the change can be reverted.
* | | DEP: Add notes to some deprecations.Charles Harris2015-06-211-2/+2
| | | | | | | | | | | | | | | Some keywords are deprecated and slated for removal in numpy 2.0. Add comment to deprecation date to clarify that.
* | | MAINT: Mark deprecation warning with a date and Numpy version.Charles Harris2015-06-213-0/+11
|/ / | | | | | | | | | | This is to make it easier to find and remove deprecated features. It would be a good idea if all deprecations were made with similar comments.
* | ENH: structured datatype safety checksAllan Haldane2015-06-051-0/+30
| | | | | | | | | | | | | | | | | | Previously views of structured arrays containing objects were completely disabled. This commit adds more lenient check for whether an object-array view is allowed, and adds similar checks to getfield/setfield Fixes #2346. Fixes #3256. Fixes #2599. Fixes #3253. Fixes #3286. Fixes #5762.