Good catch. A np.atleast3d / 2d should do the trick instead of the test here.