def test_get_dummy_device_for_empty_array(self): x = cuda.cupy.array([]).reshape((0, 10)) self.assertIs(cuda.get_device(x), cuda.DummyDevice)