NumPy的使用(一)
# -*- coding: utf8 -*- from numpy import* a=arange(15).reshape(3,5) print a print a.shape print a.ndim print a.dtype.name print a.size print type(a) b=array([15,16,17]) print b print type(b)
[[ 0 1 2 3 4]
[ 5 6 7 8 9]
[10 11 12 13 14]]
(3, 5)
2
int32
15
<type 'numpy.ndarray'>
[15 16 17]
<type 'numpy.ndarray'>
--------------------------------------------------------------------------------------------------------------------------------------------
作者:Honey_Badger —— 觉得这文章好,点一下左下角
出处:http://tk55.cnblogs.com/
posted on 2017-03-14 21:33 Honey_Badger 阅读(356) 评论(0) 收藏 举报