How to code, an additional note

(by Ronny Errmann)

My last post could be read quite negatively, in the way that I didn’t make any progress. So I wanted to add some notes to counteract that feeling. When I looked into new methods actively, because I had a problem, I learned a lot. And I easily remember a few bits from the last years:

  • Replacing loops and conditions with numpy operations on the whole array or part of the array. This made execution so much faster. For example using
array[array > 0] = numpy.average(another_array, axis=1)
  • Making my program compatible to Windows. It’s just a few things to keep Python code compatible to different operating systems.
  • Adding multiprocessing to the program.

All of these helped me to learn new concepts and improve.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s