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'>


 

 

posted on 2017-03-14 21:33  Honey_Badger  阅读(328)  评论(0编辑  收藏  举报

导航

github