MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenImageIO / python_array_code

Function python_array_code

src/python/py_imageinput.cpp:137–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135
136
137const char *
138python_array_code (TypeDesc format)
139{
140 switch (format.basetype) {
141 case TypeDesc::UINT8 : return "B";
142 case TypeDesc::INT8 : return "b";
143 case TypeDesc::UINT16 : return "H";
144 case TypeDesc::INT16 : return "h";
145 case TypeDesc::UINT32 : return "I";
146 case TypeDesc::INT32 : return "i";
147 case TypeDesc::FLOAT : return "f";
148 case TypeDesc::DOUBLE : return "d";
149 default : return "f"; // Punt -- return float
150 }
151}
152
153
154

Callers 1

C_array_to_Python_arrayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected