On 07/12/2010 12:36 PM, David Goldsmith wrote:
On Sun, Jul 11, 2010 at 6:18 PM, David Goldsmith
d.l.goldsm...@gmail.com mailto:d.l.goldsm...@gmail.com wrote:
In numpy.fft we find the following:
Then A[1:n/2] contains the positive-frequency terms, and A[n/2+1:]
contains the
Hi All!
def height_diffs():
h = []
i = 0
while True:
x = raw_input(Enter height difference )
if x == 'q':
break
else:
h.append(x)
i = i + 1
m = asarray(h,dtype=float)
return m
why does return statement return
On Sun, Jul 11, 2010 at 11:59:30AM +, Neil Crighton wrote:
What is a use case for the new array type that can't be solved by
structured/record arrays? Sounds like it was decided at the Sciy
BOF they were a good idea, several people have implemented a
version of them and Fernando and Gael
On 12 July 2010 11:45, allan oware lumte...@gmail.com wrote:
Hi All!
def height_diffs():
h = []
i = 0
while True:
x = raw_input(Enter height difference )
if x == 'q':
break
else:
h.append(x)
i = i + 1
m =
Gael Varoquaux gael.varoquaux at normalesup.org writes:
Let say that you have a dataset that is in a 3D array, where axis 0
corresponds to days, axis 1 to hours of the day, and axis 2 to
temperature, you might want to have the mean of the temperature in each
day, which would be in current
Le lundi 12 juillet 2010 à 18:14 +1000, Jochen Schröder a écrit :
On 07/12/2010 12:36 PM, David Goldsmith wrote:
On Sun, Jul 11, 2010 at 6:18 PM, David Goldsmith
d.l.goldsm...@gmail.com mailto:d.l.goldsm...@gmail.com wrote:
In numpy.fft we find the following:
Then A[1:n/2]
On Mon, Jul 12, 2010 at 8:04 AM, Neil Crighton neilcrigh...@gmail.com wrote:
Gael Varoquaux gael.varoquaux at normalesup.org writes:
I do such manipulation all the time, and keeping track of which axis is
what is fairly tedious and error prone. It would be much nicer to be able
to write:
On Mon, Jul 12, 2010 at 01:04:55PM +, Neil Crighton wrote:
Thanks, that's a really nice description. Instead of
data.ax_day.mean(axis=0)
I think it would be clearer to do something like
data.mean(axis='day')
Yes, that's even better. The problem is that it does not extend to
operations
Thanks, both.
On Mon, Jul 12, 2010 at 5:39 AM, Fabrice Silva si...@lma.cnrs-mrs.frwrote:
Le lundi 12 juillet 2010 à 18:14 +1000, Jochen Schröder a écrit :
On 07/12/2010 12:36 PM, David Goldsmith wrote:
On Sun, Jul 11, 2010 at 6:18 PM, David Goldsmith
d.l.goldsm...@gmail.com
This one was quite a bear to track down, starting from the of course
very high level observation of why is my application leaking memory.
I've reproduced it on Windows XP using NumPy 1.3.0 on Python 2.5 and
1.4.1 on Python 2.6 (EPD). Basically it seems that calling
.astype(bool) on an ndarray
Dear numpy hackers,
I can't find the syntax for unpacking the 3 dimensions of a rgb array.
so i have a MxNx3 image array 'img' and would like to do:
red, green, blue = img[magical_slicing]
Which slicing magic do I need to apply?
Thanks for your help!
BR,
Michael
On 12 July 2010 13:24, K.-Michael Aye kmichael@gmail.com wrote:
Dear numpy hackers,
I can't find the syntax for unpacking the 3 dimensions of a rgb array.
so i have a MxNx3 image array 'img' and would like to do:
red, green, blue = img[magical_slicing]
Which slicing magic do I need to
On Mon, Jul 12, 2010 at 2:22 PM, Wes McKinney wesmck...@gmail.com wrote:
This one was quite a bear to track down, starting from the of course
very high level observation of why is my application leaking memory.
I've reproduced it on Windows XP using NumPy 1.3.0 on Python 2.5 and
1.4.1 on
This memory leak may be related: http://projects.scipy.org/numpy/ticket/1542
It shows what appears to be a memory leak when calling astype('float')
on an array of dtype 'object'.
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
On Mon, Jul 12, 2010 at 3:39 PM, Nathaniel Peterson
nathanielpeterso...@gmail.com wrote:
This memory leak may be related: http://projects.scipy.org/numpy/ticket/1542
It shows what appears to be a memory leak when calling astype('float')
on an array of dtype 'object'.
From the docstring:
A[0] contains the zero-frequency term (the mean of the signal)
And yet, consistent w/ the definition given in the docstring (and included
w/ an earlier email), the code gives, e.g.:
import numpy as np
x = np.ones((16,)); x
array([ 1., 1., 1., 1., 1., 1., 1., 1.,
Rob Speer rspeer at MIT.EDU writes:
It's not just about the rows: a 2-D datarray can also index by
columns, an operation that has no equivalent in a 1-D array of records
like your example.
rec['305'] effectively indexes by column. This is one the main attractions of
structured/record arrays.
On 07/12/2010 11:43 AM, David Goldsmith wrote:
From the docstring:
A[0] contains the zero-frequency term (the mean of the signal)
And yet, consistent w/ the definition given in the docstring (and
included w/ an earlier email), the code gives, e.g.:
import numpy as np
x =
On Mon, Jul 12, 2010 at 3:04 PM, Eric Firing efir...@hawaii.edu wrote:
On 07/12/2010 11:43 AM, David Goldsmith wrote:
From the docstring:
A[0] contains the zero-frequency term (the mean of the signal)
And yet, consistent w/ the definition given in the docstring (and
included w/ an
rec['305'] extracts a single value from a single record.
arr.named[:,305] extracts an *entire column* from a 2-D datarray,
returning you a 1-D datarray.
Once again, 1-D record arrays and 2-D labeled arrays look similar when
you print them, but the data structures are so unrelated that there is
Wes McKinney wesmck...@gmail.com writes:
Did you mean to post a different link? That's the ticket I just created :)
How silly of me! I meant http://projects.scipy.org/numpy/ticket/1427
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
In light of my various questions and the responses thereto, here's what I've
done (but not yet committed) to numpy.fft.
There are many ways to define the DFT, varying in the sign of the
exponent, normalization, etc. In this implementation, the DFT is defined
as
.. math::
A_k =
On Mon, Jul 12, 2010 at 17:30, Rob Speer rsp...@mit.edu wrote:
rec['305'] extracts a single value from a single record.
No, in Neil's example `rec` was a structured array. You can index
structured arrays using the names of the record members, not just
scalars.
arr.named[:,305] extracts an
On Jul 12, 2010, at 5:47 PM, David Goldsmith wrote:
In light of my various questions and the responses thereto, here's what I've
done (but not yet committed) to numpy.fft.
There are many ways to define the DFT, varying in the sign of the
exponent, normalization, etc. In this
On 13/07/10 08:04, Eric Firing wrote:
On 07/12/2010 11:43 AM, David Goldsmith wrote:
From the docstring:
A[0] contains the zero-frequency term (the mean of the signal)
And yet, consistent w/ the definition given in the docstring (and
included w/ an earlier email), the code gives, e.g.:
On Mon, Jul 12, 2010 at 6:33 PM, Travis Oliphant oliph...@enthought.comwrote:
On Jul 12, 2010, at 5:47 PM, David Goldsmith wrote:
In light of my various questions and the responses thereto, here's what
I've done (but not yet committed) to numpy.fft.
There are many ways to define the
On 13/07/10 08:47, David Goldsmith wrote:
In light of my various questions and the responses thereto, here's what
I've done (but not yet committed) to numpy.fft.
There are many ways to define the DFT, varying in the sign of the
exponent, normalization, etc. In this implementation, the DFT is
I have two vectors of integers of not necessarily the same length.
Consider the hypothetical function match (or if you are familiar to R
then consider that function).
match(v1, v2) = returns a boolean array of length len(v1) indicating
whether element i in v1 is in v2.
I cannot find this
match(v1, v2) = returns a boolean array of length len(v1) indicating
whether element i in v1 is in v2.
You want numpy.in1d (and friends, probably, like numpy.unique and the
others that are all collected in numpy.lib.arraysetops...)
Definition: numpy.in1d(ar1, ar2, assume_unique=False)
2010/7/12 Jochen Schröder cycoma...@gmail.com
On 13/07/10 08:04, Eric Firing wrote:
On 07/12/2010 11:43 AM, David Goldsmith wrote:
From the docstring:
A[0] contains the zero-frequency term (the mean of the signal)
And yet, consistent w/ the definition given in the docstring (and
2010/7/12 Jochen Schröder cycoma...@gmail.com
On 13/07/10 08:47, David Goldsmith wrote:
In light of my various questions and the responses thereto, here's what
I've done (but not yet committed) to numpy.fft.
There are many ways to define the DFT, varying in the sign of the
exponent,
There has been some discussion on FFTPACK lately. Problems with FFTPACK
seems to be:
- Written in old Fortran 77.
- Unprecise for single precision.
- Can sometimes be very slow, depending on input size.
- Can only handle a few small prime factors {2,3,4,5} efficiently.
- How to control integer
32 matches
Mail list logo