MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / is_tensor

Function is_tensor

imperative/python/src/tensor_utils.cpp:377–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375}
376
377bool is_tensor(py::handle arg) {
378 return bool(TensorWrapper::try_cast(arg.ptr()));
379}
380
381bool is_py_sequence(py::handle arg) {
382 if (PyArray_Check(arg.ptr()) || TensorWrapper::try_cast(arg.ptr())) {

Callers 6

_astensor1d_cppFunction · 0.85
_expand_argsFunction · 0.85
_broadcast_cppFunction · 0.85
_split_cppFunction · 0.85
_transpose_cppFunction · 0.85

Calls 2

try_castFunction · 0.85
ptrMethod · 0.45

Tested by

no test coverage detected