summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #19781 from mwtoews/foreach-itemMatti Picus2021-09-018-75/+72
|\ | | | | MAINT: refactor "for ... in range(len(" statements
| * MAINT: refactor "for ... in range(len(" statementsMike Taves2021-09-018-75/+72
| |
* | STY: Use the PEP 457 positional-only syntax in `numpy.typing`Bas van Beek2021-08-312-100/+102
| |
* | STY: Use the PEP 457 positional-only syntax in the stub filesBas van Beek2021-08-3110-135/+168
| |
* | BLD: Drop typing extension as an (optional) runtime dependencyBas van Beek2021-08-302-42/+0
| | | | | | | | It might return in the future, but as of the moment we don't need it anymore
* | MAINT: Drop .pyi code-paths specific to Python 3.7Bas van Beek2021-08-3033-199/+57
| |
* | MAINT: Drop .py code-paths specific to Python 3.7Bas van Beek2021-08-307-570/+417
|/
* Merge pull request #19715 from yashasvimisra2798/casting_patch1Matti Picus2021-08-292-1/+12
|\ | | | | BUG: Casting bool_ to float16
| * lint: fix flake8 errorsYashasvi Misra2021-08-271-2/+1
| | | | | | | | Signed-off-by: Yashasvi Misra <yashasvimisra_bh@srmuniv.edu.in>
| * test: add test_float_to_bool()Yashasvi Misra2021-08-271-7/+9
| | | | | | | | Signed-off-by: Yashasvi Misra <yashasvimisra_bh@srmuniv.edu.in>
| * add testYashasvi Misra2021-08-261-0/+6
| |
| * updateYashasvi Misra2021-08-191-0/+4
| |
* | Remove reference since it's not used (#19766)Illviljan2021-08-271-3/+0
| |
* | Fix so doctest passesIllviljan2021-08-271-3/+3
| |
* | MAINT: Remove redundant semicolonHowJMay2021-08-274-4/+4
| |
* | Merge pull request #19725 from anntzer/loadtxt-fh-closingMatti Picus2021-08-261-14/+12
|\ \ | | | | | | MAINT: Use a contextmanager to ensure loadtxt closes the input file.
| * | MAINT: Use a contextmanager to ensure loadtxt closes the input file.Antony Lee2021-08-221-14/+12
| | | | | | | | | | | | | | | | | | | | | | | | This seems easier to track that a giant try... finally. Also move the `fencoding` initialization to within the contextmanager, in the rather unlikely case an exception occurs during the call to `getpreferredencoding`.
* | | Update numpy/core/overrides.pySebastian Berg2021-08-251-2/+2
| | | | | | | | | | | | Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
* | | remove import time compileIrit Katriel2021-08-251-30/+8
| | |
* | | Merge pull request #19621 from seberg/fix-normal-ufunc-safetyCharles Harris2021-08-252-2/+33
|\ \ \ | | | | | | | | BUG: The normal cast-safety for ufunc loops is "no" casting
| * | | MAINT: Fix spellingCharles Harris2021-08-251-1/+1
| | | |
| * | | BUG: The normal cast-safety for ufunc loops is "no" castingSebastian Berg2021-08-242-2/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This can now be set for a loop, which allows specialized loops that include the cast for example (or may make sense for units). However, the default here was just wrong, and apparently we missed any tests at all. (sklearn caught it luckily :))
* | | | Merge pull request #19736 from neutrinoceros/hotfix_reg_19721Matti Picus2021-08-252-1/+11
|\ \ \ \ | | | | | | | | | | BUG: Fix passing a MaskedArray instance to ``MaskedArray.__setitem__``
| * | | | BUG: fix a regression where a masked_array's mask wouldn't updateClément Robert2021-08-241-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | properly when indx was itself a masked_array instance. Closes #19721. See #19244 for context.
| * | | | Add check for when value is a np.maiameskild2021-08-241-1/+2
| | |_|/ | |/| |
* | | | Merge pull request #19730 from phetdam/hotfix-19575Sebastian Berg2021-08-241-0/+1
|\ \ \ \ | |_|/ / |/| | | BUG: Fix reference leak of capi_tmp in f2py/cb_rules.py
| * | | BUG: address 19575 ref leak of capi_tmp in f2py/cb_rules.pyDerek Huang2021-08-221-0/+1
| | |/ | |/|
* | | Merge pull request #19743 from anntzer/aliasMatti Picus2021-08-243-4/+4
|\ \ \ | | | | | | | | MAINT: Avoid use of confusing compat aliases.
| * | | MAINT: Avoid use of confusing compat aliases.Antony Lee2021-08-243-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of Py3, np.compat.unicode == str, but that's not entirely obvious (it could correspond to some numpy dtype too), so just use plain str. Likewise for np.compat.int. tests are intentionally left unchanged, as they can be considered as implicitly testing the np.compat.py3k interface as well.
* | | | Merge pull request #18585 from data-apis/array-apiCharles Harris2021-08-2323-3/+3702
|\ \ \ \ | |/ / / |/| | | ENH: Implementation of the NEP 47 (adopting the array API standard)
| * | | Use catch_warnings(record=True) instead of simplefilter('ignore')Aaron Meurer2021-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | There is a test that fails in the presence of simplefilter('ignore') (test_warnings.py). catch_warnings(record=True) seems to be a way to get the same behavior without failing the test.
| * | | Remove an unused importAaron Meurer2021-08-231-2/+0
| | | |
| * | | Remove Python 3.7 checks from the array API codeAaron Meurer2021-08-232-17/+6
| | | | | | | | | | | | | | | | | | | | NumPy has dropped Python 3.7, so these are no longer necessary (and they didn't completely work anyway).
| * | | Make sure array_api is included in the public API testsAaron Meurer2021-08-121-0/+1
| | | |
| * | | Add smallest_normal to the array API finfoAaron Meurer2021-08-121-6/+2
| | | | | | | | | | | | | | | | This was blocked on #18536, which has been merged.
| * | | Fix the return annotation for numpy.array_api.Array.__setitem__Aaron Meurer2021-08-121-1/+1
| | | |
| * | | Run (selective) black on the array_api submoduleAaron Meurer2021-08-0618-390/+1054
| | | | | | | | | | | | | | | | | | | | | | | | I've omitted a few changes from black that messed up the readability of some complicated if statements that were organized logically line-by-line, and some changes that use unnecessary operator spacing.
| * | | Update the docstring of numpy.array_apiAaron Meurer2021-08-061-38/+41
| | | |
| * | | Fix the array API nonzero() functionAaron Meurer2021-08-061-1/+1
| | | |
| * | | Make the axis argument to squeeze() in the array_api module positional-onlyAaron Meurer2021-08-061-1/+1
| | | | | | | | | | | | | | | | See data-apis/array-api#100.
| * | | Fix the array API unique() functionAaron Meurer2021-08-061-1/+5
| | | |
| * | | Fix the array API __len__ methodAaron Meurer2021-08-061-2/+1
| | | |
| * | | Fix the tests for Python 3.7Aaron Meurer2021-08-061-6/+12
| | | | | | | | | | | | | | | | | | | | The array_api submodule needs to be skipped entirely, as it uses non-3.7 compatible syntax.
| * | | Make the array API submodule not break the test suiteAaron Meurer2021-08-061-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | The warning is issued on import, which otherwise breaks pytest collection. If we manually import early and ignore the warning, any further imports of the module won't issue the warning again, due to the way Python caches imports.
| * | | Fix some dictionary key mismatches in the array API testsAaron Meurer2021-08-061-27/+27
| | | |
| * | | Add a setup.py to the array_api submoduleAaron Meurer2021-08-051-0/+10
| | | |
| * | | Give a better error when numpy.array_api is imported in Python 3.7Aaron Meurer2021-08-051-0/+6
| | | |
| * | | Fix casting for the array API concat() and stack()Aaron Meurer2021-08-041-4/+5
| | | |
| * | | Move some imports out of functions to the top of the fileAaron Meurer2021-08-041-3/+4
| | | | | | | | | | | | | | | | | | | | Some of the imports in the array API module have to be inside functions to avoid circular imports, but these ones did not.
| * | | Move the array API dtype categories into the top levelAaron Meurer2021-08-043-26/+17
| | | | | | | | | | | | | | | | | | | | They are not an official part of the spec but are useful for various parts of the implementation.