summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
* DOC: Grammar of np.gradient docstringAllan Haldane2018-03-061-3/+3
| | | | [ci-skip]
* DOC: add versionadded for NDArrayOperatorsMixin.Stephan Hoyer2018-03-041-0/+2
|
* MAINT: Covariance must be symmetric as well as positive-semidefinite. (#10669)Oleg Zabluda2018-03-041-7/+8
| | | | | | | | * [BUG] add "symmetric" to "positive-semidefinite" * Break line, fix comments * break long line
* BUG: F2py mishandles quoted control characters (#10676)bobeldering2018-03-042-37/+79
| | | | | | | | | | | | | | | | | * BUG: improve parsing of quoted control characters in numpy.f2py. See #10634. Fixes a couple of cases where quoted control characters are parsed as if they are unquoted. The control characters considered are "()!;". * TST: quoted characters parsing by numpy.f2py. Basic test of parsing quoted Fortran control characters. See #10634. * BUG: add missing space character when reconstructing fortran line. The missing space caused a line starting with "!f2py" to be considered a continuation line.
* Merge pull request #10679 from NelleV/10611_docstringsCharles Harris2018-03-012-10/+13
|\ | | | | DOC zeros, empty, and ones now have consistent docstrings
| * DOC zeros, empty, and ones now have consistent docstringsNelle Varoquaux2018-03-012-10/+13
| | | | | | | | closes #10611
* | Merge pull request #10547 from hobler/patch-1Charles Harris2018-02-281-1/+1
|\ \ | |/ |/| DOC: Fix incorrect formula in gradient docstring.
| * Update function_base.pyhobler2018-02-081-1/+1
| |
* | Merge pull request #8819 from mhvk/gufunc-axis-argumentAllan Haldane2018-02-282-29/+321
|\ \ | | | | | | ENH: Implement axes keyword argument for gufuncs.
| * | MAINT: Check operand sizes before doing anything with themMarten van Kerkwijk2018-02-272-17/+25
| | | | | | | | | | | | | | | | | | This ensures we do not have to guard against any operand having fewer dimensions than required by the ufunc in, e.g., _parse_axes_argument.
| * | ENH: Implement axes keyword argument for gufuncs.Marten van Kerkwijk2018-02-272-16/+300
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The axes argument allows one to specify the axes on which the gufunc will operate (by default, the trailing ones). It has to be a list with length equal to the number of operands, and each element a tuple of length equal to the number of core dimensions, with each element an axis index. If there is only one core dimension, the tuple can be replaced by a single index, and if none of the outputs have core dimensions, the corresponding empty tuples can be omitted.
* | | STY: Minor stylistic cleanup of numeric.pyAndrey Portnoy2018-02-281-22/+28
|/ / | | | | | | No changes to the logic, only minor edits guided by flake8.
* | Merge pull request #10671 from luzpaz/more-misc-typosEric Wieser2018-02-274-9/+9
|\ \ | | | | | | DOC/MAINT: More misc. typos
| * | DOC/MAINT: More misc. typosluz.paz2018-02-274-9/+9
| | | | | | | | | Found via `codespell` and `grep`
* | | MAINT: Unify reductions in fromnumeric.pyHameer Abbasi2018-02-261-65/+30
|/ /
* | Merge pull request #10658 from eric-wieser/fix-partition-matrixMarten van Kerkwijk2018-02-262-2/+19
|\ \ | | | | | | BUG: Make np.partition and np.sort work on np.matrix when axis=None
| * | BUG: Make np.partition and np.sort work on np.matrix when axis=NoneEric Wieser2018-02-252-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both were making the normally valid assumption that flatten actually flattens, which turns out to be false for matrices. Old behavior: >>> a = np.matrix([[1, 2, 0]]) >>> np.partition(a, 1, axis=None) ValueError: kth(=1) out of bounds (1) >>> np.sort(a, axis=None) matrix([[1, 2, 0]])
* | | Merge pull request #10660 from eric-wieser/0d-interp-simplerMarten van Kerkwijk2018-02-263-22/+18
|\ \ \ | | | | | | | | BUG/MAINT: Remove special cases for 0d arrays in interp
| * | | BUG/MAINT: Remove special handling of 0d arrays and scalars in interpEric Wieser2018-02-252-18/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are now handled generically by the underlying C function This fixes the period argument for 0d arrays. Now never returns a pure-python scalar, which matches the behaviour of most of numpy. Rework of b66a200a4a1e98f1955c8a774e4ebfb4588dab5b
| * | | MAINT: Make the internal np.core.multiarray.[complex_]interp work on 0d arraysEric Wieser2018-02-251-4/+4
| |/ / | | | | | | | | | | | | | | | Like other functions, returns a numpy scalar in place of 0d arrays Previously this would throw an exception
* | | Merge pull request #10653 from eric-wieser/remove-duplicate-functionsCharles Harris2018-02-241-117/+75
|\ \ \ | |/ / |/| | MAINT: Remove duplicate implementation for aliased functions.
| * | MAINT: Remove duplicate implementation for aliased functions.Eric Wieser2018-02-241-117/+75
| | | | | | | | | | | | Fixes #10651 by replacing the behavior of `product` with that of `prod`
* | | Merge pull request #10657 from pv/pypy-f2py-cbCharles Harris2018-02-241-5/+25
|\ \ \ | | | | | | | | BUG: f2py: fix f2py generated code to work on Pypy
| * | | BUG: f2py: fix f2py generated code to work on PypyPauli Virtanen2018-02-241-5/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | F2py generates code that uses PyTuple_SetItem on a tuple that has been "used", which is invalid on Pypy. Add #ifdefs that make the generated code convert the object to a list, use PyList_SetItem, and then convert it back to a tuple.
* | | | Merge pull request #10650 from eric-wieser/longdouble_intCharles Harris2018-02-242-2/+2
|\ \ \ \ | |/ / / |/| | | BUG: Fix missing NPY_VISIBILITY_HIDDEN on npy_longdouble_to_PyLong
| * | | BUG: Fix missing NPY_VISIBILITY_HIDDEN on npy_longdouble_to_PyLongEric Wieser2018-02-222-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fixes #10648 NPY_VISIBILITY_HIDDEN is used by memoverlap.{c,h}, so we should be using the same thing here
* | | | Merge pull request #10599 from girving/flatnonzeroEric Wieser2018-02-221-4/+4
|\ \ \ \ | | | | | | | | | | ENH: Make flatnonzero call asanyarray before ravel()
| * | | | ENH: make flatnonzero use np.ravel(a) instead of a.ravel()Geoffrey Irving2018-02-211-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It now works for lists and other numpy-convertible input. Fixes #10598.
* | | | | MAINT: Improve range error messages in np.histogram (#10603)Kirit Thadaka2018-02-201-7/+9
| | | | |
* | | | | BUG: Improving the accuracy of the FFT implementationNils Becker2018-02-201-46/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the numerical constants in the FFT code were not provided at full double precision which led to a loss of accuracy in the FFT operation. Additionally this commit improves the accuracy of the twiddle factor calculation by reducing the argument of exp(2j*pi*m/n) to the first octant before calling the library function. On average the commit lowers the remaining numerical error in the FFT by a factor of ten.
* | | | | Merge pull request #10501 from msornay/fromregex-bytesEric Wieser2018-02-202-3/+10
|\ \ \ \ \ | | | | | | | | | | | | BUG: fromregex: asbytes called on regexp objects
| * | | | | BUG: fromregex: asbytes called on regexp objectsMathieu Sornay2018-02-052-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When calling fromregex() with a binary stream and a regular expression object, asbytes() was called on the regexp object, resulting in an incorrect regular expression being compiled and used.
* | | | | | Merge pull request #10621 from ahaldane/fix_arrayprint_recursive_closureEric Wieser2018-02-194-9/+37
|\ \ \ \ \ \ | | | | | | | | | | | | | | BUG: deallocate recursive closure in arrayprint.py
| * | | | | | BUG: break cyclic refs in recursive closuresAllan Haldane2018-02-184-9/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #10620
* | | | | | | BUG: Correctly identify comma seperated dtype stringsSimon Gibbons2018-02-182-1/+6
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When parsing dtype strings, we should only consider them to be comma seperated if there are commas not present in a pair of square brackets. Whilst we had a check for this already in the code there was an off by 1 bug where we failed to consider the first character of the string. This would lead to an infinite recursion when trying to parse strings of the form `[i8,f8]`. Fixes: #10440
* | | | | | Merge pull request #10554 from eric-wieser/promote_types-not-associativeAllan Haldane2018-02-171-1/+9
|\ \ \ \ \ \ | | | | | | | | | | | | | | DOC: promote_types is _not_ associative by design,
| * | | | | | Update add_newdocs.pyEric Wieser2018-02-161-1/+1
| | | | | | |
| * | | | | | DOC: promote_types is _not_ associative by design, despite the fact it would ↵Eric Wieser2018-02-081-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | be nice if it was Also give an example of the non-associative case.
* | | | | | | Merge pull request #10606 from charris/fix-polynomial-testCharles Harris2018-02-161-3/+3
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | MAINT: Do not use random roots when testing roots.
| * | | | | | | MAINT: Do not use random when testing roots.Charles Harris2018-02-161-3/+3
| | |_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `check_roots` function in numpy/polynomial/tests/test_classes.py was using random numbers without a seed to generate the random roots to be checked. This made the test sensitive to the random state, with the result that currently two of the roots are close together and fail the test to the default seven digit precision when running on the Mac. The failure is probably due to a combination of library and compiler differences between the Mac and the other platforms tested.. The fix here is to hardwire the test values rather than use random numbers.
* | | | | | | BUG: Align type definition with generated lapack (#10477)xoviat2018-02-1611-819/+256
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Align type definitions * Regenerate sources * Replace BytesIO * Consolidate executables * Create directories on PY2 * Revise step name * Consolidate directory creation * Don't catch makedirs errors * Revise step name * Add header source
* | | | | | | Misc. typosluz.paz2018-02-165-5/+5
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found via `codespell -q 3 -I ../numpy-whitelist.txt` Whitelist consists of: ``` amin ans behaviour cancellation dum initialise ith nd ot splitted writeable ``` .
* | | | | | Merge pull request #10596 from charris/update-sphinxext-submoduleCharles Harris2018-02-151-5/+7
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | DOC: Update sphinxext submodule hash.
| * | | | | BUG: Functions in ma should not add Notes to existing docstrings.Charles Harris2018-02-151-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the `doc_note` function in `numpy.ma.core.py` is called to add a "Notes" section to the existing docstrings of the unmasked versions of some functions. This may result in duplicate "Notes" sections, or incorrect placement, which are errors in current numpydoc. This PR disables the `doc_note` function until we can decide on the proper way to deal with the problem.
* | | | | | Merge pull request #10381 from eric-wieser/fix-segfaultAllan Haldane2018-02-153-15/+48
|\ \ \ \ \ \ | | | | | | | | | | | | | | BUG/ENH: Improve output for structured non-void types
| * | | | | | ENH: Always show dtype fields in the array repr, even for non-voidEric Wieser2018-02-152-7/+13
| | | | | | |
| * | | | | | BUG: Fix crash on non-void structured array reprEric Wieser2018-02-152-7/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes gh-9821
| * | | | | | BUG: Show the base of a compound dtype even when it doesn't subclass voidEric Wieser2018-02-152-2/+7
| | | | | | |
* | | | | | | Merge pull request #10588 from charris/remove-unique-optimizationCharles Harris2018-02-142-17/+31
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | BUG: Revert sort optimization in np.unique.
| * | | | | | BUG: Revert sort optimization in np.unique.Charles Harris2018-02-142-17/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The optimization was to sort integer subarrays by treating them as strings of unsigned bytes. That worked fine for finding the unique subarrays, but the sort order of the results could be unexpected. Closes #10495.