码迷,mamicode.com
首页 > 其他好文 > 详细

Numpy(ndarray常用函数介绍)

时间:2018-08-14 00:58:25      阅读:556      评论:0      收藏:0      [点我收藏+]

标签:div   常用   nump   pre   code   import   int   nbsp   type   

1. 由list创建ndarray

1 import numpy as np
2 
3 x = [1, 2, 3]
4 print(x)
5 print(type(x))
6 a = np.array(x)
7 print(a)
8 print(type(a))

output: 

[1, 2, 3]

<class ‘list‘>

[1, 2, 3]

<class ‘numpy.ndarray‘>

Numpy(ndarray常用函数介绍)

标签:div   常用   nump   pre   code   import   int   nbsp   type   

原文地址:https://www.cnblogs.com/aperolchen/p/9471872.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!