Re: Python: BlackIborCouponPricer
Posted by
Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/Python-BlackIborCouponPricer-SwapRateHelper-solved-tp5560p5565.html
On Sat, 2010-04-24 at 01:26 +0200, Lluis Pujol wrote:
> As suggested by Luigi I exported the IborCouponPricer and
> BlackIborCouponPricer with no compiling errors [...] I get the
> following error when I try to use it on Python.
>
> Traceback (most recent call last):
>
> setCouponPricer(frn.cashflows,pricer)
> TypeError: in method 'setCouponPricer', argument 1 of type 'std::vector<
> boost::shared_ptr< CashFlow >,std::allocator< boost::shared_ptr<
> CashFlow > > > const &'
I think you mean
setCouponPricer(frn.cashflows(),pricer)
(note the () after cashflows.)
If that still doesn't work, it might be that the declaration is not
picking up the typemap for cash-flow vectors. Try adding
%include cashflows.i
at the beginning of couponpricer.i.
Luigi
--
This gubblick contains many nonsklarkish English flutzpahs, but the
overall pluggandisp can be glorked from context.
-- David Moser
------------------------------------------------------------------------------
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users