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

Function is_py_sequence

imperative/python/src/tensor_utils.cpp:381–386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379}
380
381bool is_py_sequence(py::handle arg) {
382 if (PyArray_Check(arg.ptr()) || TensorWrapper::try_cast(arg.ptr())) {
383 return false;
384 }
385 return PySequence_Check(arg.ptr());
386}
387
388py::object get_res_by_refhdl(
389 py::handle value, py::handle dtype, py::handle device, py::handle ref_hdl) {

Callers 3

_astensor1d_cppFunction · 0.85
_split_cppFunction · 0.85
list2vectorFunction · 0.85

Calls 2

try_castFunction · 0.85
ptrMethod · 0.45

Tested by

no test coverage detected