array_utils#

This module provides functions to remap the values of an array from one range to another. It is essentially a fronted to optimized Cython functions.

The function remap_array_ranges is the main function of this module. It takes as input the source array, the new array, the source ranges, and the new ranges and returns the remapped array.

dtype_range(arr)[source]#

Return (min,max) that the dtype could hold.

Parameters:

arr (array_like) – The array whose dtype is to be checked.

Returns

min, maxtuple

The minimum and maximum values that the dtype could hold.

remap_array_ranges(src_array, new_array, src_ranges, new_ranges)[source]#