pandas 1.4.2

ParametersRaisesReturns
checked_add_with_arr(arr: 'np.ndarray', b, arr_mask: 'npt.NDArray[np.bool_] | None' = None, b_mask: 'npt.NDArray[np.bool_] | None' = None) -> 'np.ndarray'

Performs the addition of an int64 array and an int64 integer (or array) but checks that they do not result in overflow first. For elements that are indicated to be NaN, whether or not there is overflow for that element is automatically ignored.

Parameters

arr : array addend.
b : array or scalar addend.
arr_mask : np.ndarray[bool] or None, default None

array indicating which elements to exclude from checking

b_mask : np.ndarray[bool] or None, default None

array or scalar indicating which element(s) to exclude from checking

Raises

OverflowError if any x + y exceeds the maximum or minimum int64 value.

Returns

sum : An array for elements x + b for each element x in arr if b is

a scalar or an array for elements x + y for each element pair (x, y) in (arr, b).

Perform array addition that checks for underflow and overflow.

Examples

See :

Local connectivity graph

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


File: /pandas/core/algorithms.py#1032
type: <class 'function'>
Commit: