Python Scipy - ndimage.interpolation.geometric_transform() function Last Updated : 06 Jul, 2021 Summarize Comments Improve Suggest changes Share Like Article Like Report The given mapping function is used to find, for each point in the output, the corresponding coordinates in the input Syntax: scipy.ndimage.interpolation.geometric_transform(input, mapping, order=3) Parameters input : takes an array.mapping : accepts a tuple data structure similar to length of given output array rank.order : int parameter. which is a spline interpolation and the default value is 3. Returns: Returns an n d array. Example 1: Python3 from scipy import ndimage # importing numpy module for # processing the arrays import numpy as np # creating an 2 dimensional array with # 5 * 5 dimensions a = np.arrange(25).reshape((5, 5)) print('a') print(a) # reducing dimensions function def shift_func(output_coords): return (output_coords[0] - 0.7, output_coords[1] - 0.7) # performing geometric transform operation ndimage.geometric_transform(a, shift_func) Output: Example 2: Python3 from scipy import ndimage # importing numpy module for # processing the arrays import numpy as np # create 4 * 4 dim array. b = np.arrange(16).reshape((4, 4)) # reducing dimensions function def shift_func(output_coords): return (output_coords[0] - 0.1, output_coords[1] - 0.2) ndimage.geometric_transform(b, shift_func) Output: Comment More infoAdvertise with us Next Article How to implement linear interpolation in Python? S sravankumar_171fa07058 Follow Improve Article Tags : Python Python-scipy Practice Tags : python Similar Reads Matplotlib.axis.Axis.get_transform() function in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and used for working with the broader SciPy stack. Matplotlib.axis.Axis.get_transform() Function The Axis.get_transform() function 2 min read Matplotlib.axis.Tick.set_transform() function in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and used for working with the broader SciPy stack. Matplotlib.axis.Tick.set_transform() Function The Tick.set_transform() function 2 min read How to implement linear interpolation in Python? Linear Interpolation is the technique of determining the values of the functions of any intermediate points when the values of two adjacent points are known. Linear interpolation is basically the estimation of an unknown value that falls within two known values. Linear Interpolation is used in vario 4 min read Python SciPy - ndimage.map_coordinates() function This function is used to map the given array to new coordinates by interpolation. The array of coordinates is used to find, for each point in the output, the corresponding coordinates in the input. Syntax: scipy.ndimage.map_coordinates(input, coordinates, output=None, order=3,cval=0.0, prefilter=Tr 2 min read Python SciPy - ndimage.spline_filter1d() function This method is used to calculate a 1-D spline filter along the given axis. These are filtered by a spline filter. Syntax: scipy.ndimage.spline_filter1d(input, order=3, axis=-1, output=<class 'numpy.float64'>) Parameters input: array_like - The input array order: int - The order of the spline, 2 min read Matplotlib.axis.Axis.set_transform() function in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and used for working with the broader SciPy stack. Matplotlib.axis.Axis.set_transform() Function The Axis.set_transform() function 2 min read Like