of courseby using numpy arrays we sacrifice the agility python lists offer simple operations like adding or removing are bit complex for numpy arrays luckilywe have both at our disposaland we will use the right one for the task at hand indexing part of the power of numpy comes from the versatile ways in which its arrays can be accessed in addition to normal list indexingit allows us to use arrays themselves as indices [np array([ , , ])array([ ]in addition to the fact that conditions are now propagated to the individual elementswe gain very convenient way to access our data > array([falsefalsea[ > array([ ]truefalsefalsetrue]dtype=boolthis can also be used to trim outliers [ > array([ ]as this is frequent use casethere is special clip function for itclipping the values at both ends of an interval with one function call as followsa clip( , array([ ]handling non-existing values the power of numpy' indexing capabilities comes in handy when preprocessing data that we have just read in from text file it will most likely contain invalid valueswhich we will mark as not being real number using numpy nan as followsc np array([ np nan ]let' pretend we have read this from text file array( nan ]np isnan(carray([falsefalsetruefalsefalse]dtype=bool