] - - ]]figure - two-dimensional array slicing suppose each name corresponds to row in the data array if we wanted to select all the rows with corresponding name 'boblike arithmetic operationscomparisons (such as ==with arrays are also vectorized thuscomparing names with the string 'bobyields boolean arrayin [ ]names ='bobout[ ]array(truefalsefalsetruefalsefalsefalse]dtype=boolthis boolean array can be passed when indexing the arrayin [ ]data[names ='bob'out[ ]array([[- - - ] ]]the boolean array must be of the same length as the axis it' indexing you can even mix and match boolean arrays with slices or integers (or sequences of integersmore on this later)in [ ]data[names ='bob' :out[ ]array([[- ] numpy basicsarrays and vectorized computation www it-ebooks info