Re: [Numpy-discussion] building numpy 1.6.2 on OSX 10.6 / Python2.7.3

2012-08-08 Thread Andrew Nelson
> > > Message: 1 > Date: Wed, 8 Aug 2012 08:43:18 +0100 > From: David Cournapeau > Subject: Re: [Numpy-discussion] building numpy 1.6.2 on OSX 10.6 / > Python2.7.3 > To: Discussion of Numerical Python > Message-ID: > < > cagy4rcw4b9krqxbibyejew8dzrjwbxcgv4ydzibpwcg2zvh...@mail.gma

Re: [Numpy-discussion] Is there a more efficient way to do this?

2012-08-08 Thread Laszlo Nagy
> > In [4]: timeit get_slices_slow(data) > 100 loops, best of 3: 3.51 ms per loop > > In [5]: timeit get_slices_fast(data) > 1000 loops, best of 3: 1.76 ms per loop > > In [6]: timeit get_slices_faster(data) > 1 loops, best of 3: 116 us per loop > > So using the fast bincount and array indexin

[Numpy-discussion] possible bug in assignment to complex array

2012-08-08 Thread Mark Bakker
Dear List, I think there is a problem with assigning a 1D complex array of length one to a position in another complex array. Example: a = ones(1,'D') b = ones(1,'D') a[0] = b --- TypeError Tr

Re: [Numpy-discussion] Licensing question

2012-08-08 Thread Matt Terry
> Nice, I am starting to get out of touch with too many packages... > Would be nice to add DCT and DST support to it. FWIW, the DCT has been in scipy.fftpack for a while and DST was just added. ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org

Re: [Numpy-discussion] Is there a more efficient way to do this?

2012-08-08 Thread Brett Olsen
On Wed, Aug 8, 2012 at 9:19 AM, Laszlo Nagy wrote: > Is there a more efficient way to calculate the "slices" array below? > > I do not want to make copies of DATA, because it can be huge. The > argsort is fast enough. I just need to create slices for different > dimensions. The above code works, b

Re: [Numpy-discussion] building numpy 1.6.2 on OSX 10.6 / Python2.7.3

2012-08-08 Thread Aron Ahmadia
FWIW, on my OS X.6.8 system, using a brew-installed python, and installing into /usr/local/lib, the symbols appear to be present: ❯ nm /usr/local/lib/python2.7/site-packages/numpy/core/multiarray.so | grep ceil U _ceil U _ceilf U _ceill 00

Re: [Numpy-discussion] building numpy 1.6.2 on OSX 10.6 / Python2.7.3

2012-08-08 Thread Aron Ahmadia
> > `python setup.py install --user` should install bumpy in a ~/.local > directory, you'll just have to update your PYTHONPATH > As of Python 2.6/3.x, ~/.local is searched after is added before the system site directories but after Python's search paths and PYTHONPATH. See PEP 370 for more detail

[Numpy-discussion] Is there a more efficient way to do this?

2012-08-08 Thread Laszlo Nagy
Is there a more efficient way to calculate the "slices" array below? import numpy import numpy.random # In reality, this is between 1 and 50. DIMENSIONS = 20 # In my real app, I have 100...1M data rows. ROWS = 1000 DATA = numpy.random.random_integers(0,100,(ROWS,DIMENSIONS)) # This is between 0

[Numpy-discussion] nested loops too slow

2012-08-08 Thread nicolas aunai
Hi, I'm trying to write a code for doing a 2D integral. It works well when I'm doing it with normal "for" loops, but requires two nested loops, and is much too slow for my application. I would like to know if it is possible to do it faster, for example with fancy indexing and the use of numpy.cums

[Numpy-discussion] Bug in as_strided/reshape

2012-08-08 Thread Dave Hirschfeld
It seems that reshape doesn't work correctly on an array which has been resized using the 0-stride trick e.g. In [73]: x = array([5]) In [74]: y = as_strided(x, shape=(10,), strides=(0,)) In [75]: y Out[75]: array([5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) In [76]: y.reshape([10,1]) Out[76]: array([[

Re: [Numpy-discussion] Licensing question

2012-08-08 Thread David Cournapeau
On Wed, Aug 8, 2012 at 10:53 AM, Robert Kern wrote: > On Wed, Aug 8, 2012 at 10:34 AM, David Cournapeau wrote: >> On Wed, Aug 8, 2012 at 12:55 AM, Nathaniel Smith wrote: >>> On Mon, Aug 6, 2012 at 8:31 PM, Robert Kern wrote: Those are not the original Fortran sources. The original Fortran

Re: [Numpy-discussion] Licensing question

2012-08-08 Thread Robert Kern
On Wed, Aug 8, 2012 at 10:34 AM, David Cournapeau wrote: > On Wed, Aug 8, 2012 at 12:55 AM, Nathaniel Smith wrote: >> On Mon, Aug 6, 2012 at 8:31 PM, Robert Kern wrote: >>> Those are not the original Fortran sources. The original Fortran sources are >>> in the public domain as work done by a US

Re: [Numpy-discussion] Licensing question

2012-08-08 Thread David Cournapeau
On Wed, Aug 8, 2012 at 12:55 AM, Nathaniel Smith wrote: > On Mon, Aug 6, 2012 at 8:31 PM, Robert Kern wrote: >> Those are not the original Fortran sources. The original Fortran sources are >> in the public domain as work done by a US federal employee. >> >> http://www.netlib.org/fftpack/ >> >> Ne

Re: [Numpy-discussion] Licensing question

2012-08-08 Thread Damon McDougall
On Wed, Aug 08, 2012 at 12:55:32AM +0100, Nathaniel Smith wrote: > On Mon, Aug 6, 2012 at 8:31 PM, Robert Kern wrote: > > Those are not the original Fortran sources. The original Fortran sources are > > in the public domain as work done by a US federal employee. > > > > http://www.netlib.org/fftpa

Re: [Numpy-discussion] building numpy 1.6.2 on OSX 10.6 / Python2.7.3

2012-08-08 Thread David Cournapeau
On Wed, Aug 8, 2012 at 6:15 AM, Andrew Nelson wrote: > Dear Pierre, > as indicated yesterday OSX system python is in: > > /System/Library/Frameworks/Python.framework/ > > I am installing into: > > /Library/Frameworks/Python.framework/Versions/Current/lib/python2.7/site-packages > > This should not