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
As np.concatenate does not support generators, and has additional overhead for more general cases, an optimized version might be implemented in ArrayKit.
NumPy's PyArray_AssignArray seems to be pretty close to what is needed:
In all of SF's usage of np.concatenate, the following pattern is used
As
np.concatenate
does not support generators, and has additional overhead for more general cases, an optimized version might be implemented in ArrayKit.NumPy's
PyArray_AssignArray
seems to be pretty close to what is needed:https://github.com/numpy/numpy/blob/891ab8ee00755a539bd118b1bbe4e0a237a2d844/numpy/core/src/multiarray/array_assign_array.c#L295
But given that the destination is guaranteed to be a newly created, contiguous array, there might be a more efficient route.
We might be able to use this lower level interface directly:
https://github.com/numpy/numpy/blob/891ab8ee00755a539bd118b1bbe4e0a237a2d844/numpy/core/src/multiarray/array_assign_array.c#L80
The text was updated successfully, but these errors were encountered: