Skip to content

Commit 029f442

Browse files
author
Sandeep P
committed
pandas-dev#26101 - made changes under check_less_precise
1 parent 6767ec1 commit 029f442

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

pandas/util/testing.py

+12-11
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,12 @@ def assert_series_equal(left, right, check_dtype=True,
990990
Specify comparison precision. Only used when check_exact is False.
991991
5 digits (False) or 3 digits (True) after decimal points are compared.
992992
If int, then specify the digits to compare.
993+
994+
When comparing two numbers, if the first number has magnitude less
995+
than 1e-5, we compare the two numbers directly and check whether
996+
they are equivalent within the specified precision. Otherwise, we
997+
compare the **ratio** of the second number to the first number and
998+
check whether it is equivalent to 1 within the specified precision.
993999
check_names : bool, default True
9941000
Whether to check the Series and Index names attribute.
9951001
check_exact : bool, default False
@@ -1001,12 +1007,6 @@ def assert_series_equal(left, right, check_dtype=True,
10011007
obj : str, default 'Series'
10021008
Specify object name being compared, internally used to show appropriate
10031009
assertion message.
1004-
1005-
When comparing two numbers, if the first number has magnitude less
1006-
than 1e-5, we compare the two numbers directly and check whether
1007-
they are equivalent within the specified precision. Otherwise, we
1008-
compare the **ratio** of the second number to the first number and
1009-
check whether it is equivalent to 1 within the specified precision.
10101010
"""
10111011
__tracebackhide__ = True
10121012

@@ -1137,6 +1137,12 @@ def assert_frame_equal(left, right, check_dtype=True,
11371137
Specify comparison precision. Only used when check_exact is False.
11381138
5 digits (False) or 3 digits (True) after decimal points are compared.
11391139
If int, then specify the digits to compare.
1140+
1141+
When comparing two numbers, if the first number has magnitude less
1142+
than 1e-5, we compare the two numbers directly and check whether
1143+
they are equivalent within the specified precision. Otherwise, we
1144+
compare the **ratio** of the second number to the first number and
1145+
check whether it is equivalent to 1 within the specified precision.
11401146
check_names : bool, default True
11411147
Whether to check that the `names` attribute for both the `index`
11421148
and `column` attributes of the DataFrame is identical, i.e.
@@ -1160,11 +1166,6 @@ def assert_frame_equal(left, right, check_dtype=True,
11601166
Specify object name being compared, internally used to show appropriate
11611167
assertion message.
11621168
1163-
When comparing two numbers, if the first number has magnitude less
1164-
than 1e-5, we compare the two numbers directly and check whether
1165-
they are equivalent within the specified precision. Otherwise, we
1166-
compare the **ratio** of the second number to the first number and
1167-
check whether it is equivalent to 1 within the specified precision.
11681169
11691170
See Also
11701171
--------

0 commit comments

Comments
 (0)