Зміст курсу
NumPy in a Nutshell
1. Getting Started with NumPy
4. Important Functions
NumPy in a Nutshell
1-D Arrays
A one-dimensional array is a collection of elements, all of the same type, indexed by sequences of natural numbers.
Let's have a look at an example of creating a 1-D array:
![Example](https://codefinity-content-media.s3.eu-west-1.amazonaws.com/671389bc-34ed-4de7-83cd-2d1bfcf00a76/pic_7.png)
Note
We should use the
np.array()
function and enclose your 1-dimensional array in square brackets. For example:np.array([value1, value2, value3])
.
Select all options with the INCORRECT code for creating a 1-D array.
Виберіть кілька правильних відповідей
Все було зрозуміло?
Зміст курсу
NumPy in a Nutshell
1. Getting Started with NumPy
4. Important Functions
NumPy in a Nutshell
1-D Arrays
A one-dimensional array is a collection of elements, all of the same type, indexed by sequences of natural numbers.
Let's have a look at an example of creating a 1-D array:
![Example](https://codefinity-content-media.s3.eu-west-1.amazonaws.com/671389bc-34ed-4de7-83cd-2d1bfcf00a76/pic_7.png)
Note
We should use the
np.array()
function and enclose your 1-dimensional array in square brackets. For example:np.array([value1, value2, value3])
.
Select all options with the INCORRECT code for creating a 1-D array.
Виберіть кілька правильних відповідей
Все було зрозуміло?