out[ ]array([ ]in [ ]np multiply outer(arrnp arange( )out[ ]array([[ ][ ][ ][ ][ ]]the output of outer will have dimension that is the sum of the dimensions of the inputsin [ ]result np subtract outer(randn( )randn( )in [ ]result shape out[ ]( the last methodreduceatperforms "local reduce"in essence an array groupby operation in which slices of the array are aggregated together while it' less flexible than the groupby capabilities in pandasit can be very fast and powerful in the right circumstances it accepts sequence of "bin edgeswhich indicate how to split and aggregate the valuesin [ ]arr np arange( in [ ]np add reduceat(arr[ ]out[ ]array([ ]the results are the reductions (heresumsperformed over arr[ : ]arr[ : ]and arr[ :like the other methodsyou can pass an axis argumentin [ ]arr np multiply outer(np arange( )np arange( )in [ ]arr out[ ]array([ in [ ]np add reduceat(arr[ ]axis= out[ ]array([ ] ] ] ]] ] ] ] ]]table - ufunc methods method description reduce(xaggregate values by successive applications of the operation accumulate(xaggregate valuespreserving all partial aggregates reduceat(xbins"localreduce or "group byreduce contiguous slices of data to produce aggregated array outer(xyapply operation to all pairs of elements in and result array has shape shape shape advanced ufunc usage www it-ebooks info