def test_eye_with_device(device): a = chainerx.eye(1, 2, 1, 'float32', device) b = chainerx.eye(1, 2, 1, 'float32') array_utils.check_device(a, device) chainerx.testing.assert_array_equal_ex(a, b)