MCPcopy Create free account
hub / github.com/ModalityDance/Omni-R1 / is_numpy_array

Function is_numpy_array

src/transformers/src/transformers/utils/generic.py:147–151  ·  view source on GitHub ↗

Tests if `x` is a numpy array or not.

(x)

Source from the content-addressed store, hash-verified

145
146
147def is_numpy_array(x):
148 """
149 Tests if `x` is a numpy array or not.
150 """
151 return _is_numpy(x)
152
153
154def _is_torch(x):

Callers 8

get_image_typeFunction · 0.85
is_valid_imageFunction · 0.85
transposeFunction · 0.85
reshapeFunction · 0.85
squeezeFunction · 0.85
expand_dimsFunction · 0.85
tensor_sizeFunction · 0.85

Calls 1

_is_numpyFunction · 0.85

Tested by

no test coverage detected