Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Fix extraction of field with offset to external array #7945

Merged
merged 26 commits into from
May 11, 2023
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
885c3c0
example fix
dream189free May 5, 2023
b0c8000
Build offset when it is empty
dream189free May 6, 2023
e33a788
Add tests for extract tensor to external array
dream189free May 6, 2023
44074b9
Update comments
dream189free May 6, 2023
3d71798
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 6, 2023
6715a2c
Fix field index with offset in vector_to_fast_image
dream189free May 8, 2023
2e274e6
Fix index issue in matrix_to_ext_arr()
dream189free May 8, 2023
e6d231a
Fix index issues related to *_to_image
dream189free May 8, 2023
926b6ba
Fix issues in tensor_to_tensor()
dream189free May 8, 2023
dbecd08
Fix issues in ext_arr_to_tensor()
dream189free May 8, 2023
9db8af2
Fix issues in matrix from_numpy()
dream189free May 8, 2023
bf56ef0
Format code
dream189free May 8, 2023
febd7a2
Merge remote-tracking branch 'tianyiliu/field-offset' into field-offset
dream189free May 8, 2023
cefcb09
Merge remote-tracking branch 'origin/master' into field-offset
dream189free May 9, 2023
1b3ef87
Fix a typo
dream189free May 9, 2023
2e3b7b4
Fix issue in get_depth_buffer
dream189free May 10, 2023
d9b377b
Fix issue in parallel_sort
dream189free May 10, 2023
c3eafc9
Fix issue in PrefixSumExecutor
dream189free May 10, 2023
c8fc8a9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 10, 2023
2c176cc
Bug fix
dream189free May 10, 2023
6f7c84c
Update test_field_offset_*
dream189free May 10, 2023
a9fcf00
Update test for set_image
dream189free May 10, 2023
cc2a394
Update test test_matrix_*_numpy_with_offset
dream189free May 10, 2023
ba06b07
Format code
dream189free May 10, 2023
97fba8d
Fix sign issue with integer in test_set_image_fast_gui
dream189free May 10, 2023
2b05838
Format code
dream189free May 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'origin/master' into field-offset
dream189free committed May 9, 2023
commit cefcb09db6b4d250024e3173406fccd542ff3506
9 changes: 9 additions & 0 deletions tests/python/test_matrix.py
Original file line number Diff line number Diff line change
@@ -1333,3 +1333,12 @@ def mat_equal(A, B, tol=1e-6):

tol = 1e-5 if dtype == ti.f32 else 1e-12
assert mat_equal(x.to_numpy(), arr, tol=tol)


@test_utils.test()
def test_matrix_dtype():
a = ti.types.vector(3, dtype=ti.f32)([0, 1, 2])
assert a.entries.dtype == np.float32

b = ti.types.matrix(2, 2, dtype=ti.i32)([[0, 1], [2, 3]])
assert b.entries.dtype == np.int32
You are viewing a condensed version of this merge commit. You can view the full changes here.