numpoly.hsplit

numpoly.hsplit(ary: numpoly.typing.PolyLike, indices_or_sections: Union[numpy._typing._array_like._SupportsArray[numpy.dtype], numpy._typing._nested_sequence._NestedSequence[numpy._typing._array_like._SupportsArray[numpy.dtype]], bool, int, float, complex, str, bytes, numpy._typing._nested_sequence._NestedSequence[Union[bool, int, float, complex, str, bytes]]])Sequence[numpoly.baseclass.ndpoly][source]

Split an array into multiple sub-arrays horizontally (column-wise).

Please refer to the split documentation. hsplit is equivalent to split with axis=1, the array is always split along the second axis regardless of the array dimension.

Note:

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

Example:
>>> poly = numpoly.monomial(8).reshape(2, 4)
>>> poly
polynomial([[1, q0, q0**2, q0**3],
            [q0**4, q0**5, q0**6, q0**7]])
>>> part1, part2 = numpoly.hsplit(poly, 2)
>>> part1
polynomial([[1, q0],
            [q0**4, q0**5]])
>>> part2
polynomial([[q0**2, q0**3],
            [q0**6, q0**7]])
>>> part1, part2, part3 = numpoly.hsplit(poly, [1, 2])
>>> part1
polynomial([[1],
            [q0**4]])
>>> part3
polynomial([[q0**2, q0**3],
            [q0**6, q0**7]])