out[ ]array( ]to use take along other axesyou can pass the axis keywordin [ ]inds [ in [ ]arr randn( in [ ]arr out[ ]array([[- - - ] - ]]in [ ]arr take(indsaxis= out[ ]array([[- - - ] - ]]put does not accept an axis argument but rather indexes into the flattened (one-dimensionalc orderversion of the array (this could be changed in principlethuswhen you need to set elements using an index array on other axesyou will want to use fancy indexing as of this writingthe take and put functions in general have better performance than their fancy indexing equivalents by significant margin regard this as "bugand something to be fixed in numpybut it' something worth keeping in mind if you're selecting subsets of large arrays using integer arraysin [ ]arr randn( random sample of rows in [ ]inds np random permutation( )[: in [ ]%timeit arr[inds loopsbest of us per loop in [ ]%timeit arr take(indsaxis= loopsbest of us per loop broadcasting broadcasting describes how arithmetic works between arrays of different shapes it is very powerful featurebut one that can be easily misunderstoodeven by experienced users the simplest example of broadcasting occurs when combining scalar value with an arrayin [ ]arr np arange( in [ ]arr out[ ]array([ ]in [ ]arr out[ ]array( advanced numpy www it-ebooks info ]