Mark Dickinson <dickinsm at gmail.com> added the comment: Rather than reinventing the wheel, it may be worth looking at what numpy does here. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue11888> _______________________________________