Challenge: Practice More Methods from the NumPy Library
Write code to find indices of nonzero elements, create an identity matrix, find the minimum and maximum values, and create a matrix as a chess board pattern.
We'll cover the following
Write a program to achieve the following tasks:
- Find indices of nonzero elements from
[11, 22, 0, 0, 40, 50, 0]
. - Create a 5 x 5 identity matrix.
- Create a 4 x 4 array with random values and find the minimum and maximum values.
- Create an 8 x 8 array and fill it with a chess board pattern.
Get hands-on with 1400+ tech skills courses.