How to Use Conditional Expressions With NumPy where()

0%

Suppose you have an array defined as follows:

Python
>>> import numpy as np
>>> quiz_array = np.arange(-10, 10).reshape(5, 4)
>>> quiz_array
array([[-10,  -9,  -8,  -7],
       [ -6,  -5,  -4,  -3],
       [ -2,  -1,   0,   1],
       [  2,   3,   4,   5],
       [  6,   7,   8,   9]])
Which two of the following will square only the first row of numbers in quiz_array?

Select all that apply:

Don’t get your arguments mixed up. Remember, the documentation is there for a reason!

Sorry! There has been an error processing your answer. Please try again.

Got feedback on this question?