Pylab is built on a numerical package called numpy. You don't need to know this; it hides numpy from you, but I prefer to use numpy directly for my computations and manually pass the results to pylab for visualisation. You can make better use of the maths routines that way and it gives you more control over the graphical output.