Hi there! I'm quite new to programming, even newer in python (this is actually
the first thing I try on it), and every other topic I've seen on forums about
my problem doesn't seem to help.
So, the following lines are intended to draw a white square (which it does),
turn it to blue when you cl
Just before anyone says, the reason I bind to the Canvas instead of binding
directly to the rectangle is because I plan to add more squares in the future.
Cheers.
--
http://mail.python.org/mailman/listinfo/python-list
Thank's to you all!
Setting isWhite as global worked fine.
I'll probably be back soon with another silly question, see you then :)
--
http://mail.python.org/mailman/listinfo/python-list
Ok, I'm working on a predator/prey simulation, which evolve using genetic
algorithms. At the moment, they use a quite simple feed-forward neural network,
which can change size over time. Each brain "tick" is performed by the
following function (inside the Brain class):
def tick(self):
Hi there.
I'm using python 3, where xrange doesn't exist any more (range is now
equivalent). And "temp" doesn't have any fixed discrete values it always takes.
I have tried cython but it doesn't seem to work well (maybe using it wrong?).
Any other ideas?
--
http://mail.python.org/mailman/lis
Hi there Chris.
Unfortunately, using iterations was about twice as slow as the original
implementation, so that's not the solution.
Thank's anyway.
--
http://mail.python.org/mailman/listinfo/python-list
Thank's for all the replies! I've tried some of the imporovements you suggested
(using math.exp() and sum() or math.fsum()).
None of that made the code faster, because they are functions you are calling
lots of times, and function calling is quite time expensive (same as x**(1/2)
is faster than
El domingo, 21 de julio de 2013 12:31:42 UTC+2, Steven D'Aprano escribió:
> On Sun, 21 Jul 2013 03:19:24 -0700, pablobarhamalzas wrote:
>
>
>
> > Thank's for all the replies! I've tried some of the imporovements you
>
> > suggested (using math.exp