Skip to content

Commit

Permalink
fix: test from_raggedtensor on CUDA
Browse files Browse the repository at this point in the history
Use a consistent back-end for comparison.
  • Loading branch information
ianna authored Nov 8, 2024
1 parent 8bbc8a6 commit 6c8a867
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_3210_to_raggedtensor_from_raggedtensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ def test_convert_from_raggedtensor():
result1.content.data == ak.to_backend(np_array1, result1.backend).layout.data
).all()
assert (result1.offsets.data == [0, 2, 3, 3, 5]).all()
assert (
result1.offsets.data
== ak.to_backend([0, 2, 3, 3, 5], result1.backend).layout.data
).all()
assert from_raggedtensor(tf_array1).to_list() == ak_array1.to_list()

tf_array2 = tf.RaggedTensor.from_nested_row_splits(
Expand Down

0 comments on commit 6c8a867

Please sign in to comment.