|
1 | 1 | #!/usr/bin/env python3 |
2 | 2 | # -*- coding: utf-8 -*- |
3 | 3 | # |
4 | | -# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
| 4 | +# SPDX-FileCopyrightText: Copyright (c) 2022-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
5 | 5 | # SPDX-License-Identifier: Apache-2.0 |
6 | 6 | # |
7 | 7 | # Licensed under the Apache License, Version 2.0 (the "License"); |
@@ -179,14 +179,12 @@ def rowEqual(row1, row2, epsilon, is_q78, q78_problematic_col): |
179 | 179 | problematic_val_row2 = row2.pop(q78_problematic_col-1) |
180 | 180 | problematic_val_eq = False |
181 | 181 | # this value could be none in some rows |
182 | | - if all([problematic_val_row1, problematic_val_row2]): |
| 182 | + if problematic_val_row1 is not None and problematic_val_row2 is not None: |
183 | 183 | # this value is rounded to its pencentile: round(ss_qty/(coalesce(ws_qty,0)+coalesce(cs_qty,0)),2) |
184 | 184 | # so we allow the diff <= 0.01 + default epsilon 0.00001 |
185 | 185 | problematic_val_eq = abs(problematic_val_row1 - problematic_val_row2) <= 0.01001 |
186 | | - elif problematic_val_row1 == None and problematic_val_row2 == None: |
187 | | - problematic_val_eq = True |
188 | 186 | else: |
189 | | - problematic_val_eq = False |
| 187 | + problematic_val_eq = problematic_val_row1 is None and problematic_val_row2 is None |
190 | 188 | return problematic_val_eq and all([compare(lhs, rhs, epsilon) for lhs, rhs in zip(row1, row2)]) |
191 | 189 | else: |
192 | 190 | return all([compare(lhs, rhs, epsilon) for lhs, rhs in zip(row1, row2)]) |
|
0 commit comments