diff options
-rw-r--r-- | numpy/core/src/multiarray/descriptor.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/numpy/core/src/multiarray/descriptor.c b/numpy/core/src/multiarray/descriptor.c index c6777d9bb..350b06843 100644 --- a/numpy/core/src/multiarray/descriptor.c +++ b/numpy/core/src/multiarray/descriptor.c @@ -125,6 +125,14 @@ _check_for_commastring(char *type, int len) return 0; } +static int +_check_for_datetime(char *type, int len) +{ + return 0; +} + + + #undef _chk_byteorder static PyArray_Descr * @@ -444,6 +452,13 @@ _convert_from_list(PyObject *obj, int align) } +static PyArray_Descr * +_convert_from_datetime(PyObject *obj, int align) +{ + return NULL; +} + + /* * comma-separated string * this is the format developed by the numarray records module @@ -868,6 +883,14 @@ PyArray_DescrConverter(PyObject *obj, PyArray_Descr **at) if (len <= 0) { goto fail; } + /* check for datetime format */ + if (_check_for_datetime(type, len)) { + *at = _convert_from_datetime(obj); + if (*at) { + return PY_SUCCEED; + } + return PY_FAIL; + } /* check for commas present or first (or second) element a digit */ if (_check_for_commastring(type, len)) { *at = _convert_from_commastring(obj, 0); |