Numpy1
2024-09-12 12:18:28
- 列表转n维数组ndarray
import numpy as np list=[1,2,3,4] n=np.array(list)
- random模块生成ndarray
n1=np.random.random([1,3]) #生成1行3列0~1之间的随机数 n2=np.random.seed(123) #不知道123干啥 n3=np.random.randn(2,3) #生成标准正态的随机数 np.random.shuffle(n3) #随机打乱数据np.random.normal(loc=0.0, scale=1.0, size=None)#生成正态分布np.zeros([3,3])#全03x3矩阵np.ones([3,3])#全1np.eye(3)#单位np.diag([1,2,3])#对角
最新文章
- NetSuite SuiteScript 2.0 export data to Excel file(xls)
- 吐槽!important专用博文
- DataTable的子查询--DataTable.Select()
- Storm-隔离调度器
- 启用与关闭 Ad Hoc Distributed Queries
- .ascx.g.cs文件不能生成 The name ‘InitializeControl’ does not exist in the current context - Visual Web part Sharepoint
- 分享:linux下apache服务器的配置和管理
- c语言编译预处理和条件编译执行过程的理解
- 【模拟】BAPC2014 G Growling Gears (Codeforces GYM 100526)
- phpize 编译安装memcached
- SpringMVC的值传递
- Android清除缓存功能来实现
- [CSDN_Markdown] 使用LaTeX写矩阵
- iTOP-4418开发板支持Android4.4/5.1.1系统、Linux3.4.39、QT2.2/4.7/5.7、Ubuntu12.04
- STM32F103/429串口IAP+Ymodem升级
- GANs (Generative Adversarial Networks)
- 二叉树分派硬币 Distribute Coins in Binary Tree
- Python基础02_基本数据类型_以及while
- 64位版本为什么叫amd64,而不是intel64
- 分享一个基于小米 soar 的开源 sql 分析与优化的 WEB 图形化工具