with self.subTest(t=t, f=f):
          with self.assertRaisesIncompatibleShapesError(
              (ValueError, errors.InvalidArgumentError)):
            f(x.astype(t), y.astype(t))