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

Method get_dict_examples

tests/features/test_array_xd.py:168–173  ·  view source on GitHub ↗
(self, shape_1, shape_2)

Source from the content-addressed store, hash-verified

166 }
167
168 def get_dict_examples(self, shape_1, shape_2):
169 return {
170 "image": np.random.rand(2, *shape_1).astype("float32").tolist(),
171 "source": ["foo", "bar"],
172 "matrix": np.random.rand(2, *shape_2).astype("float32").tolist(),
173 }
174
175 def _check_getitem_output_type(self, dataset, shape_1, shape_2, first_matrix):
176 matrix_column = dataset["matrix"][:]

Callers 2

test_write_batchMethod · 0.95
test_from_dictMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected