Re: [Numpy-discussion] Simple question about scatter plot graph

2012-10-31 Thread Jonathan Hilmer
Obviously there are some real patterns there, but when interpreting low-resolution plots visually, be careful of Moire effects: view the following image at multiple zoom levels as an example. http://upload.wikimedia.org/wikipedia/commons/4/42/Divers_-_Illustrated_London_News_Feb_6_1873-2.PNG My ow

Re: [Numpy-discussion] Creating parallel curves

2012-02-12 Thread Jonathan Hilmer
Andrea, I realized that my answer wouldn't be complete, but as people have pointed out that's a substantially more difficult question, so I wanted to give you a complete answer to just a subset of your problem. I'm currently writing a variant that avoids the overlapping normal vectors by interati

Re: [Numpy-discussion] Creating parallel curves

2012-02-12 Thread Jonathan Hilmer
Andrea, Here is how to do it with splines. I would be more standard to return an array of normals, rather than two arrays of x and y components, but it actually requires less housekeeping this way. As an aside, I would prefer to work with rotations via matrices, but it looks like there's no supp

Re: [Numpy-discussion] convolving (or correlating) with sliding windows

2011-02-15 Thread Jonathan Hilmer
I'm sorry that I don't have some example code for you, but you probably need to break down the problem if you can't fit it into memory: http://en.wikipedia.org/wiki/Overlap-add_method Jonathan On Tue, Feb 15, 2011 at 10:27 AM, wrote: > On Tue, Feb 15, 2011 at 11:42 AM, Davide Cittaro > wrote:

Re: [Numpy-discussion] Printing formatted numerical values

2010-11-15 Thread Jonathan Hilmer
Is there a convention for dealing with NaN and Inf? I've found that trusting the default behavior is a very bad idea: --- from numpy import * x = zeros((5,7)) x[:,3:] = nan x[:,-1] = inf savetxt('problem_array.txt',x,delimiter='\t') x2 = loadtxt('problem_array.txt'