Now in numpy version 1.20.0 there is np.broadcast_shapes
that will broadcast multiple shapes together, is there something similar but for broadcasting the strides - something like np.broadcast_strides
?
Say I have two arrays A
and B
with the respective shapes (1,)
and (10,)
. I want to get the resulting strides from out = np.broadcast_to(A, B.shape)
(which will be out.strides = (0,)
in this case), but I don't care about doing the actual broadcast.