Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn 2-D Arrays | Dimensions in Arrays
NumPy in a Nutshell

book2-D Arrays

Now, we've delved into the most intriguing aspect: What is a two-dimensional array?

In general, two-dimensional arrays are called matricesβ€”mathematical structures consisting of rows and columns. If it makes it easier to understand, you can visualize a matrix as a table.

Now, it's time to practice with 2D arrays. Let's explore how to create a 2-D array containing two arrays: 5.2, 3.0, 4.5 and 9.1, 0.1, 0.3:

12345
import numpy as np # Creating array arr = np.array([[5.2, 3.0, 4.5], [9.1, 0.1, 0.3]]) # Displaying array print(arr)
copy
question mark

Select all options with the INCORRECT code for creating 2-D arrays.

Select the correct answer

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 2. ChapterΒ 3

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

Awesome!

Completion rate improved to 4.76

book2-D Arrays

Swipe to show menu

Now, we've delved into the most intriguing aspect: What is a two-dimensional array?

In general, two-dimensional arrays are called matricesβ€”mathematical structures consisting of rows and columns. If it makes it easier to understand, you can visualize a matrix as a table.

Now, it's time to practice with 2D arrays. Let's explore how to create a 2-D array containing two arrays: 5.2, 3.0, 4.5 and 9.1, 0.1, 0.3:

12345
import numpy as np # Creating array arr = np.array([[5.2, 3.0, 4.5], [9.1, 0.1, 0.3]]) # Displaying array print(arr)
copy
question mark

Select all options with the INCORRECT code for creating 2-D arrays.

Select the correct answer

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 2. ChapterΒ 3
some-alt