Re: [Numpy-discussion] how to tally the values seen

2010-04-13 Thread Gökhan Sever
On Wed, Apr 14, 2010 at 1:34 AM, Warren Weckesser < warren.weckes...@enthought.com> wrote: > Gökhan Sever wrote: > > > > > > On Wed, Apr 14, 2010 at 1:10 AM, Peter Shinners > > wrote: > > > > I have an array that represents the number of times a value has been > >

Re: [Numpy-discussion] how to tally the values seen

2010-04-13 Thread Warren Weckesser
Gökhan Sever wrote: > > > On Wed, Apr 14, 2010 at 1:10 AM, Peter Shinners > wrote: > > I have an array that represents the number of times a value has been > given. I'm trying to find a direct numpy way to add into these sums > without requiring a Python loop.

Re: [Numpy-discussion] how to tally the values seen

2010-04-13 Thread Gökhan Sever
On Wed, Apr 14, 2010 at 1:10 AM, Peter Shinners wrote: > I have an array that represents the number of times a value has been > given. I'm trying to find a direct numpy way to add into these sums > without requiring a Python loop. > > For example, say there are 10 possible values. I start with an

[Numpy-discussion] how to tally the values seen

2010-04-13 Thread Peter Shinners
I have an array that represents the number of times a value has been given. I'm trying to find a direct numpy way to add into these sums without requiring a Python loop. For example, say there are 10 possible values. I start with an array of zeros. >>> counts = numpy.zeros(10, numpy.int) Now

Re: [Numpy-discussion] patch to pickle np.memmap

2010-04-13 Thread Brent Pedersen
On Tue, Apr 13, 2010 at 8:52 PM, Brent Pedersen wrote: > hi, i posted a patch to allow pickling of np.memmap objects. > http://projects.scipy.org/numpy/ticket/1452 > > currently, it always returns 'r' for the mode. > is that the best thing to do there? > any other changes? > -brent > and i guess

[Numpy-discussion] patch to pickle np.memmap

2010-04-13 Thread Brent Pedersen
hi, i posted a patch to allow pickling of np.memmap objects. http://projects.scipy.org/numpy/ticket/1452 currently, it always returns 'r' for the mode. is that the best thing to do there? any other changes? -brent ___ NumPy-Discussion mailing list NumPy-

[Numpy-discussion] binomial coefficient, factorial

2010-04-13 Thread jah
Is there any chance that a binomial coefficent and factorial function can make their way into NumPy? I know these exist in Scipy, but I don't want to have to install SciPy just to have something so "basic". ___ NumPy-Discussion mailing list NumPy-Discuss

Re: [Numpy-discussion] Proposal for new ufunc functionality

2010-04-13 Thread Robert Kern
On Sat, Apr 10, 2010 at 17:59, Robert Kern wrote: > On Sat, Apr 10, 2010 at 12:45, Pauli Virtanen wrote: >> la, 2010-04-10 kello 12:23 -0500, Travis Oliphant kirjoitti: >> [clip] >>> Here are my suggested additions to NumPy: >>> ufunc methods: >> [clip] >>>       * reducein (array, indices, axis=

[Numpy-discussion] SciPy 2010 News: Specialized track deadline extended

2010-04-13 Thread Amenity Applewhite
Have you been meaning to prepare an abstract to submit for a SciPy 2010 specialized track (http://conference.scipy.org/scipy2010/papers.html#tracks )? Didn't find the time? Well you're in luck. This weekend, we had technical issues with the email submissions for the specialized tracks. In light

Re: [Numpy-discussion] Proposal for new ufunc functionality

2010-04-13 Thread josef . pktd
On Tue, Apr 13, 2010 at 10:03 AM, Travis Oliphant wrote: > > On Apr 12, 2010, at 5:31 PM, Robert Kern wrote: > > We should collect all of these proposals into a NEP.      To clarify what I > > mean by "group-by" behavior. > > Suppose I have an array of floats and an array of integers.   Each eleme

Re: [Numpy-discussion] Proposal for new ufunc functionality

2010-04-13 Thread Travis Oliphant
On Apr 12, 2010, at 5:54 PM, Warren Weckesser wrote: A bit more generalization of `by` gives behavior like matlab's accumarray (http://www.mathworks.com/access/helpdesk/help/techdoc/ref/accumarray.html ), which I partly cloned here: [This would be a link to the scipy cookbook, but scipy.org

Re: [Numpy-discussion] Proposal for new ufunc functionality

2010-04-13 Thread Travis Oliphant
On Apr 12, 2010, at 5:31 PM, Robert Kern wrote: We should collect all of these proposals into a NEP. To clarify what I mean by "group-by" behavior. Suppose I have an array of floats and an array of integers. Each element in the array of integers represents a region in the float arra

[Numpy-discussion] [ANN] toydist version 0.0.2

2010-04-13 Thread David Cournapeau
Hi, I am glad to announce the first release of toydist, the 0.0.2 release: http://github.com/cournape/toydist/downloads Toydist is a pythonic, no-nonsense packaging solution for python softwares. The main highlights of this first public release are: * Package description grammar

Re: [Numpy-discussion] indexing to sort with argsort(..., axis=1)

2010-04-13 Thread Angus McMorland
On 13 April 2010 04:01, Gökhan Sever wrote: > > > On Mon, Apr 12, 2010 at 9:41 PM, Angus McMorland wrote: > >> Hi all, >> >> I want to sort a 2d array along one dimension, with the indices returned >> by argsort, but the subsequent indexing syntax to get the sorted array is >> not obvious. >> >> T