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

Function PyArrayCheckLongScalar

oneflow/extension/python/numpy.cpp:101–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101bool PyArrayCheckLongScalar(PyObject* obj) {
102 return PyArray_CheckScalar(obj) && PyDataType_ISINTEGER(PyArray_DescrFromScalar(obj));
103}
104
105bool PyArrayCheckFloatScalar(PyObject* obj) {
106 return PyArray_CheckScalar(obj) && PyDataType_ISFLOAT(PyArray_DescrFromScalar(obj));

Callers 5

ParseScalarFunction · 0.85
UnpackIndexItemFunction · 0.85
PyTensorIndexCheckFunction · 0.85
PyUnpackTensorIndexFunction · 0.85
TypeCheckMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected