numpoly.align_shape

numpoly.align_shape(*polys: numpoly.typing.PolyLike)Tuple[numpoly.baseclass.ndpoly, ...][source]

Align polynomial by shape.

Args:
polys:

Polynomial to make adjustment to.

Return:

Same as polys, but internal adjustments made to make them compatible for further operations.

Example:
>>> q0, q1 = numpoly.variable(2)
>>> poly1 = 4*q0
>>> poly2 = numpoly.polynomial([[2*q0+1, 3*q0-q1]])
>>> poly1.shape
()
>>> poly2.shape
(1, 2)
>>> poly1, poly2 = numpoly.align_shape(poly1, poly2)
>>> poly1
polynomial([[4*q0, 4*q0]])
>>> poly2
polynomial([[2*q0+1, -q1+3*q0]])
>>> poly1.shape
(1, 2)
>>> poly2.shape
(1, 2)