[C++-sig] Initialize SparseVector
nicodemus at esss.com.br
Wed Apr 13 16:27:39 CEST 2005
Take a look at make_constructor. I don't have time right now to provide
an example, but this should get you going.
Achim Domma (Procoders) wrote:
> I have wrapped a sparse vector class, which currently can be used like
> Everything works finde so far, but I want to implement a more pythonic
> way to initialize the vector. Something like this would be nice:
> v=svm.vector( (3,7), (9,-3.2), (5,0.3), ... )
> What's the easiest way to get something like this with boost.python? I
> have control over the complete code, so small modifications on the
> sparse vector class would be no problem.
> C++-sig mailing list
> C++-sig at python.org
More information about the Cplusplus-sig