summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #11479 from wdirons/fix_define_for_ppc64_and_ppc64leCharles Harris2018-07-051-4/+6
|\ | | | | BUG: Fix #define for ppc64 and ppc64le
| * BUG: Fix #define for ppc64 and ppc64leWilliam D. Irons2018-07-021-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current logic for defining NPY_CPU_PPC64LE and NPY_CPU_PPC64 is incorrect for two reasons: 1) The elif defined for __powerpc__ is proceesed first so any ppc64le or ppc64 system is defined as NPY_CPU_PPC. 2) __ppc64le__ is not defined on a ppc64le system. __PPC64__ is defined and so is __powerpc64__ but the check for little or big endian needs to be done seperately. This pull request fixes the defines for ppc64le and ppc64. Note: This really isn't a issue in the numpy code base at this time because the only place this variable is referenced is in npy_endian.h as a fallback in case endian.h is not on the system. It would be good to fix in case future code does reference these defines.
* | Merge pull request #11487 from mattip/sanity-check-2Charles Harris2018-07-041-1/+3
|\ \ | | | | | | DOC: extend sanity check message
| * | DOC: extend sanity check messagemattip2018-07-041-1/+3
| | |
* | | Merge pull request #11016 from stuartarchibald/wip/armv7_aarch32Matti Picus2018-07-043-27/+46
|\ \ \ | |/ / |/| | ENH: Add AARCH32 support.
| * | Adjust endianness header file to accommodate AARCHXX changes.Stuart Archibald2018-06-261-20/+23
| | | | | | | | | | | | As title.
| * | ENH: Add AARCH32 support.Stuart Archibald2018-06-262-7/+23
| | | | | | | | | | | | | | | This adds support for identifying AARCH32 and AARCH64 at compile time such that alignment etc is correctly determined.
* | | BUG/ENH: Einsum optimization path updates and bug fixes. (#11345)Daniel Smith2018-07-032-92/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Minor tweaks to the optimal path based on opt_einsum * Updates greedy path to current opt_einsum tech * Reworks einsum broadcasting vs dot tech and can_dot logic * MAINT: Fix typo in comment. * BUG: Fix bad merge fixup.
* | | Merge pull request #11468 from seberg/fancy-assignment-no-fastpathCharles Harris2018-07-033-20/+36
|\ \ \ | | | | | | | | BUG: Advanced indexing assignment incorrectly took 1-D fastpath
| * | | BUG: Advanced indexing assignment incorrectly took 1-D fastpathSebastian Berg2018-07-023-20/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the index array was non contiguous and not 1D the assignment 1D fastpath (indexed array being 1D) was incorrectly taken (also the assignment value had to be 0D for this to happen). This caused the iteration to use the itemsize as a stride, since it incorrectly assumed the array must be contiguous. The commit additionally adds an assert to the STRIDE fetching macro. Closes gh-11467.
* | | | Merge pull request #11474 from eric-wieser/move-add-new-docsCharles Harris2018-07-025-39/+43
|\ \ \ \ | | | | | | | | | | MAINT: Move add_newdocs into core, since it only adds docs to those pieces
| * | | | MAINT: Move add_newdocs into core, since it only adds docs to those piecesEric Wieser2018-07-025-39/+43
| | | | |
* | | | | Merge pull request #11473 from eric-wieser/move-pytesttesterMarten van Kerkwijk2018-07-0213-13/+16
|\ \ \ \ \ | |/ / / / | | | | | MAINT: Move pytesttester outside of np.testing, to avoid creating unnecessary import dependencies
| * | | | MAINT: Move pytesttester outside of np.testing, to avoid creating ↵Eric Wieser2018-07-0213-13/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unnecessary import dependencies pytesttester is used by every single subpackage, so making it depend on np.testing just creates cyclic dependencies that can lead to circular imports Relates to #11457
* | | | | Merge pull request #11351 from mhvk/ufunc-parsing-speedup-alternativeEric Wieser2018-07-023-251/+349
|\ \ \ \ \ | |_|_|_|/ |/| | | | MAINT: Improve speed of ufunc kwargs parsing
| * | | | MAINT: Improve speed of ufunc kwargs parsing.Marten van Kerkwijk2018-06-293-251/+349
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using the realization from inspecting similar CPython code that as we intern string names anyway, comparing keys with possible names by pointer will generally just work. Also rather drastically rewrote, to use a new parser with simple conversion functions to replace part of the enormous switch/case structure, process out separately, and check for duplication after the parsing. Reduces the overhead as follows: ``` import numpy as np a = np.array(1) b = np.empty_like(a) %timeit np.positive(a) # 352->348 ns %timeit np.positive(a, subok=True) # 606->501 ns %timeit np.positive(a, where=True) # 586->503 ns %timeit np.positive(a, where=True, subok=True) # 695->531 ns %timeit np.positive(a, b) # 354->352 ns %timeit np.positive(a, out=b) # 557->480 ns %timeit np.positive(a, out=b, subok=True) # 668->506 ns %timeit np.positive(a, out=b, where=True, subok=True) # 752->536 ns ```
* | | | | Merge pull request #11444 from silenc3r/patch-1Matti Picus2018-07-011-1/+1
|\ \ \ \ \ | | | | | | | | | | | | DOC: Fix documentation for fromfunction
| * | | | | Fix documentation for fromfunctionsilenc3r2018-06-281-1/+1
| | | | | | | | | | | | | | | | | | ```np.fromfunction(lambda i, j: 1, (3, 3), dtype=int)``` returns ```1```.
* | | | | | Merge pull request #11471 from eric-wieser/move-add-new-docsCharles Harris2018-07-012-119/+92
|\ \ \ \ \ \ | | |_|/ / / | |/| | / / | |_|_|/ / |/| | | | MAINT: Remove python-side docstrings from add_newdocs.
| * | | | MAINT: Remove python-side docstrings from add_newdocs.Eric Wieser2018-07-012-119/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From the header comment in add_newdocs, it is only intended for C modules. This also fixes `help(np.mgrid)`, which previously only showed the help for `nd_grid`
* | | | | Merge pull request #11432 from mattip/refactor-new_array_for_sumMarten van Kerkwijk2018-06-304-196/+120
|\ \ \ \ \ | | | | | | | | | | | | MAINT: Refactor differences between cblas_matrixproduct and PyArray_MatrixProduct2
| * | | | | MAINT: refactor duplicate code into 'common.c'mattip2018-06-294-196/+120
| | | | | |
* | | | | | Merge pull request #11396 from pimdh/masterEric Wieser2018-06-291-0/+15
|\ \ \ \ \ \ | | | | | | | | | | | | | | TST: Added regression test for #11395
| * | | | | | TST: Added regression test for #11395Pim de Haan2018-06-211-0/+15
| | | | | | |
* | | | | | | Merge pull request #11440 from jackvreeken/fix-interp-for-nan-infEric Wieser2018-06-292-0/+22
|\ \ \ \ \ \ \ | |_|_|/ / / / |/| | | | | | BUG: fix interpolation with inf and NaN present
| * | | | | | BUG: fix interpolation with inf and NaN presentJack Vreeken2018-06-292-0/+22
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Values like NaN and inf would result in wrong interpolated values on exactly matching sampling points. To produce the correct behavior, we add an additional check to avoid interpolation when handling such a point. Closes #11439
* | | | | | Merge pull request #11449 from charris/revert-10229Charles Harris2018-06-291-13/+3
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | BUG: Revert #10229 to fix DLL loads on Windows.
| * | | | | BUG: Revert #10229 to fix DLL loads on Windows.Charles Harris2018-06-291-13/+3
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Numpy wheels on Windows were clearing the ctypes path when they loaded the OpenBLAS DLL, leading to failure of DLL loads subsequent to NumPy import because the needed DLLs could not be found. This isn't a straight revert, it restores to the 1.15.x version of the relevant code. Closes #11431.
* | | | | Merge pull request #11406 from mattip/einsum-out-is-resCharles Harris2018-06-292-18/+15
|\ \ \ \ \ | | | | | | | | | | | | BUG: ensure ret is out in einsum
| * | | | | MAINT: cleanup ret assignmentmattip2018-06-271-20/+7
| | | | | |
| * | | | | check for unlikely error in Assign_Zeromattip2018-06-241-1/+3
| | | | | |
| * | | | | BUG: ensure ret is out in einsummattip2018-06-212-1/+9
| | | | | |
* | | | | | Merge pull request #11425 from eric-wieser/where-nonzero-docsMarten van Kerkwijk2018-06-294-59/+72
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | DOC: Clear up confusion between np.where(cond) and np.where(cond, x, y)
| * | | | | DOC: Clear up confusion between np.where(cond) and np.where(cond, x, y)Eric Wieser2018-06-294-59/+72
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminates all mentions of `np.where(cond)`, instead pointing the reader to np.nonzero. Also changes some example numbers to avoid collisions, making them easier to follow. Some minor doc improvements for np.ma.where too.
* | | | | MAINT: Split off getting overrides and checking for them.Marten van Kerkwijk2018-06-283-76/+144
| | | | | | | | | | | | | | | | | | | | | | | | | Code was getting too convoluted and both can be optimized in different ways.
* | | | | MAINT: Ensure __array_ufunc__ on given class is only called once.Marten van Kerkwijk2018-06-282-9/+69
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | Overall, it likely doesn't matter much for performance, but it is more logical and more consistent with what python does: reverse operators are not called if the forward one of a given class already returned NotImplemented.
* | | | Merge pull request #11347 from mattip/less-sphinx-warningsRalf Gommers2018-06-272-10/+12
|\ \ \ \ | | | | | | | | | | DOC: Silence many sphinx warnings
| * | | | fixes from reviewmattip2018-06-241-8/+8
| | | | |
| * | | | DOC: typos, small fixesmattip2018-06-152-3/+5
| | | | |
* | | | | DOC: Update einsum docs (#11234)attack682018-06-272-180/+358
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Einsum docs improvements. * DOC: add information to numpy.core.einsumfunc * DOC: add information to numpy.core.einsumfunc * DOC: add information to numpy.core.einsumfunc * DOC: add information to numpy.core.einsumfunc * DOC: remove 'numpy.core','c_einsum' section from 'add_newdocs.py' * DOC: make :py:func links to all internal functions. * DOC: make :py:func links to all internal functions (minor corrections) * DOC: place `add_newdoc('numpy.core.multiarray','c_einsum'`,...) in file. * DOC: minor requested corrections * DOC: suggested optimize argument Example cases * DOC: copy amendments to second docstring location in add_newdocs.py * DOC: more descriptive text * DOC: required correction to specify a default argument. * DOC: minor presentation fix for example display in einsumfunc.py * DOC: amend c_einsum documentation version, add note about dual documentation
* | | | | Merge pull request #11424 from eric-wieser/empty-svdseberg2018-06-273-17/+25
|\ \ \ \ \ | | | | | | | | | | | | ENH: Allow use of svd on empty arrays
| * | | | | ENH: Allow use of svd on empty arraysEric Wieser2018-06-273-17/+25
| | |/ / / | |/| | | | | | | | | | | | | part of #8654
* | | | | Merge pull request #11428 from eric-wieser/deprecate-normed-1.15.0Charles Harris2018-06-272-1/+5
|\ \ \ \ \ | |/ / / / |/| | | | BUG: Fix incorrect deprecation logic for histogram(normed=...) (master)
| * | | | BUG: Fix incorrect deprecation logic for histogram(normed=...)Eric Wieser2018-06-262-1/+5
| | | | | | | | | | | | | | | | | | | | Fixes #11426, which was introduced in #11323 and #11352
* | | | | Merge pull request #11335 from pvanmulbregt/stride123Matti Picus2018-06-251-9/+5
|\ \ \ \ \ | | | | | | | | | | | | DOC: Change array lengths/entries in broadcast_arrays example to reduce confusion.
| * | | | | DOC: Change array lengths/entries in an example to reduce confusion.Paul van Mulbregt2018-06-141-9/+5
| | | | | |
* | | | | | Merge pull request #11383 from mattip/recreate-8717Eric Wieser2018-06-243-15/+24
|\ \ \ \ \ \ | | | | | | | | | | | | | | ENH: Allow size=0 in numpy.random.choice
| * | | | | | fixes from reviewmattip2018-06-212-5/+6
| | | | | | |
| * | | | | | ENH: Allow size=0 in numpy.random.choicemattip2018-06-193-15/+23
| | | | | | |
* | | | | | | BUG: Ensure comparisons on scalar strings pass without warning.Marten van Kerkwijk2018-06-213-9/+22
| |_|_|_|/ / |/| | | | |