Re: [Numpy-discussion] ANN: NumPy 1.5.0 beta 1

2010-08-02 Thread Erik Tollerud
work without problems. > > Enjoy, > Ralf > > > ___ > NumPy-Discussion mailing list > NumPy-Discussion@scipy.org > http://mail.scipy.org/mailman/listinfo/numpy-discussion > > -- Erik Tollerud ___ NumPy-Discuss

Re: [Numpy-discussion] newbie: convert recarray to floating-point ndarray with mixed types

2010-05-16 Thread Erik Tollerud
> import numpy as np > a = np.array([(1.0, 2), (3.0, 4)], dtype=[('x', float), ('y', int)]) > b = np.empty((a.shape[0], 2), dtype=np.float) > b[:,0] = a['x'] > b[:,1] = a['y'] > > Eric > > > >> thanks, matt > ___ > NumPy-Discussion mailing list > NumPy-Discussion@scipy.org > http://mail.scipy.org/mailman/listinfo/numpy-discussion > -- Erik Tollerud http://ps.uci.edu/~etolleru ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] How do I ensure numpy headers are present in setup.py?

2010-04-05 Thread Erik Tollerud
Hmm, unfortunate. So the best approach then is probably just to tell people to install numpy first, then my package? On Fri, Apr 2, 2010 at 12:06 PM, Robert Kern wrote: > On Fri, Apr 2, 2010 at 13:03, Erik Tollerud wrote: >> I am writing a setup.py file for a package that will use cy

[Numpy-discussion] How do I ensure numpy headers are present in setup.py?

2010-04-02 Thread Erik Tollerud
I am writing a setup.py file for a package that will use cython with numpy integration. This of course requires the numpy header files, which I am including by using numpy.get_includes in the setup.py file below. The problem is for users that have not installed numpy before installing this packag

Re: [Numpy-discussion] python reduce vs numpy reduce for outer product

2009-09-26 Thread Erik Tollerud
> I'm sure you mean np.multiply.reduce(). Yes, sorry - typo. >> Or, if there's a better way to just start with the first 3 1d >> vectorsand jump straight to the broadcast product (basically, an outer >> product over arbitrary number of dimensions...)? > > Well, numpy doesn't support arbitrary numb

[Numpy-discussion] python reduce vs numpy reduce for outer product

2009-09-26 Thread Erik Tollerud
I'm encountering behavior that I think makes sense, but I'm not sure if there's some numpy function I'm unaware of that might speed up this operation. I have a (potentially very long) sequence of vectors, but for examples' sake, I'll stick with three: [A,B,C] with lengths na,nb, and nc. To get th

Re: [Numpy-discussion] Fwd: GPU Numpy

2009-08-20 Thread Erik Tollerud
I realize this topic is a bit old, but I couldn't help but add something I forgot to mention earlier... >> I mean, once the computations are moved elsewhere numpy is basically a >> convenient way to address memory. > > That is how I mostly use NumPy, though. Computations I often do in > Fortran 95

Re: [Numpy-discussion] Fwd: GPU Numpy

2009-08-06 Thread Erik Tollerud
Note that this is from a "user" perspective, as I have no particular plan of developing the details of this implementation, but I've thought for a long time that GPU support could be great for numpy (I would also vote for OpenCL support over cuda, although conceptually they seem quite similar)... B

[Numpy-discussion] Structured array inititialization weirdness

2009-06-20 Thread Erik Tollerud
I've encountered an odd error I don't understand (see the case below): the first structured array ("A" in the example) initializes from a list of length-2 arrays with no problem, but if I give it a 2-by-2 array ("B"), it raises a TypeError... Why would it be any different to convert the first index

[Numpy-discussion] Py3k and numpy

2008-12-04 Thread Erik Tollerud
I noticed that the Python 3000 final was released today... is there any sense of how long it will take to get numpy working under 3k? I would imagine it'll be a lot to adapt given the low-level change, but is the work already in progress? ___ Numpy-discu

[Numpy-discussion] numpy array change notifier?

2008-10-27 Thread Erik Tollerud
Is there any straightforward way of notifying on change of a numpy array that leaves the numpy arrays still efficient? That is, I would like to do the following: class C: def __init__(self,arr): self.arr = arr #what code do put here? def notify(self): print 'do