text_plain_output_1.png
from scipy import sparse

import numpy as np

vector_row = np.array([1, 2, 3])

vector_col = np.array([[1], [2], [3]])

matrix = np.array([[1, 2, 3], [4, 5, 6]])

matrix_object = np.mat([[1, 2], [3, 4]])

from scipy import sparse
matrix = np.array([[1, 0, 2, 0], [1, 0, 0, 1], [0, 0, 1, 0]])
matrix_sparse = sparse.csr_matrix(matrix)

matrix = np.array([[1, 2, 3], [1, 4, 5]])

vector_row = np.array([1, 2, 3])

matrix = np.array([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]])

matrix.shape

matrix.size

matrix.ndim

matrix.min()

matrix.max()

matrix.size

matrix.reshape(6, 2)

matrix.reshape(1, -1)

matrix.reshape(-1, 1)