summaryrefslogtreecommitdiff
path: root/weave/standard_array_spec.py
diff options
context:
space:
mode:
authorEric Jones <eric@enthought.com>2002-01-14 06:35:59 +0000
committerEric Jones <eric@enthought.com>2002-01-14 06:35:59 +0000
commit3d616a2b426aaaf63b43b95e1fce05ba6bfc984d (patch)
treefb645ea040553a3377154e7eef1757a8854b8093 /weave/standard_array_spec.py
parente6c3b438b2e9897b9f23d1784f15f898525d6617 (diff)
downloadnumpy-3d616a2b426aaaf63b43b95e1fce05ba6bfc984d.tar.gz
* conversion_to_int and py_to_int now both throw TypeError, but conversion_to_in
t prefixes the msg with "Conversion Error:" so that conversion errors can be dif ferentiated from errors thrown in the user's code.
Diffstat (limited to 'weave/standard_array_spec.py')
-rw-r--r--weave/standard_array_spec.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/weave/standard_array_spec.py b/weave/standard_array_spec.py
index 78eb0f176..6d104f12c 100644
--- a/weave/standard_array_spec.py
+++ b/weave/standard_array_spec.py
@@ -33,7 +33,7 @@ class array_specification(base_specification):
var_name = self.retrieve_py_variable(inline=1)
templ = '// %(name)s array declaration\n' \
'py_%(name)s= %(var_name)s;\n' \
- 'PyArrayObject* %(name)s = py_to_numpy(py_%(name)s,"%(name)s");\n' \
+ 'PyArrayObject* %(name)s = convert_to_numpy(py_%(name)s,"%(name)s");\n' \
'int* _N%(name)s = %(name)s->dimensions;\n' \
'int* _S%(name)s = %(name)s->strides;\n' \
'int _D%(name)s = %(name)s->nd;\n' \
@@ -45,7 +45,7 @@ class array_specification(base_specification):
type = numeric_to_blitz_type_mapping[self.numeric_type]
name = self.name
templ = '// %(name)s array declaration\n' \
- 'PyArrayObject* %(name)s = py_to_numpy(py_%(name)s,"%(name)s");\n' \
+ 'PyArrayObject* %(name)s = convert_to_numpy(py_%(name)s,"%(name)s");\n' \
'int* _N%(name)s = %(name)s->dimensions;\n' \
'int* _S%(name)s = %(name)s->strides;\n' \
'int _D%(name)s = %(name)s->nd;\n' \