MCPcopy Create free account
hub / github.com/modAL-python/modAL / data_shape

Function data_shape

modAL/utils/data.py:172–183  ·  view source on GitHub ↗

Returns the shape of the data set X

(X: modALinput)

Source from the content-addressed store, hash-verified

170
171
172def data_shape(X: modALinput):
173 """
174 Returns the shape of the data set X
175 """
176 try:
177 # scipy.sparse, torch, pandas and numpy all support .shape
178 return X.shape
179 except:
180 if isinstance(X, list):
181 return np.array(X).shape
182
183 raise TypeError("%s datatype is not supported" % type(X))

Callers 2

ranked_batchFunction · 0.90
expected_error_reductionFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…