py_tools_ds.numeric package¶
Submodules¶
py_tools_ds.numeric.array module¶
- py_tools_ds.numeric.array.get_array_tilebounds(array_shape: Iterable, tile_shape: Iterable) List[List[tuple]] [source]¶
Calculate row/col bounds for image tiles according to the given parameters.
- Parameters
array_shape – dimensions of array to be tiled: (rows, columns, bands) or (rows, columns)
tile_shape – dimensions of target tile: (rows, columns, bands) or (rows, columns)
py_tools_ds.numeric.numbers module¶
py_tools_ds.numeric.vector module¶
- py_tools_ds.numeric.vector.find_nearest(array: Iterable, value: float, roundAlg: str = 'auto', extrapolate: bool = False, exclude_val: bool = False, tolerance: float = 0) float [source]¶
Find the value of an array nearest to a another single value.
NOTE: In case of extrapolation an EQUALLY INCREMENTED array (like a coordinate grid) is assumed!
- Parameters
array – array or list of numbers
value – a number
roundAlg – <str> ‘auto’, ‘on’, ‘off’
extrapolate – extrapolate the given array if the given value is outside the array
exclude_val – exclude the given value from possible return values
tolerance – tolerance (with array = [10, 20, 30] and value=19.9 and roundAlg=’off’ and tolerance=0.1, 20 is returned)