Re: [Numpy-discussion] Beta release on Thursday

2006-07-22 Thread Travis Oliphant
Nick Fotopoulos wrote: On July 17, 2006, at 9:01 PM, Travis Oliphant wrote: I'd like to make release 1.0beta on Thursday. Please submit bug-reports and fixes before then. -Travis Is it possible to incorporate v7 mat-file support before the new-feature freeze? That is in SciPy. I'm

[Numpy-discussion] Stacking matrices

2006-07-22 Thread Tim Hochberg
The recent message by Ferenc.Pintye (how does one pronounce that BTW) reminded me of something I've been meaning to discuss: I think we can do a better job dealing with stacked matrices. By stacked matrices I mean 3 (or more) dimensional arrays where the last two dimensions are considered to

Re: [Numpy-discussion] Beta release on Thursday

2006-07-22 Thread Nick Fotopoulos
On Jul 20, 2006, at 6:00 PM, Travis Oliphant wrote: Is it possible to incorporate v7 mat-file support before the new- feature freeze? That is in SciPy. I'm talking about the NumPy 1.0beta release. But, I would like to get the v7 mat-file support into SciPy soon. Perhaps you are arguing

Re: [Numpy-discussion] NumPy 1.0b1 at the door...

2006-07-22 Thread Travis Oliphant
Stefan van der Walt wrote: Hi Travis Albert and I are busy doing some final beta testing. Quick question: can Fortran-order arrays be contiguous, ever? In [62]: N.empty((3,3),order='F').flags['CONTIGUOUS'] Out[62]: False Thank you very much for the testing. You two have been

Re: [Numpy-discussion] fast way of doing cross-multiplications ?

2006-07-22 Thread Tim Hochberg
Fernando Perez wrote: On 7/18/06, Tim Hochberg [EMAIL PROTECTED] wrote: Eric Emsellem wrote: thanks for the tips. (indeed your add.reduce is correct: I just wrote this down too quickly, in the script I have a sum included). And yes you are right for the memory issue, so I may just keep

Re: [Numpy-discussion] [SciPy-user] Would like to simplify my 3 where statements

2006-07-22 Thread David Grant
On 7/20/06, Michael Sorich [EMAIL PROTECTED] wrote: Can you give an specific example of how this would work? The codes really is ugly and it is not clear to me what exactly it does. ok here's a quick example: import numpy n=5 i=3 j=4 A=numpy.random.randint(0,2,(n,n)) #make random graph

Re: [Numpy-discussion] r_, c_, hstack, and vstack with 1-d arrays

2006-07-22 Thread Bill Baxter
I looked into the various concatenation methods a bit more to better understand what's going on under the hood. Here's essentially what these different methods do: vstack(tup): concatenate( map(atleast_2d,tup), axis=0 ) hstack(tup): concatenate( map(atleast_1d,tup),axis=1 )

[Numpy-discussion] Error when using uints in bincount()

2006-07-22 Thread Stephen Simmons
Hi, The function bincount() counts the number of each value found in the input array: In [15]: numpy.bincount( array([1,3,3,3,4],dtype=int32) ) Out[15]: array([0, 1, 0, 3, 1]) According to the documentation, the input array must be non-negative integers. However an exception occurs when the

[Numpy-discussion] appending/inserting/deleting axes of arrays

2006-07-22 Thread Bill Baxter
Howdy, Is there any nicer syntax for the following operations on arrays? Append a row: a = vstack((a,row)) Append a column: a = hstack((a,col)) Append a row of zeros: a = vstack((a,zeros((1,a.shape[1] Append a col of zeros: a = hstack((a,zeros((a.shape[0],1 Insert a row before row j a

[Numpy-discussion] Possible modification to bincount()

2006-07-22 Thread Stephen Simmons
While playing a little more with bincount(), one modification would be handy: Allow negative integers in the bin list, but skip them when counting bins My specific use case is calculating subtotals on columns of large datasets (1m rows x 30 cols), where some rows need to be excluded. The

[Numpy-discussion] Problem converting a numarray extension to numpy

2006-07-22 Thread Paul Barrett
I'm having a problem converting a C extension module that was originally written for numarray to use numpy. I using swig to create a wrapper flle for the C code. I have added the numpy.get_numarray_include() method to my setup.py file and have changed the numarray/libnumarray.h to use

Re: [Numpy-discussion] [NumPy] #188: dtype should have nice looking str representation

2006-07-22 Thread Sebastian Haase
NumPy wrote: #188: dtype should have nice looking str representation -+-- Reporter: sebhaase |Owner: oliphant Type: enhancement | Status: closed Priority: normal |

[Numpy-discussion] I've created a 1.0b1 release tag in SVN

2006-07-22 Thread Travis Oliphant
I've created the 1.0b1 release tag in SVN and will be uploading files shortly to Sourceforge. I've also created a 1.0 release branch called ver1.0 The trunk is now version 1.1 of NumPy and should be used for new-development only. I don't expect 1.1 to come out for at least a year. Bug-fixes

Re: [Numpy-discussion] r_, c_, hstack, and vstack with 1-d arrays

2006-07-22 Thread Sven Schreiber
Bill Baxter schrieb: Finally, I noticed that the atleast_nd methods return arrays regardless of input type. At a minimum, atleast_1d and atleast_2d on matrices should return matrices. I'm not sure about atleast_3d, since matrices can't be 3d. (But my opinon is that the matrix type should

[Numpy-discussion] Antwort: Re: vector to tensor matrix speed up

2006-07-22 Thread Ferenc . Pintye
Hi Tim, many thanks for the tipps, i used the same way with vectorized (chunk) method on the indexing operation. .. .. # out = zeros((size_mcf[0],sizes_smatrix[2]+5),Float32) # size_mcf[0] ~ 24 eig = zeros((size_mcf[0],3,3),dtype=Float32)

Re: [Numpy-discussion] r_, c_, hstack, and vstack with 1-d arrays

2006-07-22 Thread Bill Baxter
On 7/21/06, Sven Schreiber [EMAIL PROTECTED] wrote: Bill Baxter schrieb: Finally, I noticed that the atleast_nd methods return arrays regardless of input type. Are you sure? I reported that issue with *stack and I remember it was fixed. Doh! My bad. You're right. I was looking at the

[Numpy-discussion] Fresh svn numpy install fails 2 tests (OS X)

2006-07-22 Thread Steve Lianoglou
Hi folks, Since 1.0 release is eminent, I just wanted to draw the attention to two failures I get when I run numpy.test(1). I've never been able to get numpy to pass all test cases, but now it fails a second one, so .. I'm pasting it below. Please let me know if these are

[Numpy-discussion] how add new attribute to a numpy array object ?

2006-07-22 Thread Sebastian Haase
Hi, I have a (medical) image file. I wrote a nice interface based on memmap using numarray. The class design I used was essentially to return a numarray array object with a new custom attribute giving access to special information about the base file. Now with numpy I noticed that a numpy

[Numpy-discussion] bug in numpy recarray ?

2006-07-22 Thread Sebastian Haase
Hi! I'm trying to convert my numarray records code to numpy. type(m.hdrArray) class 'numpy.core.records.recarray' m.hdrArray.d [(array([ 1., 1., 1.], dtype=float32),)] but I get: m.hdrArray[0].getfield('d') 5.43230922614e-312 Am I missing something or is this a bug ? Further details: