(args: IsCloseArgs, vm: &VirtualMachine)
| 159 | |
| 160 | #[pyfunction] |
| 161 | fn isclose(args: IsCloseArgs, vm: &VirtualMachine) -> PyResult<bool> { |
| 162 | let a = args.a.into_complex(); |
| 163 | let b = args.b.into_complex(); |
| 164 | let rel_tol = args.rel_tol.into_option().map(|v| v.into_float()); |
| 165 | let abs_tol = args.abs_tol.into_option().map(|v| v.into_float()); |
| 166 | |
| 167 | pymath::cmath::isclose(a, b, rel_tol, abs_tol) |
| 168 | .map_err(|_| vm.new_value_error("tolerances must be non-negative")) |
| 169 | } |
| 170 | } |
nothing calls this directly
no test coverage detected