def METHOD_NAME(self):
    for xp in (numpy, cupy):
        a = testing.shaped_random((5,), xp, dtype=bool)
        with pytest.raises(Exception):
            xp.polynomial.polynomial.polycompanion(a)