[SciPy-user] Zero crossings

J-Pascal Mercier jean-pascal.mercier@inrialpes...
Fri Feb 6 15:31:16 CST 2009


On Fri, 06 Feb 2009 13:59:29 -0700
Christopher Brown <c-b@asu.edu> wrote:

> Hi List,
> 
> What's the best way to find all zero crossings in my data? Is there 
> something already written in scipy?
> 


Hi, 

To my knowledge, there is no such function in scipy. Are your data 1D,
2D, 3D, ... ? What kind of precision you need? Do you have to find every
zero-crossing? 

An easy solution in 1D without sub-grid accuracy would be something
like : 

scipy.where(A[:-1] * A[1:] < 0)

cheers,

J-Pascal  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/scipy-user/attachments/20090206/5808c217/attachment.bin 


More information about the SciPy-user mailing list