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

Function TensorSize_New

oneflow/api/python/framework/size.cpp:170–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168int TensorSize_Check(PyObject* p) { return p && p->ob_type == &TensorSize_Type; }
169
170PyObject* TensorSize_New(Py_ssize_t len) { return TensorSize_Type.tp_alloc(&TensorSize_Type, len); }
171
172PyObject* TensorSize_NewFromShape(const Shape& size) {
173 PyObjectPtr self(TensorSize_New(size.NumAxes()));

Callers 2

TensorSize_NewFromShapeFunction · 0.85
shapeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected