Re: [Numpy-discussion] Finding Unique Pixel Values

2010-07-23 Thread Jon Wright
Ian Mallett wrote: To the second, actually, I need to increment the number of times the index is there. For example, if b=[1,5,6,6,6,9], then a[6-1] would have to be incremented by +3 = +1+1+1. I tried simply a[b-1]+=1, but it seems to only increment values once, even if there are more

[Numpy-discussion] Control format for array of integers

2010-07-23 Thread John Reid
Hi, My array of integers is printed like this by default in numpy: array([[ 4.7500e+02, 9.5000e+02, -1.e+00], [ 2.6090e+03, 9.5000e+02, -7.0900e+02]]) Can I set an option so that numpy never uses this scientific notation or raise the threshold at

Re: [Numpy-discussion] Control format for array of integers

2010-07-23 Thread Ian Mallett
How about numpy.set_printoptions(suppress=True)? See http://docs.scipy.org/doc/numpy/reference/generated/numpy.set_printoptions.html . HTH, Ian ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org

Re: [Numpy-discussion] Arrays of Python Values

2010-07-23 Thread Pauli Virtanen
Fri, 23 Jul 2010 01:16:41 -0700, Ian Mallett wrote: [clip] Because I've never used arrays of Python objects (and Googling didn't turn up any examples), I'm stuck on how to sort the corresponding array in NumPy in the same way. I doubt you will gain any speed by switching from Python lists to

Re: [Numpy-discussion] Arrays of Python Values

2010-07-23 Thread Hans Meine
On Friday 23 July 2010 10:16:41 Ian Mallett wrote: self.patches.sort( lambda x,y:cmp(x.residual_radiance,y.residual_radiance), reverse=True ) Using sort(key = lambda x: x.residual_radiance) should be faster. Because I've never used arrays of Python objects (and Googling didn't turn up any

[Numpy-discussion] Audiolab 0.11.0

2010-07-23 Thread David Cournapeau
Hi, I am pleased to announce the 0.11.0 release of audiolab scikits, the package to read/write audio file formats into numpy. This release has barely no changes compared to 0.10.x series, but it finally fixes annoying windows issues (which ended up being mingw bugs). Source tarball and python

Re: [Numpy-discussion] subtract.reduce behavior

2010-07-23 Thread Alan G Isaac
On 7/22/2010 4:00 PM, Johann Hibschman wrote: I'm trying to understand numpy.subtract.reduce. The documentation doesn't seem to match the behavior. The documentation claims For a one-dimensional array, reduce produces results equivalent to: r = op.identity for i in

Re: [Numpy-discussion] subtract.reduce behavior

2010-07-23 Thread Pauli Virtanen
Fri, 23 Jul 2010 10:29:47 -0400, Alan G Isaac wrote: [clip] np.subtract.reduce([]) 0.0 Getting a right identity for an empty array is surprising. Matching Python's behavior (raising a TypeError) seems desirable. (?) I don't think matching Python's behavior is a sufficient

[Numpy-discussion] Numpy installation problem

2010-07-23 Thread Jonathan Tu
Hi,I am trying to install Numpy on a Linux cluster running RHEL4. I installed a local copy of Python 2.7 because RHEL4 uses Python 2.3.4 for various internal functionalities. I downloaded the Numpy source code usingsvn co http://svn.scipy.org/svn/numpy/trunk numpyand then I tried to build

Re: [Numpy-discussion] subtract.reduce behavior

2010-07-23 Thread Alan G Isaac
Fri, 23 Jul 2010 10:29:47 -0400, Alan G Isaac wrote: np.subtract.reduce([]) 0.0 Getting a right identity for an empty array is surprising. Matching Python's behavior (raising a TypeError) seems desirable. (?) On 7/23/2010 10:37 AM, Pauli Virtanen wrote: I don't

Re: [Numpy-discussion] subtract.reduce behavior

2010-07-23 Thread Pauli Virtanen
Fri, 23 Jul 2010 11:17:56 -0400, Alan G Isaac wrote: [clip] I also do not understand why there would have to be any special cases. That's a technical issue: e.g. prod() is implemented via np.multiply.reduce, and it is not clear to me whether it is possible, in the ufunc machinery, to leave the

[Numpy-discussion] reviewers needed for NumPy

2010-07-23 Thread Joe Harrington
Hi folks, We are (finally) about to begin reviewing and proofing the NumPy docstrings! This is the final step in producing professional-level docs for NumPy. What we need now are people willing to review docs. There are two types of reviewers: Technical reviewers should be developers or

Re: [Numpy-discussion] Numpy 1.4.1 fails to build on (Debian) alpha and powepc

2010-07-23 Thread Sandro Tosi
Hi David others, On Tue, Jul 20, 2010 at 19:09, David Cournapeau courn...@gmail.com wrote: On Tue, Jul 20, 2010 at 4:21 PM, Sandro Tosi mo...@debian.org wrote: Hi David, On Tue, Jul 20, 2010 at 10:34, David Cournapeau courn...@gmail.com wrote: yes, I see it at r8510 I quickly adapted the

[Numpy-discussion] Datarray bug tracker

2010-07-23 Thread Keith Goodman
Report datarray bugs here: http://github.com/fperez/datarray/issues A datarray is a subclass of a Numpy array that adds the ability to label the axes and to label the elements along each axis. ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org