- 博客(4)
- 资源 (1)
- 收藏
- 关注
原创 python_(3)_行列式计算
行列式计算(按行展开)行标取标准排列列标取排列的所有可能,从不同列取出三个元素相乘,符号由列标排列奇偶性∣a11a12⋯a1na21a22⋯a2n⋮⋮⋱⋮an1an2⋯ann∣=∑j1j2⋯jn(−1)N(j1j2⋯jn)a1j1a2j2⋯anjn\begin{vmatrix}a_{11} & a_{12} & \cdots & a_{1n} \\a_{21} & a_{22} & \cdots & a_{2n} \\\vdots &
2021-06-30 19:37:35 1258 1
原创 数组相加_GPU实现
CPU实现#include<stdio.h>#include<stdlib.h>#include<string.h>#include<time.h>void sumArraysOnHost(float *A, float *B, float *C, const int N){ for (int idx=0; idx<N; idx++){ C[idx] = A[idx] + B[idx]; printf("%f \t %f \t %f
2021-06-15 13:32:12 259 1
原创 python_(2)_矩阵运算
矩阵m×nm \times nm×n 矩阵[12345678]\begin{bmatrix}1 & 2 \\3 & 4 \\5 & 6 \\7 & 8 \end{bmatrix}⎣⎢⎢⎡13572468⎦⎥⎥⎤import numpy as npA = np.array([[1,2],[3,4],[5,6],[7,8]])print(A)print(A.shape)[[1 2] [3 4] [5 6] [7 8]](4, 2)
2021-06-01 16:30:42 279
原创 python_(1)_向量运算
向量行向量import numpy as npa = np.array([1,2,3,4])print(type(a))print(a)<class 'numpy.ndarray'>[1 2 3 4]列向量列向量 相当于一个 n×1n\times1n×1 的矩阵import numpy as npa = np.array([[1,2,3,4]])print(type(a))print(a)print(a.shape)print(type(a.T))print(
2021-06-01 16:29:11 5585
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人