Python Program to Sort Array in Descending Order

Write a Python Program to sort Numpy Array items in Descending order. First, the Numpy sort function (orarr.sort()) sorts the array items in ascending order. Next, we sliced the array using negative values to reverse the array (descarr = orarr[::-1]), which becomes descending. # Sort Array Descending import numpy as np orarr = np.array([22, 98, … Read more