Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 6, 2023
1 parent 44074b9 commit 3d71798
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/python/test_offset.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,14 @@ def test_offset_must_throw_matrix():

@test_utils.test(arch=get_host_arch_list())
def test_field_offset_print():
val = ti.field(dtype=ti.f32, shape=(3,3), offset=(-1, -1))
val = ti.field(dtype=ti.f32, shape=(3, 3), offset=(-1, -1))
val.fill(1.0)
print(val)


@test_utils.test(arch=get_host_arch_list())
def test_field_offset_to_numpy():
shape = (3,3)
val = ti.field(dtype=ti.f32, shape=shape, offset=(-1, -1))
shape = (3, 3)
val = ti.field(dtype=ti.f32, shape=shape, offset=(-1, -1))
val.fill(1.0)
assert np.allclose(val.to_numpy(), np.ones(shape, dtype=np.float32))

0 comments on commit 3d71798

Please sign in to comment.