* Returns true if the object is something that is best considered * a Datetime, false otherwise. */
| 3081 | * a Datetime, false otherwise. |
| 3082 | */ |
| 3083 | static NPY_GCC_NONNULL(1) npy_bool |
| 3084 | is_any_numpy_datetime(PyObject *obj) |
| 3085 | { |
| 3086 | return (PyArray_IsScalar(obj, Datetime) || |
| 3087 | (PyArray_Check(obj) && ( |
| 3088 | PyArray_DESCR((PyArrayObject *)obj)->type_num == |
| 3089 | NPY_DATETIME)) || |
| 3090 | PyDate_Check(obj) || |
| 3091 | PyDateTime_Check(obj)); |
| 3092 | } |
| 3093 | |
| 3094 | /* |
| 3095 | * Returns true if the object is something that is best considered |
| 3096 | * a Timedelta, false otherwise. |
| 3097 | */ |
| 3098 | static npy_bool |
| 3099 | is_any_numpy_timedelta(PyObject *obj) |
| 3100 | { |
| 3101 | return (PyArray_IsScalar(obj, Timedelta) || |
| 3102 | (PyArray_Check(obj) && ( |
| 3103 | PyArray_DESCR((PyArrayObject *)obj)->type_num == NPY_TIMEDELTA)) || |
| 3104 | PyDelta_Check(obj)); |
| 3105 | } |
| 3106 | |
| 3107 | /* |
| 3108 | * Returns true if the object is something that is best considered |
no test coverage detected