numpy 1.22.4 Pypi GitHub Homepage
Other Docs
NotesParametersReturnsBackRef
mapparms(old, new)

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

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.

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.

Linear map parameters between domains.

See Also

getdomain
mapdomain

Examples

>>> from numpy.polynomial import polyutils as pu
... pu.mapparms((-1,1),(-1,1)) (0.0, 1.0)
>>> pu.mapparms((1,-1),(-1,1))
(-0.0, -1.0)
>>> i = complex(0,1)
... pu.mapparms((-i,-1),(1,i)) ((1+1j), (1-0j))
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

numpy.polynomial.polyutils.mapdomain numpy.polynomial.polyutils.getdomain

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /numpy/polynomial/polyutils.py#256
type: <class 'function'>
Commit: