Re: [Numpy-discussion] Float view of complex array

2015-01-26 Thread Jens Jørgen Mortensen
On 01/26/2015 11:02 AM, Jaime Fernández del Río wrote: > On Mon, Jan 26, 2015 at 1:41 AM, Sebastian Berg > mailto:sebast...@sipsolutions.net>> wrote: > > On Mo, 2015-01-26 at 09:24 +0100, Jens Jørgen Mortensen wrote: > > Hi! > > > > I have a view of a 2-d complex array that I would

Re: [Numpy-discussion] F2PY cannot see module-scope variables

2015-01-26 Thread Warren Weckesser
On 1/26/15, Yuxiang Wang wrote: > Dear all, > > Sorry about being new to both Fortran 90 and f2py. > > I have a module in fortran, written as follows, with a module-scope variable > dp: > > > ! testf2py.f90 > module testf2py > implicit none > privat

Re: [Numpy-discussion] F2PY cannot see module-scope variables

2015-01-26 Thread Yuxiang Wang
Sorry that I forgot to report the environment - Windows 64 bit, Python 3.4 64 bit. Numpy version is 1.9.1, and I commented the "raise NotImplementedError("Only MS compiler supported with gfortran on win64")" in the gnu.py, as instructed on this link: http://scientificcomputingco.blogspot.com.au/20

[Numpy-discussion] F2PY cannot see module-scope variables

2015-01-26 Thread Yuxiang Wang
Dear all, Sorry about being new to both Fortran 90 and f2py. I have a module in fortran, written as follows, with a module-scope variable dp: ! testf2py.f90 module testf2py implicit none private public dp, i1 integer, parameter :: dp=kind(

Re: [Numpy-discussion] new mingw-w64 based numpy and scipy wheel (still experimental)

2015-01-26 Thread Sturla Molden
On 26/01/15 16:30, Carl Kleffner wrote: > Thanks for all your ideas. The next version will contain an augumented > libopenblas.dll in both numpy and scipy. On the long term I would > prefer an external openblas wheel package, if there is an agreement > about this among numpy-dev. Thanks for all

Re: [Numpy-discussion] new mingw-w64 based numpy and scipy wheel (still experimental)

2015-01-26 Thread Carl Kleffner
Thanks for all your ideas. The next version will contain an augumented libopenblas.dll in both numpy and scipy. On the long term I would prefer an external openblas wheel package, if there is an agreement about this among numpy-dev. Another idea for the future is to conditionally load a debug ver

[Numpy-discussion] 3D array and the right hand rule

2015-01-26 Thread Dieter Van Eessen
Hello, I'm a novice with respect to scientific computing using python. I've read that numpy.array isn't arranged according to the 'right-hand-rule' (right-hand-rule => thumb = +x; index finger = +y, bend middle finder = +z). This is also confirmed by an old message I dug up from the mailing list a

Re: [Numpy-discussion] Float view of complex array

2015-01-26 Thread Sebastian Berg
On Mo, 2015-01-26 at 02:02 -0800, Jaime Fernández del Río wrote: > On Mon, Jan 26, 2015 at 1:41 AM, Sebastian Berg > wrote: > On Mo, 2015-01-26 at 09:24 +0100, Jens Jørgen Mortensen wrote: > > Hi! > > > > I have a view of a 2-d complex array that I would like to >

Re: [Numpy-discussion] Float view of complex array

2015-01-26 Thread Jaime Fernández del Río
On Mon, Jan 26, 2015 at 1:41 AM, Sebastian Berg wrote: > On Mo, 2015-01-26 at 09:24 +0100, Jens Jørgen Mortensen wrote: > > Hi! > > > > I have a view of a 2-d complex array that I would like to view as a 2-d > > float array. This works OK: > > > > >>> np.ones((2, 4), complex).view(float) > > ar

Re: [Numpy-discussion] Float view of complex array

2015-01-26 Thread Sebastian Berg
On Mo, 2015-01-26 at 09:24 +0100, Jens Jørgen Mortensen wrote: > Hi! > > I have a view of a 2-d complex array that I would like to view as a 2-d > float array. This works OK: > > >>> np.ones((2, 4), complex).view(float) > array([[ 1., 0., 1., 0., 1., 0., 1., 0.], > [ 1., 0., 1

Re: [Numpy-discussion] Float view of complex array

2015-01-26 Thread Maniteja Nandana
Hi Jens, I don't have enough knowledge about the internal memory layout, but the documentation ndarray.view says that: Views that change the dtype size (bytes per entry) should normally be avoided on arrays defined by s

[Numpy-discussion] Float view of complex array

2015-01-26 Thread Jens Jørgen Mortensen
Hi! I have a view of a 2-d complex array that I would like to view as a 2-d float array. This works OK: >>> np.ones((2, 4), complex).view(float) array([[ 1., 0., 1., 0., 1., 0., 1., 0.], [ 1., 0., 1., 0., 1., 0., 1., 0.]]) but this doesn't: >>> np.ones((2, 4), complex)