assert_almost_equal(left, right, check_dtype: 'bool | str' = 'equiv', check_less_precise: 'bool | int | NoDefault' = <no_default>, rtol: 'float' = 1e-05, atol: 'float' = 1e-08, **kwargs)
By approximately equal, we refer to objects that are numbers or that contain numbers which may be equivalent to specific levels of precision.
Check dtype if both a and b are the same type. If 'equiv' is passed in, then RangeIndex
and Int64Index
are also considered equivalent when doing type checking.
Specify comparison precision. 5 digits (False) or 3 digits (True) after decimal points are compared. If int, then specify the number of digits to compare.
When comparing two numbers, if the first number has magnitude less than 1e-5, we compare the two numbers directly and check whether they are equivalent within the specified precision. Otherwise, we compare the ratio of the second number to the first number and check whether it is equivalent to 1 within the specified precision.
Use :None:None:`rtol`
and :None:None:`atol`
instead to define relative/absolute tolerance, respectively. Similar to :None:func:`math.isclose`
.
Relative tolerance.
Absolute tolerance.
Check that the left and right objects are approximately equal.
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