how to make this code faster
davbrow at gmail.com
davbrow at gmail.com
Thu Oct 13 02:33:21 EDT 2005
It looks like you're using Numeric for your arrays, but you are then
pulling sin from the math module and calculating one point at a time.
Instead try using sin(whole array) where sin is a ufunc from the
Numeric module. Also, it's usually not good practice to "import
Numeric as *". Instead try import Numeric as N so it's clear which
functions you are using.
-- David
More information about the Python-list
mailing list