Skip to content

Commit

Permalink
fix: test from_raggedtensor on GPU (#3288)
Browse files Browse the repository at this point in the history
* fix: test from_raggedtensor on GPU

* style: pre-commit fixes

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
ianna and pre-commit-ci[bot] authored Oct 31, 2024
1 parent c7ebd58 commit 3fd561a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_3210_to_raggedtensor_from_raggedtensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ def test_convert_from_raggedtensor():

ak_array1 = ak.contents.ListOffsetArray(offsets1, content1)
result1 = ak.to_layout(from_raggedtensor(tf_array1), allow_record=False)
assert (result1.content.data == np_array1).all()
assert (
result1.content.data == ak.to_backend(np_array1, result1.backend).layout.data
).all()
assert (result1.offsets.data == [0, 2, 3, 3, 5]).all()
assert from_raggedtensor(tf_array1).to_list() == ak_array1.to_list()

Expand Down

0 comments on commit 3fd561a

Please sign in to comment.