Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Sorting Arrays | Important Functions
NumPy in a Nutshell

Sorting ArraysSorting Arrays

Now, let's dive into sorting arrays. Sorting an array involves arranging its elements in a specific order, whether it's ascending, descending, or some other sequence.

Let's try to sort the array:

Note

The sort() function returns a copy of the array, while the original array remains unchanged.

Let's try to sort a 2-D array:

Task

You have the following array: [15, -2, 33, 47, -55, 16, 0, 834]. Your task is to sort it.

Everything was clear?

Section 4. Chapter 4
toggle bottom row
course content

Course Content

NumPy in a Nutshell

Sorting ArraysSorting Arrays

Now, let's dive into sorting arrays. Sorting an array involves arranging its elements in a specific order, whether it's ascending, descending, or some other sequence.

Let's try to sort the array:

Note

The sort() function returns a copy of the array, while the original array remains unchanged.

Let's try to sort a 2-D array:

Task

You have the following array: [15, -2, 33, 47, -55, 16, 0, 834]. Your task is to sort it.

Everything was clear?

Section 4. Chapter 4
toggle bottom row
some-alt