summaryrefslogtreecommitdiff
path: root/numpy/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/core/src')
-rw-r--r--numpy/core/src/arraytypes.inc.src6
-rw-r--r--numpy/core/src/scalarmathmodule.c.src2
2 files changed, 7 insertions, 1 deletions
diff --git a/numpy/core/src/arraytypes.inc.src b/numpy/core/src/arraytypes.inc.src
index 29f017fe4..aa20acb6b 100644
--- a/numpy/core/src/arraytypes.inc.src
+++ b/numpy/core/src/arraytypes.inc.src
@@ -1955,6 +1955,12 @@ PyArray_DescrFromType(int type)
*/
return NULL;
}
+ else if ((type == PyArray_CHAR) || \
+ (type == PyArray_CHARLTR)) {
+ ret = PyArray_DescrNew(_builtin_descrs[PyArray_STRING]);
+ ret->elsize = 1;
+ return ret;
+ }
else if PyTypeNum_ISUSERDEF(type) {
ret = userdescrs[type-PyArray_USERDEF];
}
diff --git a/numpy/core/src/scalarmathmodule.c.src b/numpy/core/src/scalarmathmodule.c.src
index e9e8d09fd..c6f2088ca 100644
--- a/numpy/core/src/scalarmathmodule.c.src
+++ b/numpy/core/src/scalarmathmodule.c.src
@@ -597,7 +597,7 @@ static PyObject *
{
PyObject *ret;
@name@ arg1, arg2, out;
- @otyp@ out1;
+ @otyp@ out1=0;
int retstatus;
switch(_@name@_convert2_to_ctypes(a, &arg1, b, &arg2)) {