summaryrefslogtreecommitdiff
path: root/numpy/lib
Commit message (Collapse)AuthorAgeFilesLines
...
| * | MAINT: Fixes for problems in numpy/lib revealed by pyflakes.Charles Harris2014-07-3114-73/+66
| | | | | | | | | | | | | | | | | | Some of those problems look like potential coding errors. In those cases a Fixme comment was made and the offending code, usually an unused variable, was commented out.
| * | STY: PEP8 compliance for numpy/lib/tests.Charles Harris2014-07-319-243/+243
| | | | | | | | | | | | | | | | | | | | | The possibly controversial part of this is making the nested array value lists PEP8 compliant, as there is something to be said aligning the values for clarity. In the end, it seemed like the easiest thing to do was to make them PEP8 compliant. The eye can get used to that.
| * | MAINT: Fix problems noted by pyflakes in numpy/lib/tests.Charles Harris2014-07-3115-378/+426
| |/
* | BUG: Avoid type promotion in tril and triu.Yotam Doron2014-07-292-2/+24
| |
* | BUG: Use `np.where` in np.triu/np.tril, fixes #4859jaimefrio2014-07-102-3/+18
| | | | | | | | | | Replaces the current method to zero items, from multiplication to using `np.where`.
* | Merge pull request #4671 from charris/prepare-1.10-develCharles Harris2014-07-061-1/+5
|\ \ | | | | | | MAINT: start 1.10-devel.
| * | MAINT: Change default inplace, ufunc(...,out=x) casting to same_kind.Charles Harris2014-05-061-1/+5
| | | | | | | | | | | | | | | | | | There has been a warning of this change since numpy 1.7. numpy 1.10 is a good time to do it. The nanvar function needed a fix after the change, and the tests and documentation are updated.
* | | Merge pull request #4828 from ogrisel/fix-isfileobj-py3Julian Taylor2014-06-301-12/+4
|\ \ \ | | | | | | | | FIX isfileobj accepts write-mode files under PY3
| * | | Move tempdir context manager to numpy.testing.utilsOlivier Grisel2014-06-301-12/+4
| | | |
* | | | BUG: handle rounding issue with histogram edges on float32 dataJulian Taylor2014-06-232-2/+14
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following inequality causes wrong counting at the edges and can be avoided by making the edge array of the same type as the input data. In [1]: np.around(np.float64(6010.36962890625), 5) Out[1]: 6010.3696300000001 In [2]: np.around(np.float32(6010.36962890625), 5) Out[2]: 6010.3701 Closes gh-4799
* | | DOC: remove wrong mention of .gz in np.loadJulian Taylor2014-06-111-2/+1
| |/ |/| | | | | closes gh-312
* | Merge pull request #4454 from jurnix/namedargsJulian Taylor2014-06-081-4/+9
|\ \ | | | | | | ENH: apply_along_axis accepts named arguments
| * | PEP8 nitpicksjurnix2014-06-061-4/+7
| | |
| * | ENH: apply_along_axis accepts named argumentsAlbert2014-03-271-4/+6
| | |
* | | 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.
* | | 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`.
* | | 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.
* | | Merge pull request #4760 from juliantaylor/masked-medianCharles Harris2014-06-022-2/+36
|\ \ \ | | | | | | | | ENH: rewrite ma.median to improve poor performance for multiple dimensions
| * | | ENH: use masked median for small multidimensional nanmediansJulian Taylor2014-06-022-2/+36
| | | |
* | | | 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
|/ / /
* | | DOC: add versionadded tags to meshgrid argumentsJulian Taylor2014-06-021-0/+3
| | | | | | | | | | | | [ci skip]
* | | 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
| | |
* | | BUG: Don't let meshgrid ignore unknown kwargs. Fixes #4755.Michael McNeil Forbes2014-05-302-3/+14
| | |
* | | 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
* | | | Merge pull request #4750 from jaimefrio/tri-styseberg2014-05-281-4/+2
|\ \ \ \ | |/ / / |/| | | STY: Use `.astype`'s `copy` kwarg in `np.tri`
| * | | STY: Use `.astype`'s `copy` kwarg in `np.tri`jaimefrio2014-05-271-4/+2
| | | | | | | | | | | | | | | | Replace an explicit type check with setting `copy=False` in call to `astype`.
* | | | DOC: clarify savetxt delimiter and newline docstringJulian Taylor2014-05-261-2/+2
| | | | | | | | | | | | newline and delimiter can be strings not only single characters
* | | | Merge pull request #4574 from ggventurini/masterJulian Taylor2014-05-261-1/+2
|\ \ \ \ | |/ / / |/| | | DOC: Docstring fix for `savetxt` (minor change)
| * | | Docstring fix for `savetxt`ggventurini2014-04-011-1/+2
| | | |
* | | | ENH: added functionality nanpercentile to numpyDavid Freese2014-05-222-1/+263
| | | | | | | | | | | | | | | | | | | | | | | | Implemented a nanpercentile and associated tests as an extension of np.percentile to complement the other nanfunctions.
* | | | ENH: Add the scipy NumpyVersion class.Charles Harris2014-05-153-0/+213
| |_|/ |/| | | | | | | | | | | The class is in numpy/lib/_version.py and can be used to compare numpy versions when the version goes to double digits.
* | | Merge pull request #4307 from dfreese/feature/nanmedianJulian Taylor2014-05-062-6/+238
|\ \ \ | | | | | | | | ENH: added functionality nanmedian to numpy
| * | | ENH: added functionality nanmedian to numpyDavid Freese2014-05-022-6/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implemented a nanmedian and associated tests as an extension of np.median to complement the other nanfunctions Added negative values to the unit tests Cleaned up documentation of nanmedian
* | | | MAINT: Comparison deprecation followup fixesSebastian Berg2014-05-041-15/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes the identity check `a = np.array([np.nan], dtype=object)` `a == a`, etc. a deprecation/futurewarning instead of just changing it. Also fixes some smaller things.
* | | | DEP: Deprecate that comparisons ignore errors.Sebastian Berg2014-05-041-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This means that for example broadcasting errors get raised. The array_equiv function is changed to explicitely test if broadcasting is possible. It may be nice to do this test differently, but I am not sure if that is possible. Create a FutureWarning for comparisons to None, which should result in areal elementwise (object) comparisons. Slightly adepted a wrong test. Poly changes: Some changes in the polycode was necessary, the one is probably a bug fix, the other needs to be thought over, since len check is not perfect maybe, since it is more liekly to raise raise an error. Closes gh-3759 and gh-1608
* | | | DOC/FIX: Fix error in documentationYoshiki Vázquez Baeza2014-05-041-4/+0
|/ / / | | | | | | | | | | | | | | | | | | Remove misleading note about equivalency betwen column_stack and np.vstack(tup).T. Fixes #3488
* | | Add tests using matricesMarten van Kerkwijk2014-04-221-0/+25
| | |
* | | BUG: incorrect argument order to _copyto in in np.nanmax, np.nanminMarten van Kerkwijk2014-04-201-2/+2
| | |
* | | ENH: add a 'return_counts=' keyword argument to `np.unique`jaimefrio2014-04-052-37/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR adds a new keyword argument to `np.unique` that returns the number of times each unique item comes up in the array. This allows replacing a typical numpy construct: unq, _ = np.unique(a, return_inverse=True) unq_counts = np.bincount(_) with a single line of code: unq, unq_counts = np.unique(a, return_counts=True) As a plus, it runs faster, because it does not need the extra operations required to produce `unique_inverse`.
* | | ENH: Better error w/ line num for bad column count in np.loadtxt()Daniel da Silva2014-04-052-2/+18
|/ / | | | | | | Resolves #2591. Adds more explicit error handling in line parsing loop.
* | ENH: Replace exponentiation with cumulative product in np.vanderjaimefrio2014-03-311-25/+27
| | | | | | | | | | Speeds calculation up by ~3x for 100x100 matrices, and by ~45x for 1000x1000
* | Merge pull request #3830 from jarondl/recfromcsvCharles Harris2014-03-282-10/+21
|\ \ | | | | | | MAINT (API?): organize npyio.recfromcsv defaults
| * | STY: change and delete some comments in recfromcsvjarondl2014-03-121-5/+1
| | | | | | | | | | | | | | | Removed two irrelevant comments about code history. P.S. my first try with Github's online editor.
| * | DOC: npyio.recfromcsv keyword argument changesYaron de Leeuw2014-02-281-0/+5
| | | | | | | | | | | | | | | | | | Added a note to recfromcsv about the `dtype` keyword, as suggested by @hpaulj. Also added a note to the release notes, about the change in the `update` keyword, as suggested by @charris.
| * | TST: Added regression test for recfromcsv dtype error, as suggested by @hpauljYaron de Leeuw2014-02-281-0/+8
| | |