Skip to content

Commit c950532

Browse files
committed
fix: test_torch_div
1 parent 1e3ad7a commit c950532

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6087,11 +6087,13 @@ def test_torch_dim(
60876087
init_tree="torch.tensor",
60886088
method_name="div",
60896089
dtype_and_x=helpers.dtype_and_values(
6090-
available_dtypes=helpers.get_dtypes("numeric"),
6090+
available_dtypes=helpers.get_dtypes("float_and_complex"),
60916091
num_arrays=2,
60926092
large_abs_safety_factor=2.5,
60936093
small_abs_safety_factor=2.5,
60946094
safety_factor_scale="log",
6095+
min_value=-1e04,
6096+
max_value=1e04,
60956097
),
60966098
rounding_mode=st.sampled_from(["floor", "trunc"]) | st.none(),
60976099
)
@@ -6106,7 +6108,7 @@ def test_torch_div(
61066108
backend_fw,
61076109
):
61086110
input_dtype, x = dtype_and_x
6109-
assume(not np.any(np.isclose(x[1], 0)))
6111+
assume(not np.any(np.isclose(x[1], 0, atol=1e-06)))
61106112

61116113
helpers.test_frontend_method(
61126114
init_input_dtypes=input_dtype,

0 commit comments

Comments
 (0)