ive the second parameter as
>
> order = 'C' or 'F'
>
> Now the question is: is it possible to specify a named parameter from
> the C++ code ?
> If the answer is "yes", how ?
>
> Thank you in advance,
> Michele
>
> --
> Michele De St
gt; Hans
>
>
>
> - Ursprüngliche Mail
>> Von: Sebastian Walter
>> An: Development of Python/C++ integration
>> Gesendet: Freitag, den 15. Mai 2009, 11:02:23 Uhr
>> Betreff: Re: [C++-sig] operator+(A, B) without B::B() default constructor in
>>
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hans Roessler schrieb:
Hello Hans,
in my experience .def(self+other) often didn't quite do what I expected.
You could try something like that:
int int__add__A_B(const A &lhs, const B &rhs){
return operator+(A,B);
}
.def("__add__", &int__add__A
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hey, thanks for your replies: they helped a lot.
Ravi schrieb:
> On Thursday 22 January 2009 05:51:20 Sebastian Walter wrote:
>> In my above case I know that *x won't be deleted because it is global,
>> right?
>
> *x is
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Ravi schrieb:
> On Wednesday 21 January 2009 03:40:00 Sebastian Walter wrote:
>> Apparently I have to increase the refcount manually when I return a raw
>> PyObject. So I wrote getter functions like that:
>>
>>
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Ravi schrieb:
> On Tuesday 20 January 2009 04:27:02 Sebastian Walter wrote:
>> Thanks for the hint :),
>> Your code is a little to heavyweight for my purposes,
>> but I learned quite a lot how boost::python converters work.
>
andle<>(PyArray_SimpleNewFromData(1,
&N, PyArray_DOUBLE, x;
double *y = static_cast PyArray_DATA(numpy_x.ptr());
y[0] = 37.;
for(int n = 0; n On Monday 19 January 2009 07:16:10 Sebastian Walter wrote:
>> My question is:
>> How can I create a
>> boost::py
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello,
On the C++ side I have a raw pointer: double *x;
I'd like to change its values from within Python by using Numpy.
Example code can be found below.
My approach is
1) make PyArray from existing data *x with PyArray_SimpleNewFromData
2) create a b
port *
def f(a):
a.x = 12345
Thanks in advance,
Sebastian Walter
--
Sebastian Walter
Institut fuer Mathematik, Humboldt-UniversitaetTel: +49 (30) 2093-5869
Rudower Chaussee 25, Adlershof, Berlin Fax: +49 (30) 2093-5859
Post: Unter den Linden 6, D-10099 Berlin