- 博客(7)
- 收藏
- 关注
原创 基于numpy库的向量的加法和求两向量夹角
向量的积 @ 注:在numpy中,向量V1和V2的积表示为:V1@V2。#计算cosin(0)#计算两个向量的夹角。
2023-05-18 22:32:11
369
1
原创 向量四则运算
plt.annotate('original vector',(0.025,0.01),xycoords='data',fontsize=10) #annotate:注释。#向量与向量:两个向量相同元素的位置作加减乘除(两个元素的个数必须相等)print(vector+num)#打印vector加num。print(vector-num)#打印vector减num。print(vector*num)#打印vector乘num。print(vector/num)#打印vector除num。
2023-05-08 14:14:49
347
原创 深度学习_线性代数中的向量
print('角度(drgree) =', round(math.degrees(theta), 2))print('角度(redian) =',round(theta*180/math.pi, 2))print("方法一计算向量长度得:",(v[0]**2+v[1]**2)**(1/2))1)张量(Tensor):描述向量空间中物体的特征(例如向量是一维的张量);print('弧度(redian) =',round(theta,4))print("这是向量v=",v)
2023-05-06 13:40:12
124
原创 基于python向量的加法可视化
#quiver:箭袋,箭头。##origin:源头,原点。##annotate:注释。##scale:规模,刻度。##vector:向量。##coord:坐标。##equal:相等。##label:标签。
2023-05-05 22:36:16
332
1
原创 关于pandas的使用
df['item_price'] = df['item_price'].apply(dollarrizer) ##等价于 df['item_price'] = df['item_price'].apply(dollarrizer = lambda x:x[1:])#count1 = df['quantity'].values.sum()##计算quantity的数量。#print(rst.head(3))#被下单次数最多的三种商品。#print(df.shape)##1_1数据集的维度。
2023-05-04 21:47:08
156
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人