Given two shape tuples, return the broadcast result shape as a tuple, or None if the shapes are incompatible - by right-aligning and applying the broadcasting rule.
Input
shape_a = (2, 1, 3)
shape_b = (7, 1, 3, 1)
Output
(7, 2, 3, 3)
Premium problem
This one's part of Premium. Unlock the full NumPy track plus every other premium problem on the site.