标签:visio turned lib classname html not view desc sequence
numpy.
split
(ary, indices_or_sections, axis=0)[source]Split an array into multiple sub-arrays.
将一个array分成多个子array
Parameters: |
ary : ndarray
indices_or_sections : int or 1-D array
axis : int, optional
|
---|---|
Returns: |
sub-arrays : list of ndarrays
|
Raises: |
ValueError
|
See also
array_split
hsplit
vsplit
dsplit
concatenate
stack
hstack
vstack
dstack
Examples
>>> x = np.arange(9.0)
>>> np.split(x, 3)
[array([ 0., 1., 2.]), array([ 3., 4., 5.]), array([ 6., 7., 8.])]
>>> x = np.arange(8.0)
>>> np.split(x, [3, 5, 6, 10])
[array([ 0., 1., 2.]),
array([ 3., 4.]),
array([ 5.]),
array([ 6., 7.]),
array([], dtype=float64)]
标签:visio turned lib classname html not view desc sequence
原文地址:http://www.cnblogs.com/qinduanyinghua/p/7134338.html