freshman2233
freshman2233
全部文章
分类
归档
标签
去牛客网
登录
/
注册
freshman2233的博客
全部文章
(共3篇)
题解 | 重塑矩阵
from typing import List, Tuple, Union import numpy as np def reshape_matrix(a: List[List[Union[int, float]]], new_shape: Tuple[int, int]) -> List[...
2025-09-14
0
8
题解 | 矩阵转置
from typing import List, Union # 使用 Union 来表示类型可以是 int 或 float def transpose_matrix(a: List[List[Union[int, float]]]) -> List[List[Union[int, floa...
2025-09-14
0
8
题解 | 矩阵和向量的点积
def matrix_vector_dot_product(matrix, vector): # matrix is not null if not matrix: return -1 # maatrix cols need to equal to vecto...
2025-09-14
0
8