#task15 Sort the (3x3) NumPy array by the second column | Python For Beginners #Shaheencodingzone

preview_player
Показать описание
#task15
def function15():
#Sort following NumPy array by the second column


ans = #write your code here

return ans

"""
Expected Output:
array([[-4, 1, 7],
[ 8, 2, -2],
[ 6, 3, 9]])
"""
Рекомендации по теме
Комментарии
Автор

I solved this in the following way:

arr[[0, 1, 2], :] = arr[[1, 0, 2], :]

Is this also correct?

PolarBearSeal
join shbcf.ru