Skip to content

Commit 03dda17

Browse files
committed
updated the documentation of the compare() function (see commit 48c0c3a32474a09341a91a62087d47bc915a54cb from the larray-editor project)
1 parent 40c8dd9 commit 03dda17

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

larray/viewer/__init__.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,24 @@ def compare(*args, **kwargs):
9090
namespace which correspond to the passed objects.
9191
depth : int, optional
9292
Stack depth where to look for variables. Defaults to 0 (where this function was called).
93+
display_caller_info: bool, optional
94+
Whether or not to display the filename and line number where the Editor has been called.
95+
Defaults to True.
96+
rtol : float or int, optional
97+
The relative tolerance parameter (see Notes). Defaults to 0.
98+
atol : float or int, optional
99+
The absolute tolerance parameter (see Notes). Defaults to 0.
100+
nans_equal : boolean, optional
101+
Whether or not to consider NaN values at the same positions in the two arrays as equal.
102+
By default, an array containing NaN values is never equal to another array, even if that other array
103+
also contains NaN values at the same positions. The reason is that a NaN value is different from
104+
*anything*, including itself. Defaults to True.
105+
106+
Notes
107+
-----
108+
For finite values, the following equation is used to test whether two values are equal:
109+
110+
absolute(array1 - array2) <= (atol + rtol * absolute(array2))
93111
94112
Examples
95113
--------

0 commit comments

Comments
 (0)