Skip to content
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
wants to merge 1,037 commits into
base: highway
Choose a base branch
from
Open

Rint hwy #10

wants to merge 1,037 commits into from

Conversation

luyahan
Copy link
Collaborator

@luyahan luyahan commented May 11, 2024

No description provided.

@luyahan luyahan force-pushed the rint-hwy branch 6 times, most recently from b33d8dd to db6b36c Compare May 15, 2024 10:32
otieno-juma and others added 24 commits July 22, 2024 09:51
I used AI Llama 3 to help create these.
@bmwoodruff and I reviewed them.
[skip azp] [skip cirrus]
…hift

DOC: AI generated examples for ma.left_shift.
`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
)

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
charris and others added 27 commits August 9, 2024 07:31
These were skipped due to failing, but they are passing again now.

Closes numpygh-26824
CI: Re-enable nightly OpenBLAS test runs
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
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
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.