MCPcopy
hub / github.com/huggingface/datasets / test_cast_array_to_features_nested

Function test_cast_array_to_features_nested

tests/test_table.py:1155–1159  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1153
1154
1155def test_cast_array_to_features_nested():
1156 arr = pa.array([[{"foo": [0]}]])
1157 assert cast_array_to_feature(arr, List({"foo": List(Value("string"))})).type == pa.list_(
1158 pa.struct({"foo": pa.list_(pa.string())})
1159 )
1160
1161
1162def test_cast_array_to_features_to_nested_with_no_fields():

Callers

nothing calls this directly

Calls 3

cast_array_to_featureFunction · 0.90
ListClass · 0.90
ValueClass · 0.90

Tested by

no test coverage detected