Re: [Numpy-discussion] Optimize speed of for loop using numpy

2008-02-26 Thread Eric Firing
Trond, See if the attached file contains something close to what you need. It has no loops at all; I have not timed it, but it should be quite quick. I have given it only a cursory check, so I don't guarantee it works correctly. Depending on how your particular NetCDF interface works, you m

Re: [Numpy-discussion] FORTRAN compiler detection

2008-02-26 Thread David Cournapeau
Travis E. Oliphant wrote: > You need to use it in your case because you are linking against lapack > and blas that were built with a Fortran compiler. The Fortran compiler > is only used in the link step of lapack_lite.so > If for some reasons, Christopher does not want to use fortran compil

Re: [Numpy-discussion] #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)

2008-02-26 Thread David Cournapeau
Manos Pontikakis wrote: > Hello, > > I am trying to install numpy 1.0.4 to the following machine: > > $ uname -a > Linux myhostname 2.6.9-55.ELsmp #1 SMP Sat Apr 21 11:16:24 EDT 2007 > x86_64 x86_64 x86_64 GNU/Linux > > > and I am getting the error that appears in the subject of this email. > It

Re: [Numpy-discussion] masked_array/matplotlib issue with memmaps

2008-02-26 Thread Robert Kern
On Tue, Feb 26, 2008 at 5:26 PM, Christopher Burns <[EMAIL PROTECTED]> wrote: > If I initialize an AxesImage using a np.zeros array and then set the > axes data later to a np.memmap array, I get a RuntimeError when > matplotlib tries to autoscale the image. The errors continue to fill > my cons

[Numpy-discussion] masked_array/matplotlib issue with memmaps

2008-02-26 Thread Christopher Burns
If I initialize an AxesImage using a np.zeros array and then set the axes data later to a np.memmap array, I get a RuntimeError when matplotlib tries to autoscale the image. The errors continue to fill my console and I'm forced to close the shell. This bug was introduced when I switched from nump

Re: [Numpy-discussion] FORTRAN compiler detection

2008-02-26 Thread Travis E. Oliphant
Christopher Hanley wrote: > Robert Kern wrote: > >> On Tue, Feb 26, 2008 at 12:09 PM, Christopher Hanley <[EMAIL PROTECTED]> >> wrote: >> >>> Robert Kern wrote: >>> > On Tue, Feb 26, 2008 at 11:50 AM, Christopher Hanley <[EMAIL PROTECTED]> >>> wrote: >>> >> Greetings, >>> >> >>> >> I

Re: [Numpy-discussion] loadtxt broken if file does not end in newline

2008-02-26 Thread Alan G Isaac
On Tue, 26 Feb 2008, Lisandro Dalcin apparently wrote: > I believe the current 'loadtxt' function is broken I agree: http://projects.scipy.org/pipermail/numpy-discussion/2007-November/030057.html> Cheers, Alan Isaac ___ Numpy-discussion mailing list

[Numpy-discussion] loadtxt broken if file does not end in newline

2008-02-26 Thread Lisandro Dalcin
Dear all, I believe the current 'loadtxt' function is broken if file does not end in newline. The problem is at the last line of this fragment: for i,line in enumerate(fh): if ihttp://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Trouble With MaskedArray and Shared Masks

2008-02-26 Thread Pierre GM
Alexander, The rationale behind the current behavior is to avoid an accidental propagation of the mask. Consider the following example: >>>m = numpy.array([1,0,0,1,0], dtype=bool_) >>>x = numpy.array([1,2,3,4,5]) >>>y = numpy.sqrt([5,4,3,2,1]) >>>mx = masked_array(x,mask=m) >>>my = masked_array(y

Re: [Numpy-discussion] FORTRAN compiler detection

2008-02-26 Thread Robert Kern
On Tue, Feb 26, 2008 at 12:46 PM, Christopher Hanley <[EMAIL PROTECTED]> wrote: > Robert Kern wrote: > > On Tue, Feb 26, 2008 at 12:09 PM, Christopher Hanley <[EMAIL PROTECTED]> > wrote: > >> Robert Kern wrote: > >> > On Tue, Feb 26, 2008 at 11:50 AM, Christopher Hanley <[EMAIL > PROTECTED]>

Re: [Numpy-discussion] FORTRAN compiler detection

2008-02-26 Thread Christopher Hanley
Robert Kern wrote: > On Tue, Feb 26, 2008 at 12:09 PM, Christopher Hanley <[EMAIL PROTECTED]> > wrote: >> Robert Kern wrote: >> > On Tue, Feb 26, 2008 at 11:50 AM, Christopher Hanley <[EMAIL PROTECTED]> >> wrote: >> >> Greetings, >> >> >> >> I was wondering if within the last 8 - 10 weeks an

Re: [Numpy-discussion] FORTRAN compiler detection

2008-02-26 Thread Robert Kern
On Tue, Feb 26, 2008 at 12:09 PM, Christopher Hanley <[EMAIL PROTECTED]> wrote: > Robert Kern wrote: > > On Tue, Feb 26, 2008 at 11:50 AM, Christopher Hanley <[EMAIL PROTECTED]> > wrote: > >> Greetings, > >> > >> I was wondering if within the last 8 - 10 weeks anyone has made changes > >> t

Re: [Numpy-discussion] FORTRAN compiler detection

2008-02-26 Thread Christopher Hanley
Robert Kern wrote: > On Tue, Feb 26, 2008 at 11:50 AM, Christopher Hanley <[EMAIL PROTECTED]> > wrote: >> Greetings, >> >> I was wondering if within the last 8 - 10 weeks anyone has made changes >> to the way FORTRAN compilers are detected. In the past I was able to >> specify which compiler w

Re: [Numpy-discussion] FORTRAN compiler detection

2008-02-26 Thread Robert Kern
On Tue, Feb 26, 2008 at 11:50 AM, Christopher Hanley <[EMAIL PROTECTED]> wrote: > Greetings, > > I was wondering if within the last 8 - 10 weeks anyone has made changes > to the way FORTRAN compilers are detected. In the past I was able to > specify which compiler was used by the F77 system var

[Numpy-discussion] FORTRAN compiler detection

2008-02-26 Thread Christopher Hanley
Greetings, I was wondering if within the last 8 - 10 weeks anyone has made changes to the way FORTRAN compilers are detected. In the past I was able to specify which compiler was used by the F77 system variable. However, I am now having a f90 compiler that exists on my Solaris system detected

[Numpy-discussion] #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)

2008-02-26 Thread Manos Pontikakis
Hello, I am trying to install numpy 1.0.4 to the following machine: $ uname -a Linux myhostname 2.6.9-55.ELsmp #1 SMP Sat Apr 21 11:16:24 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux and I am getting the error that appears in the subject of this email. It appears that BLAS and LAPACK libraries canno

Re: [Numpy-discussion] A little help please?

2008-02-26 Thread Travis E. Oliphant
Neal Becker wrote: > My user-defined type project has mostly gone well, but I'm stuck on > mixed-type arithmetic. > > I have 2 types: cmplx_int32 and cmplx_int64. I have added basic arithmetic > for those types, and for mix of those arrays and their respective scalars. > But mixed arithmetic only

[Numpy-discussion] Trouble With MaskedArray and Shared Masks

2008-02-26 Thread Alexander Michael
I'm having trouble with MaskedArray's _sharedmask flag. I would like to create a sub-view of a MaskedArray, fill it, and have the modifications reflected in the original array. This works with regular ndarrays, but only works with MaskedArrays if _sharedmask is set to False. Here's an example: >>>

[Numpy-discussion] A little help please?

2008-02-26 Thread Neal Becker
My user-defined type project has mostly gone well, but I'm stuck on mixed-type arithmetic. I have 2 types: cmplx_int32 and cmplx_int64. I have added basic arithmetic for those types, and for mix of those arrays and their respective scalars. But mixed arithmetic only partly works. In [2]: a Out

Re: [Numpy-discussion] numpy.random.randint() inconsistent with plain random.randint()

2008-02-26 Thread Christopher Kerr
Robert Kern wrote: > On Mon, Feb 25, 2008 at 2:58 PM, Christopher Kerr <[EMAIL PROTECTED]> > wrote: >> I don't know if this is the right place to report bugs, but I couldn't >> find >> anywhere else on the website... >> >> random.randint(min,max) from python core returns an integer between min >

Re: [Numpy-discussion] Optimize speed of for loop using numpy

2008-02-26 Thread Anne Archibald
On 25/02/2008, Trond Kristiansen <[EMAIL PROTECTED]> wrote: > I have attached the function that the FOR loop is part of as a python file. > What I am trying to do is to create a set of functions that will read the > output files (NetCDF) from running the ROMS model (ocean model). The output >