numpoly.vsplit#
- numpoly.vsplit(ary: numpoly.typing.PolyLike, indices_or_sections: ArrayLike) List[ndpoly][source]#
Split an array into multiple sub-arrays vertically (row-wise).
Please refer to the
splitdocumentation.vsplitis equivalent tosplitwith axis=0 (default), the array is always split along the first axis regardless of the array dimension.- Note:
split : Split an array into multiple sub-arrays of equal size.
- Example:
>>> poly = numpoly.monomial(8).reshape(4, 2) >>> poly polynomial([[1, q0], [q0**2, q0**3], [q0**4, q0**5], [q0**6, q0**7]]) >>> part1, part2 = numpoly.vsplit(poly, 2) >>> part1 polynomial([[1, q0], [q0**2, q0**3]]) >>> part2 polynomial([[q0**4, q0**5], [q0**6, q0**7]]) >>> part1, part2, part3 = numpoly.vsplit(poly, [1, 2]) >>> part1 polynomial([[1, q0]]) >>> part3 polynomial([[q0**4, q0**5], [q0**6, q0**7]])