Miles per gallon is one measure of fuel economy. The array v…

Miles per gallon is one measure of fuel economy. The array variable mpg contains mpg figures for popular car models. Typical mpg values range from 0 to 150 (electric vehicles have mpg equivalents in the low 100’s). We want to consider any mpg value outside of this range to be an invalid outlier and exclude it from our analysis. What expression returns only the valid values from the mpg array?

The array sales contains monthly sales figures for this year…

The array sales contains monthly sales figures for this year, and the array months contains the names of the 12 months (January, February, etc). Both arrays contain 12 values. What is the functional difference between the expressions np.max(sales) and sales.max()?