diff options
author | Travis Oliphant <oliphant@enthought.com> | 2009-06-10 22:57:44 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2009-06-10 22:57:44 +0000 |
commit | 98a09c4658c2fe8e226b45dba26b7aa2602073da (patch) | |
tree | 2d67492815f55464be25e1877eb0b0fe800fe128 | |
parent | a4d3aa8c0e45e46f736cfffc840d26133d8c22b8 (diff) | |
download | numpy-98a09c4658c2fe8e226b45dba26b7aa2602073da.tar.gz |
Put placeholder in for date-time conversion.
-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); |