Re: [Numpy-discussion] NOOB Alert: Looping Through Text Files...

2011-01-16 Thread Jochen Schröder
to the numpy python module, the next time you might want to post a question like this to one of the python beginners lists. This link might get you started: http://wiki.python.org/moin/BeginnersGuide Cheers Jochen From a responses to a previous post, this seems as if it may have something to do

Re: [Numpy-discussion] Another reality check

2010-07-12 Thread Jochen Schröder
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

Re: [Numpy-discussion] numpy.fft, yet again

2010-07-12 Thread Jochen Schröder
by sqrt(len(x)). And some fft implementations don't do normalizations at all (FFTW). Cheers Jochen DG ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Here's what I've done to numpy.fft

2010-07-12 Thread Jochen Schröder
confusing. I'd also suggest pointing to fftshift for converting the standard order to order min frequency to max frequency Cheers Jochen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy

Re: [Numpy-discussion] Request for testing

2010-02-21 Thread Jochen Schroeder
No Warning for me: └─(08:26 $)─ python isinf.py True └─(08:26 $)─ python2.5 isinf.py True Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55) [GCC 4.4.1] on linux2 Python 2.5.4 (r254:67916, Jan 20 2010, 21:43:02) [GCC 4.4.1] on linux2 numpy.version.version '1.3.0' └─(08:33 $)─ uname -a

Re: [Numpy-discussion] Assigning complex values to a real array

2009-12-08 Thread Jochen Schroeder
is actually relying on the implicit downcast, but I'd argue that it's bad programming anyways. It is really difficult to spot if you reviewing someone else's code. As others mentioned it's also a bitch to track down a bug that has been accidentally introduced by this behaviour. Jochen

Re: [Numpy-discussion] strange sin/cos performance

2009-08-04 Thread Jochen
In [54]: %timeit -n 10 np.sin(d) 10 loops, best of 3: 87.7 µs per loop In [55]: %timeit -n 10 np.sin(c.astype(np.float64)).astype(np.float32) 10 loops, best of 3: 891 µs per loop Cheers Jochen On Mon, 3 Aug 2009 15:45:56 +0200 Emmanuelle Gouillart emmanuelle.gouill...@normalesup.org wrote

Re: [Numpy-discussion] Interactive Shell/Editor/Workspace(variables)View/Plots

2009-06-08 Thread Jochen Schroeder
). The website looks like development has been stale, but if you look at svn there've been commits lately. Cheers Jochen Gaël ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] view takes no keyword arguments exception

2009-05-20 Thread Jochen Schroeder
TypeError: view() takes no keyword arguments I he's on Windows and sees this error both with numpy 1.1.1 and 1.3. I'm a bit lost anybody have an idea what could be the problem? Cheers Jochen ___ Numpy-discussion mailing list Numpy

Re: [Numpy-discussion] view takes no keyword arguments exception

2009-05-20 Thread Jochen Schroeder
On 21/05/09 00:20, Stéfan van der Walt wrote: Hi Jochen 2009/5/20 Jochen Schroeder cycoma...@gmail.com: I'm trying to help someone out with some problems with pyfftw (pyfftw.berlios.de). He is seeing an exception, TypeError: view() takes no keyword arguments This doesn't only

Re: [Numpy-discussion] Construct a large n-dimensional complex matrix

2009-04-07 Thread Jochen Schroeder
= np.empty((n,m), dtype=complex) C.real.flat[:] = real_values C.imag.flat[:] = imag_values Just a question, is there any advantage to doing C = 1.j *imag_values + real_values ? Cheers Jochen -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma

Re: [Numpy-discussion] Optical autocorrelation calculated with numpy is slow

2009-03-31 Thread Jochen S
On Tue, Mar 31, 2009 at 8:54 PM, Jochen S cycoma...@gmail.com wrote: On Tue, Mar 31, 2009 at 7:13 AM, João Luís Silva jsi...@fc.up.pt wrote: Hi, I wrote a script to calculate the *optical* autocorrelation of an electric field. It's like the autocorrelation, but sums the fields instead

Re: [Numpy-discussion] numpy.ctypeslib.ndpointer and the restype attribute

2009-03-23 Thread Jochen Schroeder
. Cheers Jochen ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] numpy ndarray questions

2009-01-27 Thread Jochen
On Tue, 2009-01-27 at 12:37 +0100, Sturla Molden wrote: On 1/27/2009 1:26 AM, Jochen wrote: a = fftw3.AlignedArray(1024,complex) a = a+1 = used this way is not assignment, it is name binding. It is easy to use function's like fftw_malloc with NumPy: import ctypes import numpy

Re: [Numpy-discussion] numpy ndarray questions

2009-01-27 Thread Jochen
On Tue, 2009-01-27 at 14:16 +0100, Sturla Molden wrote: On 1/27/2009 12:37 PM, Sturla Molden wrote: import ctypes import numpy fftw_malloc = ctypes.cdll.fftw.fftw_malloc fftw_malloc.argtypes = [ctypes.c_ulong,] fftw_malloc.restype = ctypes.c_ulong def aligned_array(N, dtype):

[Numpy-discussion] numpy ndarray questions

2009-01-26 Thread Jochen
in a TypeError: TypeError: default __new__ takes no parameters Am I correct in assuming that the documentation is incorrect and ndpointer can only be used for argtypes? Or am I missing something? Cheers Jochen ___ Numpy-discussion mailing list Numpy-discussion

Re: [Numpy-discussion] numpy ndarray questions

2009-01-26 Thread Jochen
On Mon, 2009-01-26 at 19:25 -0600, Ryan May wrote: Jochen wrote: Hi all, I just wrote ctypes bindings to fftw3 (see http://projects.scipy.org/pipermail/scipy-user/2009-January/019557.html for the post to scipy). Now I have a couple of numpy related questions: In order

Re: [Numpy-discussion] numpy ndarray questions

2009-01-26 Thread Jochen
On Tue, 2009-01-27 at 13:28 +0900, David Cournapeau wrote: Jochen wrote: On Tue, 2009-01-27 at 12:49 +0900, David Cournapeau wrote: Jochen wrote: Hi all, I just wrote ctypes bindings to fftw3 (see http://projects.scipy.org/pipermail/scipy-user/2009-January/019557.html

Re: [Numpy-discussion] numpy ndarray questions

2009-01-26 Thread Jochen
On Tue, 2009-01-27 at 13:54 +0900, David Cournapeau wrote: Jochen wrote: On Tue, 2009-01-27 at 13:28 +0900, David Cournapeau wrote: Jochen wrote: On Tue, 2009-01-27 at 12:49 +0900, David Cournapeau wrote: Jochen wrote: Hi all, I just wrote

Re: [Numpy-discussion] numpy ndarray questions

2009-01-26 Thread Jochen
On Tue, 2009-01-27 at 14:46 +0900, David Cournapeau wrote: Jochen wrote: On Tue, 2009-01-27 at 13:54 +0900, David Cournapeau wrote: Jochen wrote: On Tue, 2009-01-27 at 13:28 +0900, David Cournapeau wrote: Jochen wrote: On Tue, 2009-01-27 at 12