diff options
author | Eric Jones <eric@enthought.com> | 2002-10-13 11:26:41 +0000 |
---|---|---|
committer | Eric Jones <eric@enthought.com> | 2002-10-13 11:26:41 +0000 |
commit | f067ab7937260fdb9405dc258bac9c21c7b72395 (patch) | |
tree | dd78615648561faf8c22174eefdb259b2c767585 /weave/standard_array_spec.py | |
parent | 323785055e59380bcaa25199e472ac7ff685dfbe (diff) | |
download | numpy-f067ab7937260fdb9405dc258bac9c21c7b72395.tar.gz |
added changes for unsigned cahracter support on Numeric arrays.
added Linux support for wxPython. This still has quite a bit of hard coded
stuff in it because there is no easy way to query it. This will slowly improve.
Diffstat (limited to 'weave/standard_array_spec.py')
-rw-r--r-- | weave/standard_array_spec.py | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/weave/standard_array_spec.py b/weave/standard_array_spec.py index 14e276b4a..9b75ac572 100644 --- a/weave/standard_array_spec.py +++ b/weave/standard_array_spec.py @@ -4,12 +4,15 @@ from Numeric import * from types import * import os + num_typecode = {} num_typecode['c'] = 'PyArray_CHAR' num_typecode['1'] = 'PyArray_SBYTE' num_typecode['b'] = 'PyArray_UBYTE' num_typecode['s'] = 'PyArray_SHORT' +num_typecode['w'] = 'PyArray_USHORT' num_typecode['i'] = 'PyArray_INT' # PyArray_INT has troubles ?? What does this note mean ?? +num_typecode['u'] = 'PyArray_UINT' num_typecode['l'] = 'PyArray_LONG' num_typecode['f'] = 'PyArray_FLOAT' num_typecode['d'] = 'PyArray_DOUBLE' @@ -34,9 +37,11 @@ public: !(numeric_type == PyArray_INT && arr_type == PyArray_LONG) && !(numeric_type == PyArray_LONG && arr_type == PyArray_INT)) { - char* type_names[20] = {"char","unsigned byte","byte", "short", "int", - "long", "float", "double", "complex float", - "complex double", "object","ntype","unkown"}; + + char* type_names[20] = {"char","unsigned byte","byte", "short", "unsigned short", + "int", "unsigned int", "long", "float", "double", + "complex float","complex double", "object","ntype", + "unkown"}; char msg[500]; sprintf(msg,"Conversion Error: received '%s' typed array instead of '%s' typed array for variable '%s'", type_names[arr_type],type_names[numeric_type],name); @@ -54,9 +59,11 @@ public: !(numeric_type == PyArray_INT && arr_type == PyArray_LONG) && !(numeric_type == PyArray_LONG && arr_type == PyArray_INT)) { - char* type_names[13] = {"char","unsigned byte","byte", "short", "int", - "long", "float", "double", "complex float", - "complex double", "object","ntype","unkown"}; + char* type_names[20] = {"char","unsigned byte","byte", "short", + "unsigned short", "int", "unsigned int", + "long", "float", "double", + "complex float", "complex double", + "object","ntype","unkown"}; char msg[500]; sprintf(msg,"received '%s' typed array instead of '%s' typed array for variable '%s'", type_names[arr_type],type_names[numeric_type],name); |