Simple vectorization tutorial in numpy