A
Andrew Wilkinson
Hi,
I'm trying to wrap a Vector and Matrix class I have written in C into Python
types. Everything is working nicely, except for the Matrix multiply by
Vector function.
I have defined an nb_multiple callback, and it works fine for Matrix *
Matrix - but it's not even getting called for Matrix * Vector - Python is
deciding for me that its of the wrong type, and raising a type error. How
do I persuade it that I know what I'm doing?
I have seen about about coercing, but I'm not sure if that'll do what I want
- if someone could give me an example that'd be muchly appreciated.
Thanks in advance,
Andrew Wilkinson
I'm trying to wrap a Vector and Matrix class I have written in C into Python
types. Everything is working nicely, except for the Matrix multiply by
Vector function.
I have defined an nb_multiple callback, and it works fine for Matrix *
Matrix - but it's not even getting called for Matrix * Vector - Python is
deciding for me that its of the wrong type, and raising a type error. How
do I persuade it that I know what I'm doing?
I have seen about about coercing, but I'm not sure if that'll do what I want
- if someone could give me an example that'd be muchly appreciated.
Thanks in advance,
Andrew Wilkinson