map(lambda a, b: f(np.atleast_2d(a), np.atleast_2d(b)), np.broadcast_to(B,
    B.shape), B)
list(_)
map(lambda a, b: f(np.atleast_2d(a), np.atleast_2d(b)), np.broadcast_to(A,
    B.shape), B)
list(_)
python combining two logics of map()