Skip to content

Commit 9dd7df6

Browse files
authored
Create numpy.md
1 parent 8f71438 commit 9dd7df6

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

Diff for: numpy.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
### Numpy
2+
1. Write a NumPy program to create an array of 10 zeros.
3+
4+
2. Write a NumPy program to create an array of 10 ones.
5+
6+
3. Write a NumPy program to create a 3x3 matrix with values ranging from 0 to 8.
7+
8+
4. Write a NumPy program to reverse an array (first element becomes the last).
9+
10+
5. Write a NumPy program to extract all odd numbers from an array.
11+
12+
6. Write a NumPy program to compute the sum of all elements, mean, and standard deviation of a given array.
13+
14+
7. Write a NumPy program to create a 5x5 matrix with random values and find the minimum and maximum values.
15+
16+
8. Write a NumPy program to create a 2D array with 1 on the border and 0 inside.
17+
18+
9. Write a NumPy program to multiply two given matrices.
19+
20+
10. Write a NumPy program to find the unique elements of an array.
21+
22+
11. Write a NumPy program to extract the elements in the odd-numbered columns of a 2D array.
23+
24+
12. Write a NumPy program to extract the elements in the even-numbered rows of a 2D array.
25+
26+
13. Write a NumPy program to extract a subarray from a given array. The subarray should include the first 3 rows and the columns from index 1 to 4 (inclusive).
27+
28+
14. Write a NumPy program to reverse the order of elements in each column of a 2D array.
29+
30+
15. Write a NumPy program to create a diagonal matrix from a given 1D array. The elements below the diagonal should be zero, and the elements above the diagonal should be squared.

0 commit comments

Comments
 (0)