• 列表转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])#对角

最新文章

  1. NetSuite SuiteScript 2.0 export data to Excel file(xls)
  2. 吐槽!important专用博文
  3. DataTable的子查询--DataTable.Select()
  4. Storm-隔离调度器
  5. 启用与关闭 Ad Hoc Distributed Queries
  6. .ascx.g.cs文件不能生成 The name ‘InitializeControl’ does not exist in the current context - Visual Web part Sharepoint
  7. 分享:linux下apache服务器的配置和管理
  8. c语言编译预处理和条件编译执行过程的理解
  9. 【模拟】BAPC2014 G Growling Gears (Codeforces GYM 100526)
  10. phpize 编译安装memcached
  11. SpringMVC的值传递
  12. Android清除缓存功能来实现
  13. [CSDN_Markdown] 使用LaTeX写矩阵
  14. iTOP-4418开发板支持Android4.4/5.1.1系统、Linux3.4.39、QT2.2/4.7/5.7、Ubuntu12.04
  15. STM32F103/429串口IAP+Ymodem升级
  16. GANs (Generative Adversarial Networks)
  17. 二叉树分派硬币 Distribute Coins in Binary Tree
  18. Python基础02_基本数据类型_以及while
  19. 64位版本为什么叫amd64,而不是intel64
  20. 分享一个基于小米 soar 的开源 sql 分析与优化的 WEB 图形化工具

热门文章

  1. ajax原生实现
  2. HttpServletRequest 获取cookie
  3. jdbc访问pipelinedb
  4. [LINQ] group by 与连接查询
  5. Axis通过方法获取webService请求报文
  6. lvm的备份还原及修改UUID
  7. echarts - 条形图grid设置距离绘图区域的距离
  8. mysql group by using filesort优化
  9. nginx学习笔记(二)
  10. js对象属性 通过点(.) 和 方括号([]) 的不同之处