* check whether arrays with datatype dtype might have object fields. This will * only happen for structured dtypes (which may have hidden objects even if the * HASOBJECT flag is false), object dtypes, or subarray dtypes whose base type * is either of these. */
| 334 | * is either of these. |
| 335 | */ |
| 336 | NPY_NO_EXPORT int |
| 337 | _may_have_objects(PyArray_Descr *dtype) |
| 338 | { |
| 339 | PyArray_Descr *base = dtype; |
| 340 | if (PyDataType_HASSUBARRAY(dtype)) { |
| 341 | base = dtype->subarray->base; |
| 342 | } |
| 343 | |
| 344 | return (PyDataType_HASFIELDS(base) || |
| 345 | PyDataType_FLAGCHK(base, NPY_ITEM_HASOBJECT) ); |
| 346 | } |
| 347 | |
| 348 | /* |
| 349 | * Make a new empty array, of the passed size, of a type that takes the |
no outgoing calls
no test coverage detected