Affine transform reversing transforms implied in ornt
Imagine you have an array arr of shape shape, and you apply the transforms implied by ornt (more below), to get tarr. tarr may have a different shape shape_prime. This routine returns the affine that will take a array coordinate for tarr and give you the corresponding array coordinate in arr.
Parameters : | ornt : (p, 2) ndarray
shape : length p sequence
|
---|---|
Returns : | transform_affine : (p + 1, p + 1) ndarray
|
Notes
If a row in ornt contains NaN, this means that the input row does not influence the output space, and is thus effectively dropped from the output space. In that case one tarr coordinate maps to many arr coordinates, we can’t invert the transform, and we raise an error