Have a look at a new array. Your task is to slice the array and change its data type. There is an index of the row and a step for values in the row in the input. Print the resultant array using np.int8.
Data types in NumPy
Slicing and data types
Report a typo
Sample Input 1:
2
2Sample Output 1:
[10 89 3]Write a program in Python 3
import numpy as np
array = np.array([[212, 215, 434, 2, 0],
[6, 447, 0, 4, 143],
[10, 478, 601, 602, 3]], dtype=np.float64)
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.