summaryrefslogtreecommitdiff
path: root/weave/examples/functional.py
diff options
context:
space:
mode:
authorEric Jones <eric@enthought.com>2002-10-10 09:05:34 +0000
committerEric Jones <eric@enthought.com>2002-10-10 09:05:34 +0000
commitb9e184cb5bc0f9c2fa2aa4d4e78b6c45541fa73a (patch)
treec3c489013197cb2fa5f91ac63c598eb87253f7bb /weave/examples/functional.py
parent6978ceae6b1f69395d700f7c5a464dd45665ec88 (diff)
downloadnumpy-b9e184cb5bc0f9c2fa2aa4d4e78b6c45541fa73a.tar.gz
This checkin marks a fairly substantial change in the C++ classes for
weave. The original SCXX code has been augmented and mutated to the point of not be recognizable as SCXX any more. File and class names have moved more toward boost naming conventions. The most significant change is that, when writing standard inline() code, end users are not responsible for reference counting at all. Additionally, casting functions have been added and methods have been overloaded so that conversions between python types and C types are handled transparently for the basic types (char*,int,float, double,std::string,std::complex<double>, etc.) py::object has been augmented to handle attribute access, function calling, method calling, and pretty much all of the rest of the PyObject_xxx API. This is near feature complete for weave 0.3. The remaining tasks are to test on other platforms and re-write the documentation.
Diffstat (limited to 'weave/examples/functional.py')
-rw-r--r--weave/examples/functional.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/weave/examples/functional.py b/weave/examples/functional.py
index 1c18cbc32..015cfc0c1 100644
--- a/weave/examples/functional.py
+++ b/weave/examples/functional.py
@@ -18,8 +18,8 @@ def c_list_map(func,seq):
"""
assert(type(func) in [FunctionType,MethodType,type(len)])
code = """
- #line 12 "functional.py"
- py::tuple = args(1);
+ #line 22 "functional.py"
+ py::tuple args(1);
int N = seq.len();
py::list result(N);
for(int i = 0; i < N;i++)
@@ -37,7 +37,7 @@ def c_list_map2(func,seq):
"""
assert(type(func) in [FunctionType,MethodType,type(len)])
code = """
- #line 32 "functional.py"
+ #line 40 "functional.py"
py::tuple args(1);
PyObject* py_args = (PyObject*)args;
py::list result(seq.len());