Skip to content

Commit babd919

Browse files
committed
Sequence -> List cont.
1 parent c3c567d commit babd919

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/packaged_modules/test_hdf5.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import pytest
33

44
import h5py
5-
from datasets import Array2D, Array3D, Array4D, Features, Sequence, Value
5+
from datasets import Array2D, Array3D, Array4D, Features, List, Value
66
from datasets.builder import InvalidConfigName
77
from datasets.data_files import DataFilesDict, DataFilesList
88
from datasets.download.streaming_download_manager import StreamingDownloadManager
@@ -579,8 +579,8 @@ def test_hdf5_feature_inference(hdf5_file_with_arrays):
579579
# (n_rows, 2, 3, 4, 5) -> Array4D with shape (2, 3, 4, 5)
580580
assert isinstance(features["tensor_4d"], Array4D)
581581
assert features["tensor_4d"].shape == (2, 3, 4, 5)
582-
# (n_rows, 10) -> Sequence of length 10
583-
assert isinstance(features["vector_1d"], Sequence)
582+
# (n_rows, 10) -> List of length 10
583+
assert isinstance(features["vector_1d"], List)
584584
assert features["vector_1d"].length == 10
585585

586586

@@ -600,9 +600,9 @@ def test_hdf5_vlen_feature_inference(hdf5_file_with_vlen_arrays):
600600

601601
# Check specific feature types for variable-length arrays
602602
features = hdf5.info.features
603-
# Variable-length arrays should become Sequence features by default (for small datasets)
604-
assert isinstance(features["vlen_ints"], Sequence)
605-
assert isinstance(features["mixed_data"], Sequence)
603+
# Variable-length arrays should become List features by default (for small datasets)
604+
assert isinstance(features["vlen_ints"], List)
605+
assert isinstance(features["mixed_data"], List)
606606

607607
# Check that the inner feature types are correct
608608
assert isinstance(features["vlen_ints"].feature, Value)

0 commit comments

Comments
 (0)