numpoly.align_polynomials¶
- numpoly.align_polynomials(*polys: numpoly.typing.PolyLike) → Tuple[numpoly.baseclass.ndpoly, ...][source]¶
Align polynomial such that dimensionality, shape, etc. are compatible.
Alignment includes shape (for broadcasting), indeterminants, exponents and dtype.
- Args:
- polys:
Polynomial to make adjustment to.
- Return:
Same as
polys
, but internal adjustments made to make them compatible for further operations.- Example:
>>> q0 = numpoly.variable() >>> q0q1 = numpoly.variable(2) >>> q0 polynomial(q0) >>> q0.coefficients [1] >>> q0.indeterminants polynomial([q0]) >>> q0, _ = numpoly.align_polynomials(q0, q0q1) >>> q0 polynomial([q0, q0]) >>> q0.coefficients [array([0, 0]), array([1, 1])] >>> q0.indeterminants polynomial([q0, q1])