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
It would be helpful if NumPy had a function that took a bunch of shapes as input and returned the broadcasted shape of those shapes, or raised an error if they cannot be broadcast.
Right now, the only way to do this is to actually construct arrays with the given shapes and pass them to np.broadcast or np.broadcast_arrays. As far as I can tell, the actual logic to get a broadcast shape is buried inside of the PyArray_Broadcast C function
eric-wieser, mhvk, WarrenWeckesser and uddeshyatyagi