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

Function test_cast_integer_array_to_features

tests/test_table.py:1106–1111  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1104
1105
1106def test_cast_integer_array_to_features():
1107 arr = pa.array([[0, 1]])
1108 assert cast_array_to_feature(arr, List(Value("string"))).type == pa.list_(pa.string())
1109 assert cast_array_to_feature(arr, List(Value("string")), allow_decimal_to_str=False).type == pa.list_(pa.string())
1110 with pytest.raises(TypeError):
1111 cast_array_to_feature(arr, List(Value("string")), allow_primitive_to_str=False)
1112
1113
1114def test_cast_float_array_to_features():

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