MCPcopy Create free account
hub / github.com/numpy/numpy / array_datetime_data

Function array_datetime_data

numpy/core/src/multiarray/multiarraymodule.c:3757–3777  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3755}
3756
3757static PyObject *
3758array_datetime_data(PyObject *NPY_UNUSED(dummy), PyObject *args)
3759{
3760 PyArray_Descr *dtype;
3761 PyArray_DatetimeMetaData *meta;
3762
3763 if (!PyArg_ParseTuple(args, "O&:datetime_data",
3764 PyArray_DescrConverter, &dtype)) {
3765 return NULL;
3766 }
3767
3768 meta = get_datetime_metadata_from_dtype(dtype);
3769 if (meta == NULL) {
3770 Py_DECREF(dtype);
3771 return NULL;
3772 }
3773
3774 PyObject *res = convert_datetime_metadata_to_tuple(meta);
3775 Py_DECREF(dtype);
3776 return res;
3777}
3778
3779
3780static int

Callers

nothing calls this directly

Tested by

no test coverage detected