kwave.utils.data module#
- get_smallest_possible_type(max_array_val, target_type_group, default=None)[source]#
Returns the smallest possible type for the given array. :param max_array_val: The maximum value in the array. :param target_type_group: The type group to search for the smallest possible type. :param default: The default type to return if no type is found.
- Returns:
The smallest possible type for the given array.
- Parameters:
max_array_val (int | float | complex | number | Vector) –
target_type_group (str) –
default (str | None) –
- Return type:
str | None
- intmax(dtype)[source]#
Returns the maximum value for the given integer type.
- Parameters:
dtype (str) – The integer type.
- Return type:
int
- Returns
The maximum value for the given integer type.