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

numpy array_split()

时间:2017-07-07 23:30:23      阅读:217      评论:0      收藏:0      [点我收藏+]

标签:ide   intern   org   html   section   als   amp   ref   htm   

numpy.array_split(ary, indices_or_sections, axis=0)[source]

Split an array into multiple sub-arrays.

Please refer to the split documentation. The only difference between these functions is that array_split allows indices_or_sections to be an integer that does not equally divide the axis.

See also

split
Split array into multiple sub-arrays of equal size.

Examples

>>> x = np.arange(8.0)
>>> np.array_split(x, 3)
    [array([ 0.,  1.,  2.]), array([ 3.,  4.,  5.]), array([ 6.,  7.])]

numpy array_split()

标签:ide   intern   org   html   section   als   amp   ref   htm   

原文地址:http://www.cnblogs.com/qinduanyinghua/p/7134346.html

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