Re: [Numpy-discussion] stdint.h

2013-05-23 Thread David Cournapeau
On Thu, May 23, 2013 at 11:44 PM, Chris Barker - NOAA Federal wrote: > On Thu, May 23, 2013 at 1:44 PM, Charles R Harris > wrote: > >> Just seeking some info here. The file stdint.h was part of the C99 standard >> and has types for integers of specified width and thus could be used to >> simplify

Re: [Numpy-discussion] stdint.h

2013-05-23 Thread Chris Barker - NOAA Federal
On Thu, May 23, 2013 at 1:44 PM, Charles R Harris wrote: > Just seeking some info here. The file stdint.h was part of the C99 standard > and has types for integers of specified width and thus could be used to > simplify some of the numpy configuration. I'm curious as to which compilers > might be

Re: [Numpy-discussion] faster (selection based) median, 2013 edition

2013-05-23 Thread Julian Taylor
On 18.05.2013 08:12, Julian Taylor wrote: > hi, > > once again I want to bring up the median algorithm which is implemented > in terms of sorting in numpy. > median (and percentile and a couple more functions) can be more > efficiently implemented in terms of a selection algorithm. The > complexit

[Numpy-discussion] stdint.h

2013-05-23 Thread Charles R Harris
Hi all, Just seeking some info here. The file stdint.h was part of the C99 standard and has types for integers of specified width and thus could be used to simplify some of the numpy configuration. I'm curious as to which compilers might be a problem and what folks think of that possibility. Chuc

Re: [Numpy-discussion] np.dot and 'out' bug

2013-05-23 Thread Sebastian Berg
On Thu, 2013-05-23 at 15:42 +0100, Nathaniel Smith wrote: > On Thu, May 23, 2013 at 3:19 PM, Matthieu Brucher > wrote: > > Hi, > > > > It's to be expected. You are overwritten one of your input vector while it > > is still being used. > > So not a numpy bug ;) > > Sure, that's clearly what's goin

Re: [Numpy-discussion] np.dot and 'out' bug

2013-05-23 Thread Chris Barker - NOAA Federal
On Thu, May 23, 2013 at 7:19 AM, Matthieu Brucher wrote: > It's to be expected. You are overwritten one of your input vector while it > is still being used. > So not a numpy bug ;) It's a doc bug, at least. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/

Re: [Numpy-discussion] np.dot and 'out' bug

2013-05-23 Thread josef . pktd
On Thu, May 23, 2013 at 11:14 AM, Nathaniel Smith wrote: > On Thu, May 23, 2013 at 3:57 PM, Matthieu Brucher > wrote: >> In my point of view, you should never use an output argument equal to an >> input argument. It can impede a lot of optimizations. > > This is a fine philosophy in some cases, b

Re: [Numpy-discussion] np.dot and 'out' bug

2013-05-23 Thread Nicolas Rougier
> Can you file a bug in the bug tracker so this won't get lost? Done. ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] np.dot and 'out' bug

2013-05-23 Thread Nathaniel Smith
On Thu, May 23, 2013 at 3:57 PM, Matthieu Brucher wrote: > In my point of view, you should never use an output argument equal to an > input argument. It can impede a lot of optimizations. This is a fine philosophy in some cases, but a non-starter in others. Python doesn't have optimizations in th

Re: [Numpy-discussion] np.dot and 'out' bug

2013-05-23 Thread Matthieu Brucher
In my point of view, you should never use an output argument equal to an input argument. It can impede a lot of optimizations. Matthieu 2013/5/23 Nicolas Rougier > > > > > Sure, that's clearly what's going on, but numpy shouldn't let you > > silently shoot yourself in the foot like that. Re-us

Re: [Numpy-discussion] np.dot and 'out' bug

2013-05-23 Thread Nicolas Rougier
> > Sure, that's clearly what's going on, but numpy shouldn't let you > silently shoot yourself in the foot like that. Re-using input as > output is a very common operation, and usually supported fine. > Probably we should silently make a copy of any input(s) that overlap > with the output? For h

Re: [Numpy-discussion] np.dot and 'out' bug

2013-05-23 Thread Nathaniel Smith
On Thu, May 23, 2013 at 3:19 PM, Matthieu Brucher wrote: > Hi, > > It's to be expected. You are overwritten one of your input vector while it > is still being used. > So not a numpy bug ;) Sure, that's clearly what's going on, but numpy shouldn't let you silently shoot yourself in the foot like t

Re: [Numpy-discussion] np.dot and 'out' bug

2013-05-23 Thread Matthieu Brucher
Hi, It's to be expected. You are overwritten one of your input vector while it is still being used. So not a numpy bug ;) Matthieu 2013/5/23 Pierre Haessig > Hi Nicolas, > > Le 23/05/2013 15:45, Nicolas Rougier a écrit : > > if I use either a or b as output, results are wrong (and nothing in

Re: [Numpy-discussion] np.dot and 'out' bug

2013-05-23 Thread Pierre Haessig
Hi Nicolas, Le 23/05/2013 15:45, Nicolas Rougier a écrit : > if I use either a or b as output, results are wrong (and nothing in the dot > documentation prevents me from doing this): > > a = np.array([[1, 2], [3, 4]]) > b = np.array([[1, 2], [3, 4]]) > np.dot(a,b,out=a) > > -> array([[ 6, 20], >

[Numpy-discussion] np.dot and 'out' bug

2013-05-23 Thread Nicolas Rougier
Hi, >From the dot documentation, I tried something simple: a = np.array([[1, 2], [3, 4]]) b = np.array([[1, 2], [3, 4]]) np.dot(a, b) -> array([[ 7, 10], [15, 22]]) And I got expected result but if I use either a or b as output, results are wrong (and nothing in the dot documentatio

Re: [Numpy-discussion] pyhdf packaging

2013-05-23 Thread Andreas Hilboll
On 10.05.2013 19:32, Arnaldo Russo wrote: > Hi Andreas, > This packaging would be much useful! > How can I help with this? > pyhdf is very important because HDF4-EOS does not open with another > packages, only with pyhdf and gdal. Hi Arnaldo, I actually went ahead and put the package on my PPA: