I've discovered numpy does things better than I could.