summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | BLD, SIMD: Pad asm to avoid C99 complains on CLANGSayed Adel2023-01-161-3/+3
| | | |
| * | | MAINT: Create lib path if missing.Charles Harris2023-01-161-0/+1
| | | |
* | | | DOC: Add example for np.ma.diag (#22960)Stefanie Molin2023-01-161-0/+32
|/ / / | | | | | | | | | | | | | | | | | | * DOC: Add example for np.ma.diag as part of numpy#22269 * Add descriptions to example. * Fix typo.
* | | MAINT: `f2py` cleanup (#22885)Rohit Goswami2023-01-163-21/+19
| | | | | | | | | | | | | | | | | | | | | Updates the free format handling of .f90 and other common extensions (through a minor re-write). Also removes an unused function. This disallows previously allowed (but highly unlikely to be present) code-paths, namely having fixed form F77 code in a fortran 90 file (with .f90). Co-authored-by: Sebastian Berg <sebastianb@nvidia.com>
* | | DOC: Add version added information for the strict parameter in ↵Mark Harfouche2023-01-151-0/+2
| |/ |/| | | | | assert_array_equal (#23015)
* | ENH: Faster numpy.load (try/except _filter_header) (#22916)Michael2023-01-132-5/+20
| | | | | | | | | | | | | | This pull requests speeds up numpy.load. Since _filter_header is quite a bottleneck, we only run it if we must. Users will get a warning if they have a legacy Numpy file so that they can save it again for faster loading. Main discussion and benchmarks see #22898 Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
* | Merge pull request #22998 from seberg/dep-positive-finalizeCharles Harris2023-01-112-45/+2
|\ \ | | | | | | DEP: Finalize `+arr` returning a copy e.g. for string arrays
| * | DEP: Finalize `+arr` returning a copy e.g. for string arraysSebastian Berg2023-01-112-45/+2
| |/ | | | | | | | | | | This was deprecated 4-5 years ago in NumPy 1.16. Pandas stumbled over it cleaning up their warning filters, so I decided to just expire it.
* | ENH: Improve loadtxt error with dtype and non-matchinig column number (#22996)Sebastian Berg2023-01-112-2/+20
|/ | | | The number "changed" is weird if the user fixed it, so give a different message in that case.
* DOC: Fix gh-22990 by correcting docstring of result_typeOleksandr Pavlyk2023-01-101-1/+1
|
* Merge pull request #22986 from seberg/issue-22984Charles Harris2023-01-102-5/+54
|\ | | | | BUG: Ensure correct loop order in sin, cos, and arctan2
| * BUG: Ensure correct loop order in sin, cos, and arctan2Sebastian Berg2023-01-102-5/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These were incorrect afer being vectorized. The commit additional tests these (not arctan2 admittedly) and adds a check to generate_umath to make it a bit less likely that future additions add this type of thing. Note that the check allows duplicated loops so long they are correctly ordered the *first* time. This makes results correct, but duplicated loops are not nice anyways and it would be nice to remove them. We could drop them manually in hindsight even? In any case, that should not be backported, so it is not includedhere. Closes gh-22984
* | ENH: allow NEP 42 dtypes to work with np.char (#22863)Nathan Goldbaum2023-01-104-36/+100
|/ | | | | | | | | This makes it possible for new-style NEP 42 string dtypes like ASCIIDType to work with the functions in np.char, this has leads to some mild modification (stricter behavior in bad paths). It will only work with dtypes with a scalar that subclasses str or bytes. I also assume that you can create instances of the user dtype from python like dtype_instance = CustomDType(size_in_bytes). This is a pretty big assumption about the API of the dtype, I'm not sure offhand how I can do this more portably or more safely. I also added a new macro, NPY_DT_is_user_defined, which checks dtype->type_num == -1, which is currently true for all custom dtypes using the experimental dtype API. This new macro is needed because NPY_DT_is_legacy will return false for np.void. This is only tested via the user dtypes currently.
* Merge pull request #22980 from charris/fix-clang-suggestionsRalf Gommers2023-01-101-2/+2
|\ | | | | | | | | MAINT: Fix some noisy clang suggestions. [ci skip]
| * MAINT: Fix some noisy clang suggestions.Charles Harris2023-01-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | The suggestions looks like: ``` numpy/core/src/npysort/selection.cpp:426:39: warning suggest braces around initialization of subobject [-Wmissing-braces] arg_map{Tags::type_value, &introselect_noarg<Tags>, ^~~~~~~~~~~~~~~~~~~~~~~~ { } ```
* | DOC: remove extraneous backtick from warning (#22981)Eddie Darling2023-01-091-1/+1
|/
* Merge pull request #22779 from LeonaTaric/numpy_issue22745Charles Harris2023-01-091-0/+2
|\ | | | | DOC: All integer values must be non-negative
| * 去掉noteLeonaTaric2023-01-091-3/+2
| |
| * change note toLeonaTaric2022-12-161-2/+2
| | | | | | | | "All integer values must be non-negative"
| * All entropy/seed not None must be non-negativeLeonaTaric2022-12-131-0/+3
| |
* | Bug: Fix fill violating read-only flag. (#22959)Panagiotis Zestanakis2023-01-082-0/+12
| | | | | | | | | | | | | | PyArray_FillWithScalar checks if destination is writeable before attempting to fill it. A relevant test is added as a method of TestRegression Closes gh-22922 Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
* | MAINT: use pypy3.9 in testingmattip2023-01-081-5/+7
| |
* | DOC: Update docstring of `multivariate_normal` (#22938)Malte Londschien2023-01-071-2/+8
| | | | | | | | | | Make a note on results depending on system due. Closes gh-22919
* | Merge pull request #22939 from seberg/arm64-symbol-export-helpMatti Picus2023-01-074-19/+18
|\ \ | | | | | | MAINT: Move export for scipy arm64 helper into main module
| * | MAINT: Move export for scipy arm64 helper into main moduleSebastian Berg2023-01-054-19/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow up to gh-22679 which addressed gh-22673. The main thing is that we want the functions to be available after importing NumPy, so they need to be part of multiarray. However, `npymath` is a static library, so the symbols are not really exported there. The former PR did actually work in practice but this seems like it is technically the right place? For some reason, I had to add nextafter to be able to do: from scipy.spatial.distance import euclidean with the SciPy 1.9.3 wheels. SciPy test collection works with this for the 1.9.3 wheel, so this should be all the symbols hopefully.
* | | Merge pull request #22947 from seberg/attribute-error-helpMatti Picus2023-01-072-2/+53
|\ \ \ | | | | | | | | MAINT: Add additional information to missing scalar AttributeError
| * | | MAINT: Add additional information to missing scalar AttributeErrorSebastian Berg2023-01-052-2/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a followup on gh-22607 which removed them. Since it appears some users missed the DeprecationWarning entirely, it may help them to include the old information as an attribute error. An example is: ``` In [1]: np.int AttributeError: module 'numpy' has no attribute 'int'. `np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations ``` Yes, that is very verbose... your changes. Lines starting
* | | | BUG, SIMD: Fix spurious invalid exception for sin/cos on arm64/clangSayed Adel2023-01-061-2/+27
| |/ / |/| |
* | | ENH: Create string dtype instances from the abstract dtype (#22923)Nathan Goldbaum2023-01-052-1/+76
| | | | | | | | | | | | | | | Following up from #22863 (comment), this makes it possible to create string dtype instances from an abstract string DTypeMeta. Co-authored-by: Sebastian Berg <sebastianb@nvidia.com>
* | | TST: Add fixture to avoid issue with randomizing test order.Ross Barnowski2023-01-041-0/+4
| | |
* | | TST: split long ufunc.at test (#22918)Matti Picus2023-01-031-13/+12
| | | | | | | | | Cleanup from #22889
* | | Merge pull request #22889 from mattip/speedup-ufunc.at-mainSebastian Berg2023-01-034-220/+392
|\ \ \ | |/ / |/| | ENH: Speedup ufunc.at when casting is not needed
| * | MAINT: test broadcasting; test, fix output casting (from review)mattip2023-01-032-4/+18
| | |
| * | MAINT: remove overly-cautious check (from review)mattip2023-01-031-16/+10
| | |
| * | TST: use clean copiesmattip2023-01-031-5/+8
| | |
| * | MAINT: add missing test cases (from review)mattip2023-01-032-6/+33
| | |
| * | MAINT: improve coverage of slow path by using a user-defined dtypemattip2023-01-031-2/+9
| | |
| * | MAINT: remove dead code path (from review)mattip2023-01-031-6/+0
| | |
| * | MAINT: enable fast_path in more cases (from review)mattip2023-01-032-18/+8
| | |
| * | Revert "MAINT: elide the generic_wrapped_legacy_loop wrapper out of the hot ↵mattip2023-01-022-24/+8
| | | | | | | | | | | | | | | | | | loop" This reverts commit 154c293786a29cfbf976f08cab48698166d99399.
| * | use 4 for float, 2 for double in fast-path countmattip2022-12-291-1/+2
| | | | | | | | | | | | Signed-off-by: mattip <matti.picus@gmail.com>
| * | use better semantics for calling PyArray_DiscardWritebackIfCopymattip2022-12-291-1/+1
| | |
| * | lower limit to 2, improves benchmarksmattip2022-12-281-1/+1
| | |
| * | fix for non-generic_legacy loppsmattip2022-12-281-0/+4
| | |
| * | MAINT: do not try SIMD arithmetic loops if count < 4mattip2022-12-281-1/+1
| | |
| * | MAINT: elide the generic_wrapped_legacy_loop wrapper out of the hot loopmattip2022-12-282-8/+24
| | |
| * | add fast iter loop and benchmarkmattip2022-12-261-10/+85
| | |
| * | refactor part that does the iteration into functionmattip2022-12-261-177/+188
| | |
| * | refactor ufunc_at in preparation for breaking it into sub-functionsMatti Picus2022-12-261-194/+225
| | |
| * | ENH: find the place to add a fast path for ufunc_atMatti Picus2022-12-262-1/+22
| | |