Discussion:
[Pyublas] wrapping existing ublas matrices
Ben
2009-11-10 18:26:54 UTC
Permalink
hello --

is it possible for a numpy_* class to wrap the memory of an existing
ublas vector / matrix, without copying? i have existing ublas code
i'd like to expose to python, and the matrices are too huge to copy.

best, ben
Andreas Klöckner
2009-11-10 18:31:14 UTC
Permalink
Post by Ben
hello --
is it possible for a numpy_* class to wrap the memory of an existing
ublas vector / matrix, without copying? i have existing ublas code
i'd like to expose to python, and the matrices are too huge to copy.
This was the premise of "pylinear", a prior project of mine, which attempted
to reimplement a numpy-like array package on top of wrapped ublas types.

Code is here:
http://git.tiker.net/pylinear.git
git clone http://git.tiker.net/trees/pylinear.git

I personally have abandoned this approach in favor of writing my code as
templates that can deal with numpy_{matrix,vector} and ublas::{matrix,vector}.

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