mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-07-04 17:43:12 +02:00
12 lines
293 B
Python
12 lines
293 B
Python
import numpy as np
|
|
|
|
class MatrixGenerator:
|
|
@staticmethod
|
|
def generate_random_matrix_and_vector(size):
|
|
A = np.random.uniform(-1, 1, (size, size))
|
|
b = np.random.uniform(-1, 1, size)
|
|
return A, b
|
|
|
|
def generate_identity_matrix(size):
|
|
return np.eye(size)
|