MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / PyTensorObject_ndim

Function PyTensorObject_ndim

oneflow/api/python/framework/tensor.cpp:582–584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

580 {NULL}};
581
582static PyObject* PyTensorObject_ndim(PyObject* self, void* unused) {
583 return functional::CastToPyObject(PyTensor_Unpack(self)->ndim());
584}
585
586static PyObject* PyTensorObject_shape(PyObject* self, void* unused) {
587 return functional::CastToPyObject(PyTensor_Unpack(self)->shape());

Callers

nothing calls this directly

Calls 2

CastToPyObjectFunction · 0.85
ndimMethod · 0.80

Tested by

no test coverage detected