summaryrefslogtreecommitdiff
path: root/numpy/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | ENH: Add NDArrayOperatorsMixin mixin class.Stephan Hoyer2017-04-273-0/+358
|/ / / | | | | | | | | | | | | | | | This mixin class provides an easy way to implement arithmetic operators that defer to __array_ufunc__ like numpy.ndarray in non-ndarray subclasses.
* | | DOC: Correct shape of edges in np.histogram2d (#8980)Importance of Being Ernest2017-04-231-2/+2
| | | | | | | | | | | | | | | If nx and ny are the bin counts (as stated in the bins argument's text), then the return H has indeed shape (nx, ny). However, the returned xedges and yedges will then have shape (nx+1,) and (ny+1,) respectively. Fixes #8979
* | | Merge pull request #6632 from mcmtroffaes/feature/fromfile-ioopen-bugCharles Harris2017-04-141-2/+3
|\ \ \ | | | | | | | | TST/BUG: fromfile - fix test and expose bug with io class argument
| * | | BUG: npy_PyFile_Dup2 - fix PyFile_AsFile failing on io style classesMatthias C. M. Troffaes2016-09-081-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug only manifests itself in the Python 2 code path. Falls back to the current Python 3 code path also on Python 2 because the Python 3 code path is written precisely to handle this situation. Also fix tests, and clarify in the documentation that the current implementation requires the stream to be seekable.
* | | | Merge pull request #8643 from eric-wieser/fix-8642Eric Wieser2017-04-112-1/+18
|\ \ \ \ | | | | | | | | | | BUG: Fix double-wrapping of object scalars
| * | | | BUG: Fix double-wrapping of object scalarsEric Wieser2017-04-062-1/+18
| | |_|/ | |/| | | | | | | | | | Fixes #8642
* | | | DOC: Fix typos in percentile (#8900)Baurzhan Muftakhidinov2017-04-062-4/+4
| | | |
* | | | Merge pull request #8737 from eric-wieser/squeeze-expand-docsCharles Harris2017-04-011-0/+2
|\ \ \ \ | | | | | | | | | | DOC: Mention that expand_dims and squeeze are inverses
| * | | | DOC: expand_dims and squeeze are inversesEric Wieser2017-03-061-0/+2
| | | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | MAINT: Rename _validate_axis, and document itEric Wieser2017-03-281-2/+2
| | | | |
* | | | | MAINT: Use _validate_axis inside _ureduceEric Wieser2017-03-283-33/+33
| | | | | | | | | | | | | | | | | | | | This fixes an omission where duplicate axes would only be detected when positive
* | | | | MAINT: Reuse _validate_axis in np.gradientEric Wieser2017-03-282-16/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also means that its axis argument invokes operator.index like others do. _validate_axis currently accepts lists of axes, which is a bug.
* | | | | DOC: Spell out note for `dstack`Søren Fuglede Jørgensen2017-03-261-1/+2
| | | | | | | | | | | | | | | This adds to the documentation on `dstack` the notes from `hstack` and `vstack` about dimensionality requirements.
* | | | | Merge pull request #8388 from gfyoung/real-imag-scalarseberg2017-03-262-12/+66
|\ \ \ \ \ | | | | | | | | | | | | API: Return scalars for scalar inputs to np.real/imag
| * | | | | API: Return scalars for scalar inputs to np.real/imaggfyoung2017-03-252-12/+66
| | | | | | | | | | | | | | | | | | | | | | | | Closes gh-8386.
* | | | | | Merge pull request #8348 from anntzer/bincount-zero-minlengthEric Wieser2017-03-261-8/+7
|\ \ \ \ \ \ | |/ / / / / |/| | | | | ENH: Allow bincount(..., minlength=0).
| * | | | | ENH: Allow bincount(..., minlength=0).Antony Lee2017-03-241-8/+7
| | | | | |
* | | | | | MAINT: Replace unicode() with u prefixEric Wieser2017-03-252-5/+2
| | | | | |
* | | | | | MAINT: Stop using sixu instead of a u prefixEric Wieser2017-03-251-2/+1
| | | | | |
* | | | | | MAINT: Remove asbytes_nested where b prefixes would sufficeEric Wieser2017-03-253-35/+33
| | | | | |
* | | | | | MAINT: Remove asbytes where a b prefix would sufficeEric Wieser2017-03-256-71/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we only need to support python 2, we can remove any case where we just pass a single string literal and use the b prefix instead. What we can't do is transform asbytes("tests %d" % num), because %-formatting fails on bytes in python 3.x < 3.5.
* | | | | | Merge pull request #8813 from eric-wieser/maint-flatten-dtypeCharles Harris2017-03-232-5/+7
|\ \ \ \ \ \ | | | | | | | | | | | | | | MAINT: tidy up some of npyio
| * | | | | | MAINT: Rename function to prevent name-shadowingEric Wieser2017-03-231-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This file had two functions called flatten_dtype, which did similar but different things.
| * | | | | | DOC: There's a name for {False, True}, and it's "bool"Eric Wieser2017-03-231-2/+3
| | | | | | |
* | | | | | | Merge pull request #8807 from eric-wieser/poly1d-fixes-fixes-fixesCharles Harris2017-03-212-3/+16
|\ \ \ \ \ \ \ | | |_|_|_|_|/ | |/| | | | | TST: Prove that poly1d coeffs are immutable
| * | | | | | TST: Prove that poly1d coeffs are immutableEric Wieser2017-03-212-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the comment suggesting that they are not
* | | | | | | Merge pull request #8788 from eric-wieser/poly1d-fixes-fixesCharles Harris2017-03-211-1/+11
|\ \ \ \ \ \ \ | |/ / / / / / | | / / / / / | |/ / / / / |/| | | | | BUG: Fix scipy incompatibility with cleanup to poly1d
| * | | | | BUG: Prevent modification of coefficientsEric Wieser2017-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `poly.coeffs = 1` has always failed with a strong exception guarantee. However, `poly.coeffs += 1` would both change the state and fail. Now both fail without affecting the value.
| * | | | | BUG: Fix regression in scipy that relied on quirky behaviourEric Wieser2017-03-211-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | Scipy needs `.__dict__['coeffs']` to work, so we can't call the member _coeffs
* | | | | | DOC: Include np. prefix in meshgrid examplesEgor Klenin2017-03-211-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Add "np." prefix to meshgrid calls for consistency
* | | | | | Merge pull request #8762 from eric-wieser/poly1d-fixesCharles Harris2017-03-142-29/+54
|\ \ \ \ \ \ | |/ / / / / | | | | | | BUG: Prevent crash in poly1d.__eq__
| * | | | | DEP: Deprecate copying random properties in __init__Eric Wieser2017-03-091-2/+9
| | | | | |
| * | | | | MAINT: Remove weird __setattr__ logic emulating propertiesEric Wieser2017-03-091-27/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Presumably written long before @property existed. This means we don't need __dict__ everywhere
| * | | | | BUG: Prevent crash in poly1d.__eq__Eric Wieser2017-03-092-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | Fixes #8760
* | | | | | Merge pull request #8750 from warut-vijit/masterEric Wieser2017-03-082-1/+8
|\ \ \ \ \ \ | |/ / / / / |/| | | | | BUG: Fix np.average for object arrays
| * | | | | BUG: Fix np.average with object array weightsDuke Vijitbenjaronk2017-03-072-1/+8
| | |/ / / | |/| | | | | | | | | | | | | Fixes #8696
* | | | | BUG: Make MaskedArray.argsort and MaskedArray.sort consistentEric Wieser2017-03-071-0/+12
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | Previously, these had different rules for unmasking values, and even different arguments to decide how to do so. Fixes #8664
* | | | DOC: Fixed small mistakes in numpy.copy documentation.Michael Seifert2017-02-261-68/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Including missing backticks around link, included a missing colon in example and removed excessive indentation before "doctest skip directive". [skip ci]
* | | | Merge pull request #8685 from eric-wieser/shape-to-ndimJulian Taylor2017-02-257-17/+17
|\ \ \ \ | | | | | | | | | | ENH: add dtype.ndim
| * | | | MAINT: replace len(x.shape) with x.ndimEric Wieser2017-02-247-17/+17
| | | | |
* | | | | Merge pull request #8688 from madphysicist/patch-1Charles Harris2017-02-241-1/+8
|\ \ \ \ \ | | | | | | | | | | | | DOC: Added note to np.diff
| * | | | | DOC: Added note to np.diffJoseph Fox-Rabinovitz2017-02-241-1/+8
| |/ / / / | | | | | | | | | | | | | | | Also noted that type is preserved. [ci skip]
* | | | | MAINT: Fix use of Python 2.6 deprecated escape sequences.Charles Harris2017-02-241-2/+2
|/ / / / | | | | | | | | | | | | Closes #8687.
* | | | Merge pull request #8646 from joshloyal/enh-inplace-nan_to_numEric Wieser2017-02-242-2/+19
|\ \ \ \ | | | | | | | | | | ENH: Allow for an in-place nan_to_num conversion
| * | | | ENH: Allow for an in-place nan_to_num conversion. Fixes #8634Joshua Loyal2017-02-202-2/+19
| | |/ / | |/| |
* | | | Merge pull request #8677 from eric-wieser/use-izip_longestJulian Taylor2017-02-231-13/+9
|\ \ \ \ | | | | | | | | | | MAINT: We can now rely on itertools.izip_longest existing
| * | | | MAINT: We can now rely on itertools.izip_longest existingEric Wieser2017-02-231-13/+9
| | | | |
* | | | | Merge pull request #8668 from flying-sheep/patch-1Eric Wieser2017-02-221-2/+9
|\ \ \ \ \ | | | | | | | | | | | | DOC: Add more examples for np.c_
| * | | | | DOC: Added “See Also” section for c_Philipp A2017-02-221-2/+5
| | | | | |
| * | | | | DOC: Added more common example for np.c_Philipp A2017-02-221-0/+4
| |/ / / / | | | | | | | | | | | | | | | I mostly use that object to bind 1D arrays as columns, so I added an example for that use case.