自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 资源 (8)
  • 收藏
  • 关注

原创 numpy中矩阵的翻转(flip)

flip函数简介

2020-01-18 20:39:14 46181

原创 numpy ndarray判断矩阵是否含有一个元素(ndarray.__contains__())

a=np.array([[3, 7, 3],[3, 7, 3],[7, 3, 2]])若判断矩阵a里是否有7和8a.__contains__(7)Out[204]: True说明含有7a.__contains__(8)Out[205]: False说明不含有8

2020-01-18 15:54:30 9551

原创 numpy中ndarray数组中选出指定元素构造新数组(ndarray.take())

官方文档take用法解释先随机生成一个矩阵aimport numpy as npa=np.random.randint(1,9,size=9).reshape((3,3))结果array([[7, 3, 2], [8, 7, 5], [3, 7, 3]])如果希望提取某个axis的若干切片ndarray.take(indices,axis)如,提取...

2020-01-18 15:31:40 4480 3

原创 numpy.clip

ndarray自带的clip method生成一个矩阵a=np.array([[1,2,3],[4,5,6]])aOut[175]: array([[1, 2, 3], [4, 5, 6]])如果我们希望<5的数值为5,则a.clip(5)Out[176]: array([[5, 5, 5], [5, 5, 6]])如果我们希望<5...

2020-01-18 15:11:05 1090 1

原创 numpy中ndarray矩阵如何与虚数相乘

如果我们要把矩阵a=np.array([[1,2,3],[4,5,6]])乘以虚数单位i,可以按照如下方式In[167]: a*(1j)Out[167]: array([[0.+1.j, 0.+2.j, 0.+3.j], [0.+4.j, 0.+5.j, 0.+6.j]])a*(1j)...

2020-01-18 14:58:48 3133

原创 numpy.ndarray类常见的属性(attributes)

numpy中ndarray常见的属性dtype:数据类型T:转置(注意一维数组问题)shape:形状ndim:维度个数size:总的元素个数conj:共轭real:实部imag:虚部flat:1-D的iterator先随机生成3*3的方阵import numpy as npa=np.random.randint(1,9,size=9).reshape((3,3))pri...

2020-01-18 14:50:42 941

原创 numpy中的求和函数:cumsum和sum

numpy中的求和:cumsum和sumimport numpy as npa=np.random.randint(1,9,size=9).reshape((3,3))#随机生成3X3的矩阵print(a)print(a.sum(axis=0))#对每一行求和print(a.cumsum(axis=0))#对每一行求累加和打印结果[[7 3 5] [2 7 2] [7 6 5...

2020-01-18 14:23:45 2666

原创 numpy中ndarray数组转化为list

随机生成矩阵import numpy as npa=np.random.randint(1,9,size=9).reshape((3,3))打印结果array([[7, 6, 6], [1, 1, 8], [2, 4, 8]])如果想把矩阵转换成list类型print(a.tolist())打印结果[[7, 6, 6], [1, 1, 8], [...

2020-01-18 14:12:50 1924

原创 numpy如何将ndarray矩阵用相同元素填充(ndarray.fill)

numpy如何将array矩阵中的元素用相同元素随机生成一个矩阵import numpy as npa=np.random.randint(1,9,size=9).reshape((3,3))打印结果 [[3, 4, 8], [5, 8, 4], [4, 8, 3]]如果想把矩阵所有元素用1替代在命令输入a.fill(1)打印结果...

2020-01-18 14:08:14 2853

原创 如何把ndarray矩阵输出为字符串

标题如何把ndarray矩阵输出为字符串随机生成一个3X3的矩阵,如何将其转换成字符串输出?import numpy as npa=np.random.randint(1,9,size=9).reshape((3,3))print(a.__str__())打印矩阵[[3 4 8] [5 8 4] [4 8 3]]这时,可以调用ndarray的自带method完成在命令行输...

2020-01-18 14:00:00 3240

原创 numpy block创建分块矩阵

import numpy as npa=np.random.randint(1,9,size=9).reshape((3,3))print(a)b=np.random.randint(1,9,size=3)print(b)显示随机生成两个矩阵#a矩阵[[4 1 3] [7 2 3] [5 1 1]]#b矩阵[5 3 2]把b拼接在a右侧b=np.expand_dim...

2020-01-15 13:43:25 9117

原创 numpy数组元素的拼接(concatenate)

把一个13的矩阵拼接在33的矩阵下方随机生成两个矩阵import numpy as npa=np.random.randint(1,9,size=9).reshape((3,3))print(a)b=np.random.randint(1,9,size=3)print(b)结果[[5 8 5] [4 8 6] [8 6 4]][5 3 7]如果要把矩阵b拼接在a下方:...

2020-01-15 13:30:42 1658

原创 numpy ndarray 提取对角元素

方式1使用class methodimport numpy as npa=np.array([[1.123,2.123,3.123],[4.456,5.456,6.456],[7.789,8.789,9.789]])print(a.diagonal(-1))#数字代表偏移量结果:array([4.456, 8.789])方式2使用库函数np.diag(a,-1)#命令行结...

2020-01-15 13:04:21 2176

原创 numpy 如何指定矩阵中输出的小数位数

如果有一个小数位很多的矩阵,我们希望只显示前某几位,该怎么办?```pythonimport numpy as npa=np.array([[1.123,2.123,3.123],[4.456,5.456,6.456],[7.789,8.789,9.789]])print(a.round(0))#显示整数部分print(a.round(1))#显示一位小数输出结果:```pyt...

2020-01-15 12:56:43 13784 1

原创 numpy 一维矩阵转置问题

##Numpy 一位矩阵转置问题numpy中,我们如果直接对一维行矩阵转置,会出现问题这时,可以采用expand_dimsimport numpy as npd=np.zeros((1,9))d.shaped=np.expand_dims(d,axis=0)d.shaped.Td.transpose()expand_dims后的shape是(9,1),a.T就没有问题了...

2020-01-14 20:24:02 2089

电子技术实验mooc答案

MOOC电子技术应用实验1(数字电路基础实验)2018秋 本人希望下载者能合理使用答案,经过自己的思考后再校对,帮助复习,提高分数。

2019-05-25

电子科技大学基础工程训练机电一体化实训设计

plc编程那个模块,2018年亲测可用,如果做不出来希望能帮到你。

2019-05-25

微波技术与天线部分习题解答

微波技术与天线部分重点习题答案 主编:杨德强 陈波 王园 2016年12月第1版 本人希望下载者能合理使用本书习题答案,在自己思考过后再来校对。

2019-05-25

成都电子科技大学数字信号处理资料

本资源经过精心整理,包含参考资料和可供参考的国外优秀教材,课程PPT,课本电子版,MATLAB设计实例参考,习题答案等,内容详尽。

2019-02-24

成都电子科技大学计算机系统原理资料

本资源是经过精心整理和总结的全套学习资料,旨在帮助同样学习本课程的学生。不包含往年试题。

2019-02-24

Linear Algebra Pure & Applied

国外原版线性代数教材 作者:Edgar G Goodaire This is a matrix-oriented approach to linear algebra that covers the traditional material of the courses generally known as “Linear Algebra I” and “Linear Algebra II” throughout North America, but it also includes more advanced topics such as the pseudoinverse and the singular value decomposition that make it appropriate for a more advanced course as well. As is becoming increasingly the norm, the book begins with the geometry of Euclidean 3-space so that important concepts like linear combination, linear independence and span can be introduced early and in a “real” context. The book reflects the author's background as a pure mathematician — all the major definitions and theorems of basic linear algebra are covered rigorously — but the restriction of vector spaces to Euclidean n-space and linear transformations to matrices, for the most part, and the continual emphasis on the system Ax=b, make the book less abstract and more attractive to the students of today than some others. As the subtitle suggests, however, applications play an important role too. Coding theory and least squares are recurring themes. Other applications include electric circuits, Markov chains, quadratic forms and conic sections, facial recognition and computer graphics.

2018-12-03

随机信号分析

哈工大出版社 高等学校十二五规划教材 扫描版本 教材。

2018-11-26

Vector Calculus

Vector Calculus Michael Corral Page:222 This book covers calculus in two and three variables. It is suitable for a one-semester course, normally known as “Vector Calculus”, “Multivariable Calculus”, or simply “Calculus III”. The prerequisites are the standard courses in single-variable calculus (a.k.a. Calculus I and II).

2018-11-25

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除