summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | | | | | | | | | | TST: Explicitly ignore promotion issues for array**2 in hypothesis testSebastian Berg2023-01-241-1/+6
| | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | TST: Expand scalar/umath comparison tests especially for dtypesSebastian Berg2023-01-241-12/+42
| | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | BUG: Fix `integer / float` scalar promotionSebastian Berg2023-01-241-16/+9
| |/ / / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Integer true division converted the other type directly to the output. This is correct if both operands are integers, but since the output of integer division is double precision, it is incorrect when the other operand is a float32 or float16. The solution is that we must convert to the same type (as always) and only the output type is adjusted, but not the inputs. This means that `integer / float` will correctly defer to the float which leads to correct promotion.
* | | | | | | | | | | | | | | | Merge pull request #21888 from WillTirone/fix_scipy_1339Matti Picus2023-01-251-2/+2
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MAINT: changing the method of checking for nan / inf values linalg.eig
| * | | | | | | | | | | | | | | | ENH: unifying error type for gh scipy #1339Will Tirone2023-01-242-6/+10
| | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | Changing error type in test for nan values in poly testWill Tirone2022-06-301-1/+1
| | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | MAINT: changing the method of checking for nan / inf values in numpy.linalg.eig.Will Tirone2022-06-291-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changing numpy to use the same function from numpy.lib.function_base as scipy. Tests pass.
* | | | | | | | | | | | | | | | | DEV: Fix shell configuration in devcontainer (#23076)JP Ungaretti2023-01-242-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR moves our repo setup to onCreateCommand from postCreateCommand in order to resolve a race condition between conda init and the default shell in VS Code. You can test this new devcontainer.json by creating a codespace for my fork/branch: https://github.com/codespaces/new?hide_repo_select=true&ref=jungaretti%2Fupdate-devcontainer&repo=576410652 postCreateCommand doesn't block interaction with your codespace. You can use other terminals and move around editors while it runs. On the other hand, onCreateCommand runs before you interact with your codespace. You won't be able to open a terminal until it finishes. onCreateCommand is a better choice for running our setup script because we need to run conda init before using the terminal.
* | | | | | | | | | | | | | | | | BLD: Meson `__config__` generation (#22769)Ganesh Kathiresan2023-01-244-129/+256
| |/ / / / / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add functionality to autogenerate build information for a Meson-based build. In order to add new information, do the following: - Add the information as an argument in `numpy/meson.build` - Modify `__config__.py.in` to accept the new argument Note that SIMD information is added to config, but is WIP/empty, because `__cpu*` lists are not yet populated as meson does not build SIMD features yet. There are two display modes: - `stdout`: Uses `PyYaml` to display in a human friendly format. Uses `json` if `PyYaml` is not installed - `dicts`: Returns a `dict` object Things will work fine without `pyyaml` installed, an unobtrusive warning is displayed that the printed output will look better with `pyyaml`. [ci skip]
* | | | | | | | | | | | | | | | ENH: Convert methods to vectorcall conversions (#23018)Pieter Eendebak2023-01-239-91/+159
| |_|_|_|_|/ / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert several methods to the vectorcall convention. The conversions give a performance improvement, see #20790 (comment) Some notes: * For vdot the METH_KEYWORDS was removed, as the C vdot method was positional only. * The add_docstring is converted with an additional check. It was parsed as if (!PyArg_ParseTuple(args, "OO!:add_docstring", &obj, &PyUnicode_Type, &str)), but there is no support for the ! in the npy_parse_arguments * CI was complaining about coverage of _get_ndarray_c_version. A test was added, but only to provide coverage * In function_base.py a redundant check in def place was removed Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
* | | | | | | | | | | | | | | Merge pull request #23066 from rgommers/fix-distutils-breakageRalf Gommers2023-01-233-5/+11
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / / / / / / / / |/| | | | | | | | | | | | | | BUG: fix broken numpy.distutils Fortran handling
| * | | | | | | | | | | | | | CI: for Cygwin CI job, do not use `-vv`Ralf Gommers2023-01-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The actual output in the GitHub UI gets truncated, so with `-vv` it is not possible to see what failed without downloading the log as a zip file. [skip circle] [skip azp] [skip cirrus]
| * | | | | | | | | | | | | | BUG: fix broken numpy.distutils Fortran handlingRalf Gommers2023-01-222-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `Path` and `COMMON_FIXED_EXTENSIONS` variables were not defined at all. This code is untested, and SciPy doesn't build with NumPy `main` before this fix. The issue was introduced a few days ago in gh-22885.
* | | | | | | | | | | | | | | DOC: fail the CI build and do not deploy if docs are not created (#23065)Matti Picus2023-01-222-4/+17
|/ / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds protection against deploying empty docs when sphinx build fails in circleCI.
* | | | | | | | | | | | | | Merge pull request #23064 from seberg/nose-removal-doc-fixupMatti Picus2023-01-222-8/+0
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DOC: Fixup docs after the code removal
| * | | | | | | | | | | | | | DOC: Fixup docs after the code removalSebastian Berg2023-01-222-8/+0
|/ / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CircleCI is currently not set up to fail when docs fail, so this slipped through the cracks. It may be that the testing docs should get a bit more changes then just removing these things.
* | | | | | | | | | | | | | Merge pull request #23060 from charris/remove-testing-utils-shimSebastian Berg2023-01-223-30/+5
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DEP: Remove the deprecated ``utils.py`` shim.
| * | | | | | | | | | | | | | DEP: Remove the deprecated utils.py shim.Charles Harris2023-01-213-30/+5
|/ / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The shim has been deprecated since 2019, the proper place to import utils funtions is directly from numpy.testing.
* | | | | | | | | | | | | | Merge pull request #20970 from seberg/reduce-identity-array-methMatti Picus2023-01-2113-129/+508
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ENH: Move identity to the ArrayMethod to allow customization
| * | | | | | | | | | | | | | MAINT: Rename `initial` to `legacy_initial` in ArrayMethodSebastian Berg2023-01-202-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It should only be used by the legacy method, so also reflect that in the field name.
| * | | | | | | | | | | | | | DOC: Adept code comments for clarity based on code reviewSebastian Berg2023-01-204-13/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Matti Picus <matti.picus@gmail.com>
| * | | | | | | | | | | | | | MAINT: Prepend scaled float test statics with `sfloat_`Sebastian Berg2023-01-201-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As requested by Matti in review.
| * | | | | | | | | | | | | | MAINT: Address review comments by NathanSebastian Berg2023-01-203-23/+24
| | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | MAINT: Rename PyUFunc_GetIDentity to PyUFunc_GetDefaultIdentitySebastian Berg2023-01-203-5/+6
| | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | TST: Add test for wrapped ufuncs and reductions via ScaledFloatSebastian Berg2023-01-202-3/+104
| | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | MAINT: Address many of Marten's commentsSebastian Berg2023-01-206-20/+39
| | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | MAINT: Remove unneeded labelSebastian Berg2023-01-201-1/+0
| | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | TST: Fix lint and ensure we have tests for empty arrays and reduceSebastian Berg2023-01-201-1/+14
| | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | API: Bumpy experimental dtype api versionSebastian Berg2023-01-203-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Its a new version (it changed ;)), plus I took the liberty to move things around a bit ABI wise.
| * | | | | | | | | | | | | | BUG: Fixup copying the wrong size in the cached path mostlySebastian Berg2023-01-202-8/+8
| | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | MAINT: Rework things to make reorderability static and default to no initial ↵Sebastian Berg2023-01-207-185/+218
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | value
| * | | | | | | | | | | | | | MAINT: Fixup names, and add workaround lost in rebaseSebastian Berg2023-01-201-6/+21
| | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | MAINT: Rename arraymethod reduction identity getterSebastian Berg2023-01-205-57/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Need to look into whether to cut out the dynamic discovery of reorderability though.
| * | | | | | | | | | | | | | DOC,MAINT: Address "simple" review comments by MartenSebastian Berg2023-01-204-27/+32
| | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | BUG: Fixup the default array-method, got the refcounting wrong...Sebastian Berg2023-01-201-5/+7
| | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | ENH: Support identity-function in experimental DType APISebastian Berg2023-01-203-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also add it to the wrapped array-method (ufunc) implementation so that a Unit dtype can reasonably use an identity for reductions.
| * | | | | | | | | | | | | | ENH: Move identity to the ArrayMethod to allow customizationSebastian Berg2023-01-206-92/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also fixes/changes that the identity value is defined by the reduce dtype and not by the result dtype. That does not make a different in any sane use-case, but there is a theoretical change: arr = np.array([]) out = np.array(None) # object array np.add.reduce(arr, out=out, dtype=np.float64) Where the output result was previously an integer 0, due to the output being of `object` dtype, but now it is the correct float due to the _operation_ being done in `float64`, so that the output should be `np.zeros((), dtype=np.float64).astype(object)`.
* | | | | | | | | | | | | | | CI: musllinux_x86_64 (#22864)Andrew Nelson2023-01-205-8/+126
|/ / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | | | | | | | | | | Merge pull request #23034 from seberg/wrap-trapzRalf Gommers2023-01-202-0/+40
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | API: Allow SciPy to get away with assuming `trapz` is a Python function
| * | | | | | | | | | | | | | API: Allow SciPy to get away with assuming `trapz` is a Python functionSebastian Berg2023-01-202-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This wraps `trapz` into a proper python function and then copies all attributes expected on a Python function over from the "fake" version to the real one. This allows SciPy to pretend `trapz` is a Python function to create their own version.
* | | | | | | | | | | | | | | Merge pull request #23054 from seberg/pyinstaller-import-fixupCharles Harris2023-01-202-4/+4
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / / / |/| | | | | | | | | | | | | | MAINT: Move unused import into hook for pyinstaller
| * | | | | | | | | | | | | | MAINT: Move unused import into hook for pyinstallerSebastian Berg2023-01-202-4/+4
|/ / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pyinstaller should pack it to allow running the tests, but doesn't pack the tests themselves and thus doesn't find the `import` statements that use `numpy.core._multiarray_tests`. This makes sure that pyinstaller will ship `numpy.core._multiarray_tests` in any case.
* | | | | | | | | | | | | | Merge pull request #23041 from charris/remove-nose-testingMatti Picus2023-01-2016-2062/+36
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MAINT: Remove all nose testing support.
| * | | | | | | | | | | | | | MAINT: Remove all nose testing support.Charles Harris2023-01-1916-2062/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NumPy switched to using pytest in 2018 and nose has been unmaintained for many years. We have kept NumPy's nose support to avoid breaking downstream projects who might have been using it and not yet switched to pytest or some other testing framework. With the arrival of Python 3.12, unpatched nose will raise an error. It it time to move on. Decorators removed - raises - slow - setastest - skipif - knownfailif - deprecated - parametrize - _needs_refcount These are not to be confused with pytest versions with similar names, e.g., pytest.mark.slow, pytest.mark.skipif, pytest.mark.parametrize. Functions removed - Tester - import_nose - run_module_suite
* | | | | | | | | | | | | | | Merge pull request #23047 from ngoldbaum/custom-dtype-nameSebastian Berg2023-01-202-1/+8
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MAINT: dtype.name works for NEP 42 dtypes
| * | | | | | | | | | | | | | | MAINT: dtype.name works for NEP 42 dtypesNathan Goldbaum2023-01-192-1/+8
|/ / / / / / / / / / / / / / /
* | | | | | | | | | | | | | | DEP: deprecate np.finfo(None) (#23011)Daiki Shintani2023-01-193-0/+16
| |_|/ / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deprecate np.finfo(None), it may be that we should more generally deprecate `np.dtype(None)` but this is a start and particularly weird maybe. Closes gh-14684
* | | | | | | | | | | | | | Merge pull request #23039 from seberg/fixup-array-func-CMatti Picus2023-01-192-1/+49
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BUG: Implement `ArrayFunctionDispatcher.__get__`
| * | | | | | | | | | | | | | BUG: Impelement `ArrayFunctionDispatcher.__get__`Sebastian Berg2023-01-182-1/+49
| |/ / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While functions should not normally need this, Python functions do provide it (C functions do not, but we are a fatter object anyway). By implementing `__get__` we also ensure that `inspect.isroutine()` passes. And by that we ensure that Sphinx considers these a `py:function:` role. Closes gh-23032
* | | | | | | | | | | | | | Merge pull request #23038 from seberg/fixup-doc-genMatti Picus2023-01-191-0/+7
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DOC: Ignore attribute FutureWarning in doc build