Mercurial > pytave
diff python_to_octave.cc @ 70:e3de0f6f1552
experimental NumPy support
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Fri, 19 Jun 2009 13:51:36 +0200 |
parents | 2f4d6286fb36 |
children | b0991511a16d |
line wrap: on
line diff
--- a/python_to_octave.cc Wed Jun 17 11:49:14 2009 +0200 +++ b/python_to_octave.cc Fri Jun 19 13:51:36 2009 +0200 @@ -179,6 +179,10 @@ /* Commonly Numeric.array(..., Numeric.Complex) */ ARRAYCASE(PyArray_CDOUBLE, Complex) +#ifdef HAVE_NUMPY + ARRAYCASE(PyArray_BOOL, bool) +#endif + ARRAYCASE(PyArray_OBJECT, PyObject *) default: @@ -271,6 +275,11 @@ // FIXME: is the following needed? octvalue = octvalue.convert_to_str(true, true, '"'); break; +#ifdef HAVE_NUMPY + case PyArray_BOOL: + pyarrobj_to_octvalueNd<boolNDArray>(octvalue, pyarr, dims); + break; +#endif case PyArray_OBJECT: pyarrobj_to_octvalueNd<Cell>(octvalue, pyarr, dims); break;