summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
* Update numpy/core/_add_newdocs.pyabhilash422020-05-191-1/+1
| | | Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Update numpy/core/_add_newdocs.pyabhilash422020-05-191-2/+1
| | | Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Update numpy/core/_add_newdocs.pyabhilash422020-05-191-1/+1
| | | Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Update _add_newdocs.pyabhilash422020-05-191-16/+8
|
* Update _add_newdocs.pyabhilash422020-05-181-4/+13
|
* DOC: Calrify tiny/xmin in finfo and machar (gh-16253)Raphael Kruse2020-05-182-5/+16
| | | | | | | | | | | | | | | | | | | This commit adds a note to the documentation of finfo clarifying that the attribute `tiny` does not represent the smallest positive usable number. Instead it refers to the smallest positive number with there being no leading 0's in the mantisse (normalized floating point number). Alternatively, `tiny` represents the smallest positive floating point number with full precision. The smallest positive subnormal floating point number is typically orders of magnitudes smaller, but has reduced precision since leading 0's in the mantisse are used to allow smaller exponents than indicated by `minexp`. The commit also adds a brief clarification to the docstring of machar. Closes #16252 Co-authored-by: Anirudh Subramanian <anirudh2290@apache.org> Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Merge pull request #16278 from SacredArrow/var-doc-editSebastian Berg2020-05-181-2/+2
|\ | | | | DOC: Clarifications for ``np.var``.
| * DOC: Clarifications for np.varDmitry Kutlenkov2020-05-171-2/+2
| |
* | Merge pull request #16238 from seberg/maint-cached-importsMatti Picus2020-05-185-50/+13
|\ \ | | | | | | MAINT: Unify cached (C-level static) imports
| * | MAINT: Unify cached (C-level static) importsSebastian Berg2020-05-145-50/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main idea is that once we unify them, we can think about actually being able to also clean them up. This is far away from having no global state, but at this time I do not see that as a seriousl goal personally. But it could be possible to reload the module safely in a single interpreter maybe. The commit adds the cache import for the complex casts, since it doubles performance for small casts when the warning is not suppressed and it unifies the handling.
* | | Merge pull request #16274 from eric-wieser/extract-lerpEric Wieser2020-05-171-19/+6
|\ \ \ | |_|/ |/| | MAINT: cleanups to quantile
| * | MAINT: Avoid moving axes around multiple timesEric Wieser2020-05-171-15/+5
| | | | | | | | | | | | It's easier to move the relevant axis to position 0 in `ap` first than it is to move it for every relevant object simultaneously.
| * | MAINT: Remove a pointless ifEric Wieser2020-05-171-4/+1
| | | | | | | | | | | | The `add` ufunc is happy to handle `out=None` by itself
* | | DOC: Clarifications for np.std (#16267)Dmitry Kutlenkov2020-05-171-11/+12
| | | | | | | | | | | | | | | | | | | | | * DOC: Clarifications for np.std * Line lengths fixes in np.std * Swapped variable names in np.std
* | | REL: Update master after 1.19.x branch.Charles Harris2020-05-172-0/+2
|/ / | | | | | | | | | | | | | | - Delete release note fragments from 1.19.0 (towncrier) - Update 1.19.x release note (towncrier) - Create 1.20.0-notes.rst for master development - Update C-API versions for 1.20.x - Update setup.py for 1.20.0
* | Merge pull request #16269 from tbm/typoMatti Picus2020-05-177-7/+7
|\ \ | | | | | | DOC: Fix typos and cosmetic issues
| * | DOC: Fix typos and cosmetic issuesMartin Michlmayr2020-05-177-7/+7
| | |
* | | Merge pull request #16263 from seberg/decref-fromarray-error-path-fixupCharles Harris2020-05-161-0/+1
|\ \ \ | | | | | | | | BUG: Add missing decref in fromarray error path
| * | | BUG: Add missing decref in fromarray error pathSebastian Berg2020-05-161-0/+1
| |/ / | | | | | | | | | | | | | | | This function steals the dtype, so it must decref it also on error. This is fixup of ffe76ac8df65c8e7831df9924a782276e060f3e6 which accidentally deleted the decref.
* | | BUG: numpy.einsum indexing arrays now accept numpy int type (gh-16080)Ryan2020-05-163-21/+33
|/ / | | | | | | | | | | | | | | | | | | | | | | | | * Using PyArray_PyIntAsIntp helper function instead * TST: add tests for einsum numpy int and bool list subscripts Added tests to check that einsum accepts numpy int64 types and rejects bool. Rejecting bools is new behaviour in subscript lists. I changed ValueError to TypeError on line 2496 in multiarraymodule.c as it is more appropriate. I also modified einsumfunc.py to have the same behaviour as in the C file when checking subscript list. (Reject bools but accept anything else from operator.index()) Closes gh-15961
* | Merge pull request #16197 from timhoffm/doc-stackSebastian Berg2020-05-153-21/+27
|\ \ | | | | | | DOC: Unify cross-references between array joining methods
| * | DOC: Unify cross-references between array joining methodsTim Hoffmann2020-05-103-21/+27
| | |
* | | Merge pull request #16240 from WarrenWeckesser/ptp-warningMatti Picus2020-05-152-7/+79
|\ \ \ | | | | | | | | DOC: Warn about behavior of ptp with signed integers.
| * | | DOC: Warn about behavior of ptp with signed integers.Warren Weckesser2020-05-152-7/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add a warning to the docstrings of numpy.ma.MaskedArray.ptp and numpy.ptp about a problem with signed integer arrays. * Add an example to the the docstring of numpy.ptp that demonstrates the issue and suggests a work-around. * Add an "Examples" section to the docstring of MaskedArray.ptp which includes the new example added to the docstring of numpy.ptp. * Make the numbers in the basic example more interesting.
* | | | BUG: max/min of a masked array dtype fix (gh-15991)Rakesh Vasudevan2020-05-142-5/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix for issue gh-15077. ma.core now checks and sets max and min values for all float and complex dtypes. This fixes the max of a masked array with a float16 or complex dtype returning inf Builds on top of gh-15086. Co-authored-by: William Jones <william.jones@physics.ox.ac.uk>
* | | | MAINT: Chain exceptions and use NameError in np.bmat (#16215)bartosz-grabowski2020-05-141-2/+2
|/ / / | | | | | | | | | | | | | | | | | | This solution is related to the issue #15986. I also made a change to the newer string formatting. Uses NameError, which prints nicer, and is actually the more correct error type. Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* | | DOC: Improve docstring of ``numpy.core.records`` (#16199)dojafrat2020-05-131-2/+52
| | | | | | | | | | | | | | | | | | Add documentation and examples to fromstring function See #15853 Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
* | | ENH: correct identity for logaddexp2 ufunc: -inf (gh-16102)Erik Welch2020-05-132-1/+7
| |/ |/| | | | | | | | | | | | | The lack of identity for `logaddexp2` was first identitifed in #4599. The implementation in #8955 added -inf as identity for `logaddexp`, but missed adding it for `logaddexp2`. Co-Authored-By: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
* | Merge pull request #16153 from bashtage/fix-mt19937-jumpCharles Harris2020-05-136-329/+210
|\ \ | | | | | | BUG: Correct loop order in MT19937 jump
| * | DOC: Update docstringKevin Sheppard2020-05-121-4/+3
| | | | | | | | | | | | Fix indent on reference and remove text that may be incorrect.
| * | DOC: Improve the docstring for MT19937.jumpedKevin Sheppard2020-05-121-0/+18
| | | | | | | | | | | | Clarify the method used and the source of the code
| * | MAINT: Remove unused fileKevin Sheppard2020-05-121-215/+0
| | | | | | | | | | | | Remove unused file containing the old polynomial representation.
| * | REF: Refactor jump codeKevin Sheppard2020-05-124-121/+154
| | | | | | | | | | | | | | | | | | Refactor polynomial to be unsigned long array Remove unused code Fix md5 calculation on BE
| * | BUG: Correct loop order in MT19937 jumpKevin Sheppard2020-05-123-6/+52
| | | | | | | | | | | | | | | | | | Use the original loop order instead of an inverted order closes #15394
* | | Merge pull request #16223 from mattip/pxd-fixCharles Harris2020-05-131-1/+1
|\ \ \ | | | | | | | | BUG: fix signature of PyArray_SearchSorted in __init__.pxd
| * | | BUG: fix signature of PyArray_SearchSorted in __init__.pxdmattip2020-05-131-1/+1
| |/ /
* | | DOC: Fix Generator.choice docstringKevin Sheppard2020-05-132-2/+2
| | | | | | | | | | | | | | | Remove trailing colon Fix indentation in RandomState choice doc string
* | | Merge pull request #16133 from seberg/maint-cast-errorMatti Picus2020-05-1313-148/+89
|\ \ \ | |/ / |/| | MAINT: Unify casting error creation (outside the iterator)
| * | MAINT: simplify iterator casting error creationSebastian Berg2020-05-122-31/+22
| | |
| * | MAINT: Unify casting error creation (outside the iterator)Sebastian Berg2020-05-0211-117/+67
| | |
* | | ENH: Allow pickle with protocol 5 when higher is requested (#16185)jakirkham2020-05-121-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Handle out-of-band buffers with protocol 5+ Previously we were checking that protocol 5 was matched exactly. However it should be fine if a newer protocol was used as well. So check that at least protocol 5 was used (though newer is fine too). * Drop error for protocol's greater than 5
* | | Merge pull request #16170 from mattip/cleanup-pxdCharles Harris2020-05-121-111/+104
|\ \ \ | | | | | | | | ENH: resync numpy/__init__.pxd with upstream
| * | | restore improperly removed API functionmattip2020-05-121-4/+4
| | | |
| * | | ENH: more carefully review 'nogil'mattip2020-05-071-20/+20
| | | |
| * | | ENH: resync numpy/__init__.pxd with upstreammattip2020-05-061-105/+98
| | | |
* | | | Merge pull request #16214 from mattip/aarch64-arcsinhCharles Harris2020-05-121-0/+23
|\ \ \ \ | | | | | | | | | | BUG: skip complex256 arcsinh precision test on glibc2.17
| * | | | BUG: fixes from reviewmattip2020-05-121-6/+10
| | | | |
| * | | | BUG: skip complex256 arcsinh precision test on glibc2.17mattip2020-05-121-1/+20
| | |_|/ | |/| |
* | | | Merge pull request #16068 from seberg/string-to-bool-regressionCharles Harris2020-05-112-0/+36
|\ \ \ \ | | | | | | | | | | BUG: Fix string to bool cast regression
| * | | | BUG: Fix string to bool cast regressionSebastian Berg2020-04-272-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While the legacy behaviour of casting strings to booleans by first converting the string to an integer is undersireable in general. It will require a Deprecation/FutureWarning to do the transition. Changing this accidentally was thus a regression. Closes gh-16023