Skip to content

Commit

Permalink
Fix for issue #385.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwoillez committed Aug 15, 2012
1 parent 63cd8f3 commit 2f28574
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions numpy/core/src/multiarray/scalartypes.c.src
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,15 @@ gentype_format(PyObject *self, PyObject *args)
obj = PyComplex_FromDoubles(val[0], val[1]);
Py_DECREF(dtype);
}
else if (PyArray_IsScalar(self, Void)) {
PyObject *arr = NULL;

arr = PyArray_FromScalar(self, NULL);
if (arr != NULL) {
obj = PyObject_Str((PyObject *)arr);
Py_DECREF(arr);
}
}
else {
obj = self;
Py_INCREF(obj);
Expand Down

0 comments on commit 2f28574

Please sign in to comment.