NumericHelper
Helper to manipulate numerics
Functions
Check if value is float
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
value | Any |
Return type:
bool |
Check if value is int
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
value | Any |
Return type:
bool |
Convert a list of list of any to list of list of float. Replace infinity by default_value
if True they are removed
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
list_2d | List | _description_ [list[any]] | |
remove_none | bool | False | If false, the non converted element are keep as none, list[any] |
default_value | Any |
Return type:
List |
Convert a list of any to list of float. Replace infinity by default_value
if True they are removed
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
list_ | List | _description_ [any] | |
remove_none | bool | False | If false, the non converted element are keep as none, list[any] |
default_value | Any |
Return type:
List |
Convert a list of any to list of int. if True they are removed
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
list_ | List | _description_ [any] | |
remove_none | bool | False | If false, the non converted element are keep as none, list[any] |
Return type:
List |
Convert any to float. If NaN, inf or not convertible to float, returns default_value
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
value | Any | ||
default_value | Any |
Return type:
Optional |
Convert any to int. If not convertible to int or NaN, returns None
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
value | Any | ||
default_value | Any |
Return type:
Optional |