def test_empty_like_with_device(device): t = chainerx.empty((2,), 'float32') a = chainerx.empty_like(t, device) b = chainerx.empty_like(t) array_utils.check_device(a, device) assert a.dtype == b.dtype assert a.shape == b.shape