summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
* MAINT: Const qualify UFunc inner loops (gh-15355)Kai Striega2020-01-2115-335/+332
| | | | | This PR const qualifies the dimension and strides arguments of PyUFuncGenericFunction. Const qualified arguments make it simpler to reason about the behaviour of these ufuncs and prevents accidental mutation. As the const is now required this PR also const qualifies calls to PyUFuncGenericFunction inside the NumPy source code. This closes #15252
* Merge pull request #15375 from sethtroisi/misc_cleanupsMatti Picus2020-01-225-78/+59
|\ | | | | STY: Use `with open` when possible
| * STY: use `with open` when possibleSeth Troisi2020-01-215-78/+59
| |
* | TST: Simplify unicode testSeth Troisi2020-01-211-27/+15
|/
* Merge pull request #15369 from Kai-Striega/simd_fix_signed_comparisonSebastian Berg2020-01-211-1/+1
|\ | | | | MAINT: simd: Avoid signed comparison warning
| * MAINT: simd: Avoid signed comparison warningkai-striega2020-01-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do not need to cast the dimensions (`n`) to ``npy_uintp`` when comparing it to the stride length (of type ``npy_intp``). The cast is kept from similar checks where the cast is required ``(npy_uintp)n < (VECTOR_SIZE_BYTES / sizeof(@type@))`` In this case `strides` is precalcuated as ``VECTOR_SIZE_BYTES / (npy_intp)sizeof(@type@))`` therefore `n` is already of the correct type when the check is performed.
* | NEP: issue deprecation warning when creating ragged array (NEP 34)Matti Picus2020-01-2117-57/+135
|/ | | | This implements NEP 34.
* [MAINT] Cleanup python2 sys.version checksSeth Troisi2020-01-2025-315/+99
|
* MAINT: Remove unnecessary calls to PyArray_DATA from binomial functionsAlex Henrie2020-01-192-2/+0
|
* Merge pull request #15279 from mattip/openblasTyler Reddy2020-01-194-7/+15
|\ | | | | BUILD: use standard build of OpenBLAS for aarch64, ppc64le, s390x
| * MAINT: try to avoid spurious warnings in einsummattip2020-01-171-0/+8
| |
| * BLD: use 0.3.7 release version, add dependency on libgfortran5mattip2020-01-173-7/+7
| |
* | Merge pull request #15224 from pv/lapack-lite-symrenameMatti Picus2020-01-2012-37/+787
|\ \ | | | | | | MAINT: linalg: use symbol suffix in fallback lapack_lite
| * | GEN: regenerate lapack_litePauli Virtanen2020-01-148-25/+716
| | |
| * | MAINT: linalg: use symbol suffix in fallback lapack_litePauli Virtanen2020-01-144-12/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building the fallback lapack_lite library for numpy.linalg, add symbol suffix to the routines when using 64-bit integer indices. Adjust the lapack_lite generator script to also output a header file that renames the symbols. Moreover, also rename symbols from f2c.c, to be sure (because they have short and generic names that may clash). This avoids a name clash with BLAS/LAPACK names, which can cause problems in corner cases on platforms where inadvertent symbol overriding in dynamic libraries can occur.
* | | MAINT: Remove unneccessary call to NpyIter_IterationNeedsAPI (#15348)Eric Wieser2020-01-191-2/+0
|\ \ \
| * | | MAINT: Remove unneccessary call to NpyIter_IterationNeedsAPIAlex Henrie2020-01-191-2/+0
| | | |
* | | | MAINT: Fix mistype in histogramdd docstringKirill Zinovjev2020-01-191-2/+2
|/ / /
* | | ENH: add identity kwarg to frompyfunc (#8255)mattharrigan2020-01-163-8/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ENH: add identity kwarg to frompyfunc * Update umathmodule.c * Add test, docs, and release note for identity Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
* | | Merge pull request #15011 from hmaarrfk/compat_cleanup_35Sebastian Berg2020-01-161-118/+51
|\ \ \ | | | | | | | | MAINT: cleanup compat.py3k.py
| * | | MAINT: cleanup compat.py3k.pyMark Harfouche2020-01-031-118/+51
| | | |
* | | | Merge pull request #15217 from eric-wieser/deprecate-shape-0Sebastian Berg2020-01-161-6/+29
|\ \ \ \ | | | | | | | | | | DEP: records: Deprecate treating shape=0 as shape=None
| * | | | DEP: records: Deprecate treating shape=0 as shape=NoneEric Wieser2020-01-011-6/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `shape=n` is a shorthand for `shape=(n,)` except in the case when `n==0`, when it is a shorthand for `shape=None`. This special case is dangerous, as it makes `fromrecords(..., shape=len(a))` behave surprisingly when a is an empty sequence. Users impacted by this warning either: * Have a bug in their code, and will need to either: - wait for the deprecation to expire - change their code to use `(len(a),)` instead of `len(a)` * Are using the non-preferred spellling, and will need to replace a literal `0` or `False` with `None`
* | | | | Merge pull request #15118 from mattip/cleanup-array-callSebastian Berg2020-01-165-75/+29
|\ \ \ \ \ | |_|_|_|/ |/| | | | API: remove undocumented use of __array__(dtype, context)
| * | | | MAINT: remove undocumented use of context in __array__(dtype, context)mattip2020-01-165-75/+29
| | | | |
* | | | | MAINT: Remove duplicate deprecation of fastclipSebastian Berg2020-01-151-8/+9
| | | | |
* | | | | DEP: Deprecate `->f->fastclip` at registration timeSebastian Berg2020-01-151-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | This adds the additional deprecation of fastclip if it is set at registration time instead of only testing that it is never used.
* | | | | Merge pull request #14942 from seberg/clean-fasttakeMatti Picus2020-01-165-299/+279
|\ \ \ \ \ | | | | | | | | | | | | MAINT,API: ignore and NULL fasttake/fastputmask ArrFuncs slots
| * | | | | DEP: Actually deprecate fasttake and fastclipmaskSebastian Berg2020-01-151-0/+31
| | | | | |
| * | | | | MAINT,API: Do not use fastputmask dtype slot and always NULL itSebastian Berg2020-01-073-73/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the use of the fastputmask ArrFuncs slot from within NumPy and always leaves it NULL.
| * | | | | MAINT,API: Do not use fasttake slot of ArrFuncs and null itSebastian Berg2020-01-073-226/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Always NULL the fasttake slot, and instead move the optimized versions by doing itemsize specialization in the Take function itself.
* | | | | | Merge pull request #15305 from sethtroisi/sys_version_testsMatti Picus2020-01-1631-553/+246
|\ \ \ \ \ \ | | | | | | | | | | | | | | MAINT: Remove sys.version checks in tests
| * | | | | | MAINT: Remove sys.version checks in testsSeth Troisi2020-01-1531-553/+246
| | | | | | |
* | | | | | | Merge pull request #15286 from haojin2/patch-1Matti Picus2020-01-161-1/+5
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | DOC: Update ``np.full`` docstring.
| * | | | | | Update doc for np.fullHao Jin2020-01-071-1/+5
| | | | | | | | | | | | | | | | | | | | | Previous document was not properly documenting the case when `fill_value` is an array_like object.
* | | | | | | Merge pull request #15307 from sethtroisi/sys_version_preMatti Picus2020-01-169-187/+88
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | MAINT: cleanup sys.version dependant code
| * | | | | | | MAINT: cleanup sys.version dependant codeSeth Troisi2020-01-129-187/+88
| | | | | | | |
* | | | | | | | MAINT: Ragged cleanup (#15085)Matti Picus2020-01-153-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * TST: refactor sorter tests, use proper ragged array creation syntax * MAINT: code never hit the exception, but would error when iterating * MAINT: pytest.mark.parametrize did not add much, removing (from review) * MAINT: use asanyarray and generalize (from review) Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
* | | | | | | | Merge pull request #15333 from eric-wieser/use-PyDict_GetItemWithErrorMatti Picus2020-01-166-40/+166
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | BUG: Add some missing C error handling
| * | | | | | | | BUG: Add some missing C error handlingEric Wieser2020-01-156-40/+166
| | | | | | | | |
* | | | | | | | | Merge pull request #15319 from Kai-Striega/correct_array_nameEric Wieser2020-01-151-3/+5
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | BUG: fix NameError in clip nan propagation tests
| * | | | | | | | | TST: fix NameError in clip nan propogation testskai-striega2020-01-121-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test expects parameters `arr`, `amin` and `amax`. However it then uses `a`, `amin` and `amax` resulting in a `NameError`. This error was not caught as the test was marked with xfail. This commit changes `a` -> `arr` removing the NameError. Further it adds precautions against similar errors requiring the error to be an AssertionError and making the test strict.
* | | | | | | | | | TST: move _no_tracing to testing._privatemattip2020-01-153-22/+24
| | | | | | | | | |
* | | | | | | | | | Merge pull request #15262 from eric-wieser/use-PyDict_GetItemWithErrorMatti Picus2020-01-1515-90/+307
|\ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / | |/| | | | | | | | BUG: Use PyDict_GetItemWithError() instead of PyDict_GetItem()
| * | | | | | | | | BUG: Use PyDict_GetItemWithError() instead of PyDict_GetItem()Eric Wieser2020-01-1415-90/+307
| | |_|_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This means we no longer interpret `MemoryError` or `KeyboardInterrupt` as `keyword arg not provided`, for instance. This function is python 3 only, hence this was difficult to do in older versions of numpy. Inspired by https://bugs.python.org/issue35459
* | | | | | | | | DOC: fix typosBrian Wignall2020-01-1419-21/+21
|/ / / / / / / /
* | | | | | | | Merge pull request #15124 from Bharat123rox/clipMatti Picus2020-01-141-1/+2
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | DOC: Update documentation of np.clip
| * | | | | | | | Doc changes per reviewBharat Raghunathan2019-12-181-1/+1
| | | | | | | | |
| * | | | | | | | DOC: Update documentation of np.clipBharat Raghunathan2019-12-181-1/+2
| | | | | | | | |
* | | | | | | | | Merge pull request #15144 from mhvk/ufunc-reduction-output-dimension-checkMatti Picus2020-01-142-2/+38
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | BUG: ensure reduction output matches input along non-reduction axes.