Discussion:
[Pyublas] to python conversion question
Neal Becker
2009-01-26 18:53:39 UTC
Permalink
What happens if I pass a vector of a different element type than the c++ code
expects? For example, what if:

F (numpy_vector<double>)

is called from python with zeros (10, dtype=int)? How about other conversions
(double vs complex?)

What I'd like to happen is I'd get an error, and that if I wanted I could
overload F:

F (numpy_vector<int>)...
Andreas Klöckner
2009-01-26 21:44:25 UTC
Permalink
Post by Neal Becker
What happens if I pass a vector of a different element type than the c++
F (numpy_vector<double>)
is called from python with zeros (10, dtype=int)? How about other
conversions (double vs complex?)
What I'd like to happen is I'd get an error, and that if I wanted I could
F (numpy_vector<int>)...
Both wishes should be fulfilled by current code. If not, that's a bug.

Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.tiker.net/pipermail/pyublas/attachments/20090126/5e5ea136/attachment.pgp>
Loading...