Re: Help on slow attribute copy

2005-05-18 Thread bgs
Hmm, it looks like the dot operator has been overloaded to do something complicated. (although if you haven't already, try "for i in nodes: pass" just to make sure). Is it retrieving the data from the network somewhere? If so, then it looks like it is probably retrieving each coordinate individu

Re: Help on slow attribute copy

2005-05-18 Thread bgs
There's no way that loop takes fifteen minutes just because of the dot operator. I mean, 20 dots in 15 minutes is 200 dots/second. On a 1 GHz machine, that would be 5 million cycles per dot. That does not seem reasonable (assuming you haven't overridden the dot operator to do something more

Re: array type casting problem in scipy.interpolate

2005-04-30 Thread bgs
The routine requires real arrays, and you are giving it one complex one. It does not know what to do with the complex array. What are you expecting it to do? If you need the real and imaginary parts to be separately interpolated, then split the complex array into two real arrays and use the rout

Re: Python Challenge ahead [NEW] for riddle lovers

2005-04-29 Thread bgs
pythonchallenge wrote: > For the riddles' lovers among you, you are most invited to take part > in the Python Challenge, the first python programming riddle on the net. > > You are invited to take part in it at: > http://www.pythonchallenge.com That was fun. The very first step in 6 was the most

Re: suggestions on how to do this

2005-04-27 Thread bgs
You could probably use scipy.base.polynomial, but it's easy enough to implement a polynomial yourself. Just use a dict-- each key represents the power and each value the coefficient of the polynomial. You didn't say exactly how efficient you need this. It takes only a couple seconds to sum 100 o