Stéfan van der Walt sun.ac.za> writes:
>
> On 16 April 2010 21:35, Paul Northug gmail.com> wrote:
> > how is it stored in memory, as [1, 2, 3, 4] or [1, 3, 2, 4]?
>
> The latter:
>
> In [22]: np.fromstring(str(x.data))
> Out[22]: array([ 1., 3., 2., 4.])
>
> > But when I call external lib
On 16 April 2010 21:35, Paul Northug wrote:
> how is it stored in memory, as [1, 2, 3, 4] or [1, 3, 2, 4]?
The latter:
In [22]: np.fromstring(str(x.data))
Out[22]: array([ 1., 3., 2., 4.])
> But when I call external libraries through ctypes with a.ctypes.data
> as argument, the external func
Paul Northug wrote:
> I'd like to use numpy fortran ordering in order to use some external
> libraries more easily, but it looks like I don't understand how it
> works and it is causing transposes that are confusing me.
>
> When I define an array as:
>
> a = np.array([[1.,2.],[3.,4.]], order='F',
I'd like to use numpy fortran ordering in order to use some external
libraries more easily, but it looks like I don't understand how it
works and it is causing transposes that are confusing me.
When I define an array as:
a = np.array([[1.,2.],[3.,4.]], order='F', type=np.float32)
how is it store