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
> 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
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
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
> 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
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
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
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
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
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
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
11 matches
Mail list logo