This is a pre-release version (2.5.0.dev0+git20251130.2de293a). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy 2.5.0.dev0+git20251130.2de293a / numpy / polynomial / polyutils / mapparms

function

numpy.polynomial.polyutils:mapparms

source: build-install/usr/lib/python3.14/site-packages/numpy/polynomial/polyutils.py :241

Signature

def   mapparms ( old new )

Summary

Linear map parameters between domains.

Extended Summary

Return the parameters of the linear map offset + scale*x that maps old to new such that old[i] -> new[i], i = 0, 1.

Parameters

old, new : array_like

Domains. Each domain must (successfully) convert to a 1-d array containing precisely two values.

Returns

offset, scale : scalars

The map L(x) = offset + scale*x maps the first domain to the second.

Notes

Also works for complex numbers, and thus can be used to calculate the parameters required to map any line in the complex plane to any other line therein.

Examples

from numpy.polynomial import polyutils as pu
pu.mapparms((-1,1),(-1,1))
pu.mapparms((1,-1),(-1,1))
i = complex(0,1)
pu.mapparms((-i,-1),(1,i))

See also

getdomain
mapdomain

Aliases

  • numpy.polynomial.polyutils.mapparms