[C++-sig] Re: std::complex<double>?
Jonathan Brandmeyer
jbrandmeyer at earthlink.net
Fri Jan 9 17:17:50 CET 2004
On Fri, 2004-01-09 at 10:13, Neal D. Becker wrote:
> Jonathan Brandmeyer wrote:
>
> > On Fri, 2004-01-09 at 08:07, Neal D. Becker wrote:
> >> How do I reflect std::complex<double> into python?
> >
> > Well, there isn't any prebuilt suite for exporting that type to Python,
> > so you would have to write something along the lines of
> >
> > template<typename T>
> > void
> > wrap_std_complex( std::string name)
> > {
> > class_<std::complex<T> >(name, init<T, optional<T> >())
> > .def( "imag", &std::complex<T>::imag)
> > .def( self + self)
> > // ... and so on and so forth
> > ;
> > }
> >
>
> Thanks so much for your reply. I am an amateur at this - what documents can
> I find that would help me to complete the above outlined example?
>
boost/libs/python/doc/index.html in the source package.
More information about the Cplusplus-sig
mailing list