[Pyrex] getting data pointer to numpy object
Brian Blais
bblais at bryant.edu
Fri Mar 31 15:44:32 CEST 2006
Greg Ewing wrote:
> bblais at bryant.edu wrote:
>
> >>Filip Wasilewski wrote:
> >>
> >>>The code works just fine for me. What's more it works even better if a
> >>>2D double numpy array is passed to the fun1 function.
> >
> >
> >>can you tell me what version of python you are using, and what
> version of pyrex and
> >>numpy you are using? perhaps I need to upgrade?
>
> Just in case Filip didn't make it clear, your example
> was expecting a 2D array, but you were passing it a
> 1D array. That's why you weren't getting the
> expected result.
>
thanks! I hadn't caught that in Filip's message. This was a "I'm coming from
Matlab" thing, where there are no 1D arrays. I feel a little foolish for missing this.
thanks for all your help everyone! I have to say that Pyrex is the best thing that I
have ever seen available for a language. Not having to deal with yet another API is
great!
bb
--
-----------------
bblais at bryant.edu
http://web.bryant.edu/~bblais
More information about the Pyrex
mailing list