I finally launched version 1.0 of my arrayterator module. I wrote it a long time ago (in internet years) before I started working on pydap 2.0, and since it had a couple of bugs that I couldn’t understand I decided to rewrite everything from scratch together with a very extensible test suite.
It’s funny because I like to program the same way I like to draw. If I want to draw a big scene I always start by making the eyes of a person, or the hand, or some other small detail, and then I proceed out towards the big picture. The arrayterator is a small module, although central to pydap, and I wanted to start pydap 2.0 with it. A bottom-up approach, I guess.
The new test suite uses a “stochastic” method to ensure that the code works. I simply generate thousand of random multi-dimensional arrays, and then I slice them with crazy indexes, and check that everything works correctly by comparing with a common ndarray. This process uncovered a lot of bugs, and saved me valuable time… too bad I can’t use it with all my programs.