()
| 1190 | |
| 1191 | |
| 1192 | def test_cast_array_to_features_array_xd(): |
| 1193 | # same storage type |
| 1194 | arr = pa.array([[[0, 1], [2, 3]], [[4, 5], [6, 7]]], pa.list_(pa.list_(pa.int32(), 2), 2)) |
| 1195 | casted_array = cast_array_to_feature(arr, Array2D(shape=(2, 2), dtype="int32")) |
| 1196 | assert casted_array.type == Array2DExtensionType(shape=(2, 2), dtype="int32") |
| 1197 | # different storage type |
| 1198 | casted_array = cast_array_to_feature(arr, Array2D(shape=(2, 2), dtype="float32")) |
| 1199 | assert casted_array.type == Array2DExtensionType(shape=(2, 2), dtype="float32") |
| 1200 | |
| 1201 | |
| 1202 | def test_cast_array_to_features_sequence_classlabel(): |
nothing calls this directly
no test coverage detected