forked from numpy/numpy
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rint hwy #10
Open
luyahan
wants to merge
1,037
commits into
highway
Choose a base branch
from
rint-hwy
base: highway
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+21,649
−9,093
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
luyahan
force-pushed
the
rint-hwy
branch
6 times, most recently
from
May 15, 2024 10:32
b33d8dd
to
db6b36c
Compare
I used AI Llama 3 to help create these. @bmwoodruff and I reviewed them. [skip azp] [skip cirrus]
DOC: AI-Gen examples for ma.put
…hift DOC: AI generated examples for ma.left_shift.
DOC: AI generated examples for ma.reshape
`TestFFT1D::test_identity_long_short[longdouble]` has been failing on musl linux, but not by much. This loosens the specified atol a hair to avoid that.
TST, MAINT: Loosen required test precision
BUG: Fix unicode strip
Co-authored-by: Nathan Goldbaum <[email protected]>
) The field `process_core_dims_func` is added to the PyUFuncObject. This is a pointer to a function typedef'd as typedef int (PyUFunc_ProcessCoreDimsFunc)( struct _tagPyUFuncObject *ufunc, npy_intp *core_dim_sizes); The author of a gufunc can set the field with a function that they implement. The function will be called when the gufunc is called. (The actual call is in the internal function _get_coredim_sizes.) The user-defined function can set an exception and return an error status if any of the core dimensions in `core_dim_sizes` do not satisfy the assumptions of the gufunc. The user-defined function can also *set* the value of core dimensions that are passed in as -1, meaning the correspond out parameter was not given. This allows calculations such pairwise distances (which generates m*(m-1)/2 output values for an input with shape (m, n)) and full convolution (generates m + n - 1 output values from two inputs with shapes m and n) to be implemented as gufuncs with automatic allocation of the output with the correct shape. The output shape is computed and set in the user-defined function. * MAINT: Update 2.1 C-API version and use it --------- Co-authored-by: Sebastian Berg <[email protected]>
This is a re-do of numpygh-26345, I'm taking over from @mtsokol because this is needed for the free-threaded work. The new _printoptions.py file exists to avoid a circular import during setup of the multiarray module. I'm guessing this adds some overhead to printing. I haven't benchmarked it because it wasn't clear to me: do we care about printing performance? I could certainly add some caching or a way to avoid repeatedly calling get_legacy_print_mode for every printed value. We could also keep the C global we had before but make it thread-local. I just thought it made things conceptually simpler to store all the printoptions state in the context variable. Co-authored-by: Mateusz Sokół <[email protected]>
In some environments (for example frozen executables created with PyInstaller for GUI applications) `sys.stderr` and `sys.stdout` might be `None`. The import-time access to `sys.stderr.write` in some `f2py` modules was causing such applications to crash during startup. Fix numpy#26862
cfuncs.py: fix crash when sys.stderr is not available
ENH: Support integer dtype inputs in rounding functions
[skip actions] [skip azp] [skip cirrus]
TYP,BUG: Fix potentially unresolved typevar in ``median`` and ``percentile``
TYP: Covariant ``numpy.ndenumerate`` type parameter
BLD: use smaller scipy-openblas builds
These were skipped due to failing, but they are passing again now. Closes numpygh-26824
CI: Re-enable nightly OpenBLAS test runs
TYP: add td64 overload for `mean`
Since I said that this seemed better then potential other changes, lets just do it.
Ref numpy#26159 See also the CPython HOWTO on this topic: https://docs.python.org/3.13/howto/free-threading-extensions.html#freethreading-extensions-howto. The remaining usages of PyDict_GetItem and PyDict_Next are all around the fields attribute of structured dtypes. I'm pretty sure that dictionary is effectively frozen after the DType is constructed, so I don't worry about those uses. It's not straightforward to write tests for this, I'm just applying static refactorings in places where the refactoring shouldn't introduce new reference counting bugs. * ENH: fix thread-unsafe C API usages * ENH: use critical sections in einsum * BUG: fix error handling in loadtxt C code * revert einsum changes
Co-authored-by: Joren Hammudoglu <[email protected]>
Co-authored-by: Joren Hammudoglu <[email protected]>
DOC: add td64 example in `np.mean`
MAINT: use npy_argparse for einsum
This is based on what Matti wrote in numpygh-27105 but also adding it to the migration guide. Closes numpygh-27083 Co-authored-by: Matti Picus <[email protected]>
REV: Revert undef I and document it
MAINT: update default NPY_FEATURE_VERSION after dropping py39
BUILD: improve download script
BUILD: update to OpenBLAS 0.3.28
TYP,TST: Bump mypy to 1.11.1
The value was simply hardcoded to the wrong thing in the dynamic path...
BUG: Fix NPY_RAVEL_AXIS on backwards compatible NumPy 2 builds
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.