summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | | | DOC: Mention uniform in the np.random.Generator.random function.Bram2022-06-271-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a See also section to mention np.random.Generator.uniform.
* | | | | | | | | | Merge pull request #21887 from matthew-brett/mingw-random-compileCharles Harris2022-07-103-3/+3
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | BLD: Allow GCC compile on mingw-w64-based systems
| * | | | | | | | | | Allow GCC compile on mingw-w64-based systemsMatthew Brett2022-06-293-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Macro `__MINGW32__` always defined for Mingw-w64 compilers (32- or 64-bit): https://sourceforge.net/p/predef/wiki/Compilers/
* | | | | | | | | | | Revert "ENH: Adding __array_ufunc__ capability to MaskedArrays"Matti Picus2022-07-095-254/+48
| | | | | | | | | | |
* | | | | | | | | | | Merge pull request #21957 from BvB93/hashCharles Harris2022-07-092-2/+5
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | TYP,ENH: Mark all unhashable classes as such
| * | | | | | | | | | | TYP,ENH: Mark all unhashable classes as suchBas van Beek2022-07-092-2/+5
| | | | | | | | | | | |
* | | | | | | | | | | | Merge pull request #16022 from greglucas/masked_ufuncMatti Picus2022-07-095-48/+254
|\ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|/ / / / / / / / |/| | | | | | | | | | | ENH: Adding __array_ufunc__ capability to MaskedArrays
| * | | | | | | | | | | TST: Adding a test that MaskedArrays respect ufunc deferral heirarchyGreg Lucas2022-06-291-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test makes sure that a MaskedArray defers properly to another class if it doesn't know how to handle it. See #15200.
| * | | | | | | | | | | ENH: Adding __array_ufunc__ capability to MaskedArrays.Greg Lucas2022-06-294-48/+195
| | |_|_|_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enables any ufunc numpy operations that are called on a MaskedArray to use the masked version of that function automatically without needing to resort to np.ma.func() calls.
* | | | | | | | | | | Merge pull request #21890 from HaoZeke/fixSylcotRegressionCharles Harris2022-07-081-1/+1
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | BUG: Fix KeyError in crackfortran operator support
| * | | | | | | | | | | BUG: Fix KeyError in crackfortran operator supportRohit Goswami2022-06-301-1/+1
| | | | | | | | | | | |
* | | | | | | | | | | | DOC: Double backticks in lagfit. (#21948)Matthias Bussonnier2022-07-081-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the values in the documentation of lagfit are in single-backticks, though single backticks usually means that this is a reference to something else that sphinx tries to resolve. Here I update values that reference nothing to use double backticks (verbatim), or emphasis.
* | | | | | | | | | | | Merge pull request #21832 from eendebakpt/optimize_linspaceMatti Picus2022-07-081-3/+8
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | PERF: Micro optimize np.linspace
| * | | | | | | | | | | | Apply suggestions from code reviewSebastian Berg2022-07-061-1/+1
| | | | | | | | | | | | |
| * | | | | | | | | | | | Update numpy/core/function_base.pyPieter Eendebak2022-06-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
| * | | | | | | | | | | | fix lintPieter Eendebak2022-06-231-1/+2
| | | | | | | | | | | | |
| * | | | | | | | | | | | PERF: Micro optimize np.linspacePieter Eendebak2022-06-231-3/+7
| | | | | | | | | | | | |
* | | | | | | | | | | | | DOC: improve `ascontiguousarray()` and `asfortranarray()` examples (#21501)oleksiyskononenko2022-07-071-7/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now, example for ascontiguousarray() only demonstrates that the function is capable to change the dtype, but it doesn't really change the memory layout since x is already C_CONTIGUOUS. In this PR we make this example more relevant and be consistent with the example for asfortranarray(). * DOC: make examples for `ascontiguousarray()` and `asfortranarray()` to be consistent * Add more examples * Get rid of .reshape() * Reduce line length to 79 chars * Change order of examples, remove trailing comments * Use two-space indent * Change `::` to `:`, remove code indentation
* | | | | | | | | | | | | Reorder extern "C" to only apply to function declarations in npy_math.hserge-sans-paille2022-07-081-4/+4
| |_|_|_|_|_|/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That way incompatible included headers are not affected. Fix #21802
* | | | | | | | | | | | Merge pull request #21795 from hmaarrfk/no_overflow_unsignedSebastian Berg2022-07-062-0/+17
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | ENH: Ensure that assertion of unsigned dtypes does not return results
| * | | | | | | | | | | | BUG: Ensure that assertion of unsigned dtypes does not return resultsMark Harfouche2022-06-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that wrapped around.
| * | | | | | | | | | | | TST: Add a failing test case to demonstrate the bug gh2176Mark Harfouche2022-06-291-0/+14
| | | | | | | | | | | | |
* | | | | | | | | | | | | Merge pull request #21905 from deego/mainSebastian Berg2022-07-061-2/+2
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | DOC: Fix the interpolation formulae for quantile and percentile
| * | | | | | | | | | | | | Fix the interpolation formulae which led to absurd results. For quantile() ↵deego2022-07-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and percentile(). Fix the interpolation formulae in the docs which led to absurd results. For quantile() and percentile(). Example, for median of a = [1,2,10,11], you expect to obtain i+g=2.5 for method = linear (or weibull, or hazen, or median_unbiased or normal_unbiased). Instead, you obtain a /negative/ index. The correted formula is: i + g = q * (n - alpha - beta + 1 ) + alpha Notice among other things that n belongs in the numerator, not the denominator! As a check, the corrected formula does lead to the correct index 2.5 for each of the cases above. MYSTERY: Surely the original formula was the result of a small typo/thinko? Then, why does the correction look so completely different? RESOLUTION OF MYSTERY: Take our formula, massage it, and swap q with (i+g), and you end up with the original formula. In other words, the original author of the doc. simply confused their percentile with their index halfway through the creation of the doc. Then, they massaged it to isolate (i+g) on the left.
* | | | | | | | | | | | | | MAINT: random: Annotate default_rng with cython.embedsignaturewarren2022-07-051-0/+1
| |_|_|_|_|_|_|_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes gh-21910
* | | | | | | | | | | | | BUG: cross product: add dtype conversions of inputs (#20659)Omar2022-07-042-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes #19138
* | | | | | | | | | | | | DOC: fix typo in `numpy._typing._NestedSequence` docstring example (#21909)Thomas Mansencal2022-07-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | | | | | | | | | Merge pull request #21896 from mkoeppe/can_link_svml_i386Ralf Gommers2022-07-031-1/+3
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | numpy/core/setup.py (`can_link_svml`): False for 32bit builds on `x86_64`
| * | | | | | | | | | | | | numpy/core/setup.py (can_link_svml): Return False for 32bit builds on x86_64Matthias Koeppe2022-06-301-1/+3
| | |_|_|_|_|_|_|_|/ / / / | |/| | | | | | | | | | |
* | | | | | | | | | | | | Merge pull request #21904 from ZicsX/doc-string-for-np-char-centerMelissa Weber Mendonça2022-07-021-0/+16
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | DOC: Add usage example to np.char.center docstring
| * | | | | | | | | | | | | Add usage example to np.char.center docstringSatish Mishra2022-07-021-0/+16
| | | | | | | | | | | | | |
* | | | | | | | | | | | | | Merge pull request #21807 from HaoZeke/useFortranValueMelissa Weber Mendonça2022-07-024-4/+31
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / / / / / / |/| | | | | | | | | | | | |
| * | | | | | | | | | | | | TST: Ensure the f2py value attribute is handledRohit Goswami2022-06-212-0/+23
| | | | | | | | | | | | | |
| * | | | | | | | | | | | | ENH: Generate wrappers for scalars with valueRohit Goswami2022-06-212-4/+8
| | |_|_|/ / / / / / / / / | |/| | | | | | | | | | |
* | | | | | | | | | | | | DOC: Clarify loadtxt input cols requirement (#21861)Pranab Das2022-07-021-2/+14
| |/ / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also add an example to illustrate how usecols can be used to read a file with varying number of fields.
* | | | | | | | | | | | Fix datetime_to_timedelta_resolve_descriptors signatureHood Chatham2022-06-301-1/+2
| |/ / / / / / / / / / |/| | | | | | | | | |
* | | | | | | | | | | Merge pull request #21885 from ssanya942/patch-3Bas van Beek2022-06-301-1/+1
|\ \ \ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / / / |/| | | | | | | | | | DOC: Link to PEP-484 in the typing docs
| * | | | | | | | | | DOC: Fix link to PEP-484Sebastian Berg2022-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Bas van Beek <43369155+BvB93@users.noreply.github.com>
| * | | | | | | | | | Linking PEP-484, as suggestedssanya9422022-06-301-1/+1
| | |_|_|_|/ / / / / | |/| | | | | | | |
* | | | | | | | | | Merge pull request #21886 from matthew-brett/arch-32-bits-windowsMatti Picus2022-06-303-40/+32
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Fix lib flags for librandom
| * | | | | | | | | | Fix lib flags for librandomMatthew Brett2022-06-293-40/+32
| |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the voltbl fix to librandom. Remove SSE flag for GCC on 32-bit Windows, it's the default.
* | | | | | | | | | MAINT: Disable checks for Win workaround for GCC (#21881)Matthew Brett2022-06-301-4/+6
| |_|_|/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Disable checks for Win workaround for GCC Python compiled with GCC on Windows does not suffer the same deficiencies as MSVC; disable check for that platform. Here are a couple of `sys.version` strings from Windows / Mingw-w64 Python binaries: * '3.10.5 (main, Jun 18 2022, 01:33:07) [GCC 12.1.0 32 bit]' * '3.10.5 (main, Jun 18 2022, 01:32:32) [GCC UCRT 12.1.0 64 bit (AMD64)]' For MSVC Python binaries: * '3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:24:45) [MSC v.1929 32 bit (Intel)]' * '3.10.5 (tags/v3.10.5:f377153, Jun 6 2022, 16:14:13) [MSC v.1929 64 bit (AMD64)]' * Update numpy/core/tests/test_multiarray.py
* | | | | | | | | BUG: Fix numpy.isin for timedelta dtype (#21860)Miles Cranmer2022-06-292-10/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR fixes the issue discussed on #12065 and #21843 where 'timedelta64' was noted to be a subtype of numpy.integer. This in principle should detect any cases where int(np.min(ar2)) fails. This PR also adds unittests for these. * TST: Create in1d test for timedelta input * MAINT: fix in1d for timedelta input * TST: in1d raise ValueError for timedelta input * MAINT: Clean up type checking for isin kind="table" * TST: Add test for mixed boolean/integer in1d * MAINT: Increase readability of in1d type checking * STY: Apply small code style tweaks This is probably really mainly my personal opinion... Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
* | | | | | | | | Merge pull request #21884 from hoodmane/Wreturn-typeSebastian Berg2022-06-291-2/+4
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | MAINT: Fix non-void function does not return a value warning
| * | | | | | | | MAINT: Fix non-void function does not return a value warningHood Chatham2022-06-291-2/+4
| | | | | | | | |
* | | | | | | | | DOC: Fixed minor typo in BitGenerator reference (#21876)Bram2022-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Bram <b.t.ton@saxion.nl>
* | | | | | | | | Merge pull request #21863 from seberg/fpe-warning-simplificationCharles Harris2022-06-284-47/+17
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | ENH,MAINT: Improve and simplify scalar floating point warnings
| * | | | | | | | DOC: Fixup docs for improved scalar floating point warning messageSebastian Berg2022-06-281-1/+1
| | | | | | | | |
| * | | | | | | | ENH,MAINT: Improve and simplify scalar floating point warningsSebastian Berg2022-06-283-46/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the scalar operations warnings read e.g.: overflow encountered in scalar multiply rather than: overflow encountered in float_scalars It also fixes one case where "assignment" rather than "cast" was used when I added the FPEs for casts. Otherwise, uses the helper that I intrudced for for the floating point casts in all places to simplify the code, the only "complicated" thing is that I try to give "scalar divide" rather than "scalar true_divide" as warnings, since "true_divide" should not really be something that end-users need be aware of.
* | | | | | | | | BUG: Reject non integer array-likes with size 1 in delete (#21857)Sebastian Berg2022-06-282-14/+39
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Non integer array-likes were not correctly rejected when a new fast-path was added to `np.delete` in gh-16895. This includes the _explicitly_ added `dtype=object` which should not be allowed since it is not allowed in normal indexing either. Closes gh-21840