| import numpy as np |
|
|
| |
| identity_matrix = np.eye(3) |
|
|
| |
| ones_array = np.ones((2, 4)) |
|
|
| |
| zeros_array = np.zeros((3, 2)) |
|
|
| |
| mean = 0 |
| std_dev = 1 |
| shape = (2, 3) |
| random_data = np.random.normal(mean, std_dev, shape) |
|
|
| |
| random_integers = np.random.randint(1, 10, (3, 3)) |
|
|
| |
| random_uniform_data = np.random.uniform(0, 1, (2, 2)) |
|
|
| |
| print("Identity Matrix:\n", identity_matrix) |
| print("Array of Ones:\n", ones_array) |
| print("Array of Zeros:\n", zeros_array) |
| print("Random Data with Normal Distribution:\n", random_data) |
| print("Random Integers:\n", random_integers) |
| print("Random Data from Uniform Distribution:\n", random_uniform_data) |