You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ENH: Allow ufuncs to request the iterator to provide contiguous arrays #30413
In #29699, a ufunc loop for sin and cos is added that, if the input array is not contiguous, makes a copy to a contiguous buffer so that the result can be calculated using a vectorized SIMD loop. This makes a lot of sense, but as discussed there, it seems a bit strange to do this in the ufunc loop when the iterator is already able to do exactly this for non-aligned data or dtype mismatches. Indeed, it has the NPY_ITER_CONTIG flag for this purpose, so it would seem to be only a matter of allowing the ufunc/array method to specific that this should be used, either by a flag of its own or perhaps more simply, by only providing the contiguous loop in an array method.
changed the title [-]ENH: Allow requesting the iterator to provide contiguous arrays[/-][+]ENH: Allow ufuncs to request the iterator to provide contiguous arrays[/+]on Dec 10, 2025
Activity
[-]ENH: Allow requesting the iterator to provide contiguous arrays[/-][+]ENH: Allow ufuncs to request the iterator to provide contiguous arrays[/+]