maybe_cast_to_integer_array(arr: 'list | np.ndarray', dtype: 'np.dtype', copy: 'bool' = False) -> 'np.ndarray'
The array to cast.
The integer dtype to cast the array to.
Whether to make a copy of the array before returning.
Array of integer or unsigned integer dtype.
Takes any dtype and returns the casted version, raising for when data is incompatible with integer/unsigned integer dtypes.
If you try to coerce negative values to unsigned integers, it raises:
This example is valid syntax, but we were not able to check execution>>> pd.Series([-1], dtype="uint64") Traceback (most recent call last): ... OverflowError: Trying to coerce negative values to unsigned integers
Also, if you try to coerce float values to integers, it raises:
This example is valid syntax, but we were not able to check execution>>> pd.Series([1, 2, 3.5], dtype="int64") Traceback (most recent call last): ... ValueError: Trying to coerce float values to integersSee :
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them