Fork me on GitHub

>>> a
array([[1, 2],
[3, 4]])
>>> a.shape
(2, 2)
>>> b
array([2, 3])
>>> b.shape
(2,)
>>> c
array([[1],
[2]])
>>> c.shape
(2, 1)
>>> d
array([[1, 2]])
>>> d.shape
(1, 2)

 

>>> d.sum(0)==e
array([ True, True], dtype=bool)
>>> e
array([1, 2])

posted on 2014-07-16 11:35  huashiyiqike  阅读(193)  评论(0编辑  收藏  举报