Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
147
def
is_numpy_array(x):
148
""
"
149
Tests
if
`x` is a numpy array or not.
150
""
"
151
return
_is_numpy(x)
152
153
154
def
_is_torch(x):
Callers
8
get_image_type
Function · 0.85
is_valid_image
Function · 0.85
load_tf2_state_dict_in_pytorch_model
Function · 0.85
transpose
Function · 0.85
reshape
Function · 0.85
squeeze
Function · 0.85
expand_dims
Function · 0.85
tensor_size
Function · 0.85
Calls
1
_is_numpy
Function · 0.85
Tested by
no test coverage detected