summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* MAINT: Bump hypothesis from 5.6.0 to 5.7.0dependabot/pip/hypothesis-5.7.0dependabot-preview[bot]2020-03-231-1/+1
| | | | | | | Bumps [hypothesis](https://github.com/HypothesisWorks/hypothesis) from 5.6.0 to 5.7.0. - [Release notes](https://github.com/HypothesisWorks/hypothesis/releases) - [Commits](https://github.com/HypothesisWorks/hypothesis/compare/hypothesis-python-5.6.0...hypothesis-python-5.7.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* Merge pull request #15803 from person142/ufunc-extobjWarren Weckesser2020-03-221-5/+5
|\ | | | | DOC: correct possible list lengths for `extobj` in ufunc calls
| * DOC: correct possible list lengths for `extobj` in ufunc callsJosh Wilson2020-03-221-5/+5
|/ | | | | | | | | | | | | | | | | | | According to the docs, the list can be of lengths 1, 2, or 3, but only length 3 appears to work: ``` >>> import numpy as np >>> np.sin(1, extobj=[16, 1, lambda: None]) 0.8414709848078965 >>> np.sin(1, extobj=[16, 1]) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: UFUNC_PYVALS must be a length 3 list. >>> np.sin(1, extobj=[16]) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: UFUNC_PYVALS must be a length 3 list. ```
* Merge pull request #15799 from eric-wieser/simplify-insertSebastian Berg2020-03-221-7/+11
|\ | | | | MAINT: Cleanups to np.insert and np.delete
| * MAINT: Make the axis logic for delete match insert.Eric Wieser2020-03-221-5/+4
| | | | | | | | No behavior change here unless someone implements a subclass where `arr.ravel().ndim == 0`, which no sane person would do anyway.
| * MAINT: Add missing deprecation dates and versionsEric Wieser2020-03-221-1/+4
| |
| * MAINT: Remove some weird syntax for kwargsEric Wieser2020-03-221-1/+1
| |
| * MAINT: Add an explanatory comment for some weird codeEric Wieser2020-03-221-0/+2
| |
* | DEP: Make issubdtype consistent for types and dtypes (#15773)Sebastian Berg2020-03-223-28/+39
| | | | | | | | | | | | | | | | | | | | This finishes the deprecation started in gh-9505 removing behaviour that allowed strings/types representing specific dtypes to behave like their more generic supertypes (e.g. the python float would map to floating instead of float64 which it typically maps to). Co-Authored-By: Eric Wieser <wieser.eric@gmail.com>
* | BLD: Add requirements.txt file for building docs (#15778)Ross Barnowski2020-03-193-11/+34
| | | | | | * BLD: Added doc_requirements.txt and improve documentation around building docs
* | BUG, TST: fix f2py for PyPy, skip one test for PyPy (#15750)Matti Picus2020-03-1810-43/+45
| | | | | | * BUG, TST: fix f2py for PyPy, skip one test for PyPy, xfail tests for s390x
* | BUG: Guarantee array is in valid state after memory error occurs in getset.c ↵Mibu2872020-03-181-7/+13
|/ | | | | | | | | | | (#15736) Currently, in function array_shape_set, ndarray's pointers to dimensions and strides are freed before new array is allocated (Line 71). In case memory error occur, the array is left with dangling pointers. Therefore, we can not recover from such error. * To guarantee array in valid state when memory error occur * Fix: Free cache when nd == 0 to avoid memory leak * Update numpy/core/src/multiarray/getset.c Co-Authored-By: Eric Wieser <wieser.eric@gmail.com>
* Merge pull request #15774 from eric-wieser/remove-f2py-globalSebastian Berg2020-03-186-9/+2
|\ | | | | MAINT: remove useless `global` statements
| * MAINT: remove useless `global` statementsEric Wieser2020-03-186-9/+2
| | | | | | | | | | | | | | `global` is only needed if a variable appears on the left of an assignment. These variables do not. Most suffer from the misconception that `var[x] = y` requires `var` to be global, but it does not.
* | NEP 40: Informational NEP about current DTypes (#15505)Sebastian Berg2020-03-182-0/+642
|/ | | | | | * NEP: Create informational NEP 40 about current DTypes Co-Authored-By: Ross Barnowski <rossbar@berkeley.edu> Co-Authored-By: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: mattip <matti.picus@gmail.com>
* Merge pull request #15766 from seberg/simplify-specialized-castsMatti Picus2020-03-183-75/+30
|\ | | | | BUG,MAINT: Remove incorrect special case in string to number casts
| * BUG: Increase default string cast size of longdouble/clongdoubleSebastian Berg2020-03-161-2/+6
| |
| * BUG,MAINT: Remove incorrect special case in string to number castsSebastian Berg2020-03-162-73/+24
| | | | | | | | | | | | | | | | | | The string to number casts fall back to using the scalars and the type setitem function to do the cast. However, before calling setitem, they sometimes already called the Python function for string coercion. This is unnecessary. Closes gh-15608
* | Merge pull request #15771 from anirudh2290/fix_dev_docSebastian Berg2020-03-171-1/+1
|\ \ | | | | | | DOC: Fix runtests example in developer docs
| * | DOC: Fix runtests example in developer docsAnirudh Subramanian2020-03-181-1/+1
| | |
* | | Merge pull request #15768 from charris/update-after-1.18.2-releaseRalf Gommers2020-03-175-7/+81
|\ \ \ | | | | | | | | REL: Update master after 1.18.2 release.
| * | | REL: Update master after 1.18.2 release.Charles Harris2020-03-175-7/+81
| | | |
* | | | BUG: add missing c_distributions.pxd, enables cython use of random C-API ↵Matti Picus2020-03-1614-151/+268
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (gh-15463) xref gh-14778 As pointed out in the comment by @jamesthomasgriffin, we did not include a pxd file to expose the distribution functions documented in the random c-api. This PR adds a c_distributions.pxd file that exposes them. Squashed commits: * BUG: add missing c_distributions.pxd to enable cython use of random C-API * ENH, TST: add npyrandom library like npymath, test cython use of it * BUG: actually prefix f-string with f * MAINT: fixes from review, add _bit_generato_bit_generator.pxd * STY: fixes from review * BLD: don't use nprandom library for mtrand legacy build * TST: WindowsPath cannot be used in subprocess's list2cmdline * MAINT, API: move _bit_generator to bit_generator * DOC: add release note about moving bit_generator * DOC, MAINT: fixes from review * MAINT: redo dtype determination from review
* | | Merge pull request #15762 from numpy/dependabot/pip/pytest-5.4.1Sebastian Berg2020-03-161-1/+1
|\ \ \ | | | | | | | | MAINT: Bump pytest from 5.3.5 to 5.4.1
| * | | MAINT: Bump pytest from 5.3.5 to 5.4.1dependabot/pip/pytest-5.4.1dependabot-preview[bot]2020-03-161-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | Bumps [pytest](https://github.com/pytest-dev/pytest) from 5.3.5 to 5.4.1. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/5.3.5...5.4.1) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* | | MAINT: Test during import to detect bugs with Accelerate(MacOS) LAPACK (#15695)Rakesh Vasudevan2020-03-152-2/+65
| | | | | | | | | | | | | | | | | | | | | * TST: Test during import to detect bugs with Accelerate(MacOS) LAPACK fixes #15647 * Pipeline update for Accelerate(MacOS) testing
* | | Merge pull request #15747 from WarrenWeckesser/unique-with-zero-lenMatti Picus2020-03-152-41/+97
|\ \ \ | | | | | | | | BUG: lib: Handle axes with length 0 in np.unique.
| * | | MAINT: lib: PEP-8 clean up in test_arraysetops.py.Warren Weckesser2020-03-151-38/+41
| | | |
| * | | BUG: lib: Handle axes with length 0 in np.unique.Warren Weckesser2020-03-152-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tweak a few lines so that arrays with an axis with length 0 don't break the np.unique code. Closes gh-15559.
| * | | TST: lib: Add a unit test for np.unique applied to arrays with a length 0 axis.Huon Wilson2020-03-151-0/+35
|/ / / | | | | | | | | | | | | This code is from github user huonw, from this PR: https://github.com/numpy/numpy/pull/15565
* | | Merge pull request #15757 from WarrenWeckesser/fix-azure-pipelinesRalf Gommers2020-03-152-0/+6
|\ \ \ | |/ / |/| | MAINT: CI: Add an explicit 'pr' section to azure-pipelines.yml
| * | MAINT: CI: Run 'apt-get update' in tools/pypy-test.shWarren Weckesser2020-03-151-0/+1
| | | | | | | | | | | | | | | | | | | | | Run 'apt-get update' before 'apt-get install ...' This should fix the failure to build PyPy in the Linux_PyPy3 azure pipelines CI test.
| * | MAINT: CI: Add an explicit 'pr' section to azure-pipelines.ymlWarren Weckesser2020-03-151-0/+5
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Azure-pipelines is currently experiencing an "incident": https://status.dev.azure.com/_event/179641421) From that web page: > Currently CI and PR triggers in YAML for GitHub and Bitbucket > repositories are not working when they are not explicitly listed > in the YAML file. Our expected behavior is that when there are > no explicit triggers in the YAML, the pipelines will trigger on > all commits on all branches and all pull requests. This is > currently not happening. To workaround, please explicitly list > the triggers you want in the YAML file for your pipeline. This PR adds the suggested explicit 'pr' triggers to the YAML file.
* | Merge pull request #15752 from mlamarre/fix_swig_testsCharles Harris2020-03-135-53/+73
|\ \ | | | | | | MAINT: Fix swig tests issue #15743
| * | Fix swig testsMathieu Lamarre2020-03-135-53/+73
|/ / | | | | | | | | resize typemap issue python 3 bytes vs str issue
* | MAINT: Add better error handling in linalg.norm for vectors and clarify it ↵Jim2020-03-123-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | in documentation (#15740) * Clarify `fro` and `nuc` usage in linalg.norm documentation (see #15533). * Add improved error handling when getting Frobenius norm from a vector (see #15533). * Fix comment in linalg norm test. Closes gh-15533.
* | DOC: Do not complain about contiguity when mutating `ndarray.shape` (gh-10600)John Han2020-03-123-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There are multiple conditions that `_attempt_nocopy_reshape` checks for when ndarray.shape is mutated directly. Discussion of #10146 indicated that an error message referencing any type of contiguity would not be correct for all cases, so the error message has been changed to be more general. * ENH: shorten message and use "in-place" * MAINT: typo from review Co-authored-by: hanjohn <hanjohn@users.noreply.github.com> Co-authored-by: mattip <matti.picus@gmail.com>
* | Merge pull request #15745 from WarrenWeckesser/remove-doc-summarizeRalf Gommers2020-03-121-178/+0
|\ \ | | | | | | MAINT: doc: Remove doc/summarize.py
| * | MAINT: doc: Remove doc/summarize.pyWarren Weckesser2020-03-111-178/+0
| | | | | | | | | | | | | | | | | | | | | The code in doc/summarize.py is no longer used and it is not being maintained, so remove it. Closes gh-15708.
* | | DOC: Refactor `np.polynomial` docs using `automodule` (#15662)Ross Barnowski2020-03-1214-775/+349
|/ / | | | | * DOC: Refactor polynomial docs using automodule.
* | NEP 41: First steps towards improved Datatype Support (gh-15506)Sebastian Berg2020-03-112-0/+4370
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This NEP is supposed to: 1. Motivate the whole DType change and lay out a rough plan. 2. Clarify a few mainly high level decision/plans. 3. Get inertia on starting to implement espeically a DTypeMeta class in C, and slowly add new private API working towards Phase II, which is planned t be better specified by NEP 42 and 43. Full list of squashed commits (including suggestions below): * NEP: Create NEP41, proposing a rough plan for new DTypes * Try to clarify how datatypes are "natural" compared to array likes and clean up API breakage section * Fix references (mostly at least) * Add a first draft of a few examples. * Reorganize examples as per suggestion by Marten and add ufunc loop note * Make a pass on the first chunk and number the later stuff to match * Some minaor adjustments * Add, probably silly, picture. * Add pngs, since it is probably easier to render... * Small changes, mainly to see if I can make it render... * Apply suggestions from code review Thanks @crusaderky especially for type reading and all the reference, etc. issues! Co-Authored-By: crusaderky <crusaderky@gmail.com> Co-Authored-By: Maximilian Roos <5635139+max-sixty@users.noreply.github.com> * Tiny fixes, mainly fix title levels hopefully It seems I am not allowd to skip a title level in one point but not another. * Small changes/fixups * Reorganize sections to better fit template. * Further swapping of Detailed Information part. * Make motivation clear and mention user impact section the user impact section is more useful than the actual motivation section.... since the motivation is more technical in nature * Small editing of the first few sections * Some further small type-edits for the later sections * Add a small paragraph mentioning the intention of a fallback * Smaller changes, rework phases at beginning of scopes section * Mention which NEP is to define which bullet point in Phase II * Consolidate point 1+2 into a single point and clarify the incompatible change * Mention the change of how methods are defined in the backcompat section * Add a note at the top of the NEP (will need to be links to other NEPs) This note will almost identiclaly be added to the other NEPs then.. * Fixups mainly based on comments from Ross (large chunks are directly using his suggestions) * Apply suggestions from code review Co-Authored-By: Eric Wieser <wieser.eric@gmail.com> * Incorporate most of Erics comments (which were not already suggestions) * Update doc/neps/nep-0041-improved-dtype-support.rst Co-Authored-By: Eric Wieser <wieser.eric@gmail.com> * Apply suggestions from code review Co-Authored-By: Eric Wieser <wieser.eric@gmail.com> * Small reformatting, fix authors and add drafty acknowledgments Ross does not want authorship, so he has to suffer through this ;). Co-authored-by: crusaderky <crusaderky@gmail.com> Co-authored-by: Maximilian Roos <5635139+max-sixty@users.noreply.github.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
* | ENH: Add `subok` parameter to np.copy function (cf. gfh6509) (gh-15685)Ross Barnowski2020-03-113-3/+28
| | | | | | | | | | This is largely a re-submission of the original change proposed in #6509. Discussion was hosted in multiple forums including #3474, the numpy mailing list circa 10-2015, and the 02-26-2020 NumPy Triage meeting. This PR closes #3474 and #15570
* | Merge pull request #15738 from rossbar/rm_nnboSebastian Berg2020-03-111-4/+0
|\ \ | | | | | | MAINT: Remove non-native byte order from _var check.
| * | MAINT: Remove non-native byte order from _var check.Ross Barnowski2020-03-101-4/+0
|/ / | | | | | | | | | | | | | | Removes unnecessary code introduced in #15696. Non-native byte orders were explicitly added to the fast-path check in _var for complex numbers. However, the non-native path is unreachable due to coercion in upstream ufuncs.
* | Merge pull request #15696 from rossbar/enh/var_complex_fastpathSebastian Berg2020-03-103-0/+67
|\ \ | | | | | | MAINT: Add a fast path to var for complex input
| * | Added benchmark for _var with complex input.Ross Barnowski2020-03-091-0/+11
| | |
| * | ENH: Adds a fast path to var for complex inputRoss Barnowski2020-03-092-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | var currently has a conditional that results in conjugate being called for the variance calculation of complex inputs. This leg of the computation is slow. This PR avoids this computational leg for complex inputs via a type check. Closes #15684
* | | Merge pull request #15724 from charris/stop-testing-noseSebastian Berg2020-03-101-1/+0
|\ \ \ | | | | | | | | TST: Remove nose from the test_requirements.txt file.
| * | | TST: Remove nose from the test_requirements.txt file.Charles Harris2020-03-071-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nose is unmaintained and raises a DeprecationWarning on import. Removing it from the requirements will cause the legacy tests that need it to be skipped. Nose testing was ended in July 2019 but was raised from the dead when the test_requirements.py file was added in August 2019.
* | | | DOC: Change license date 2019 -> 2020 (gh-15735)Himanshu Garg2020-03-102-2/+2
| | | | | | | | | | | | Update Year 2019 -> 2020