eogrow.utils.general
A module containing general utilities that haven’t been sorted in any other module
- eogrow.utils.general.jsonify(param)[source]
Transforms an object into a normal string.
- Parameters:
param (object) –
- Return type:
str | list
- eogrow.utils.general.convert_to_int(values, raise_diff, error=1e-08)[source]
Converts an array of floats into array of integers.
- Parameters:
values (ndarray) – An array of float values to be converted.
raise_diff (bool) – Raise an error if float values differ from integer values for more than the expected error.
error (float) – A joined maximal expected numerical error.
- Return type:
ndarray
- eogrow.utils.general.convert_bbox_coords_to_int(bbox, error=1e-08)[source]
Converts bounding box coordinates to integers by removing numerical errors. If the difference is larger than a numerical error it raises an error.
- Parameters:
bbox (BBox) –
error (float) –
- Return type:
BBox