Skip to content

Commit

Permalink
Revert "fix: Shape.__bool__ method tests" (#28231)
Browse files Browse the repository at this point in the history
  • Loading branch information
fnhirwa authored Feb 9, 2024
1 parent cd17340 commit e845510
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ivy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def __rmul__(self, other):
return self

def __bool__(self):
return self._shape[0].__bool__()
return self._shape.__bool__()

def __div__(self, other):
return self._shape // other
Expand Down
5 changes: 1 addition & 4 deletions ivy_tests/test_ivy/test_misc/test_shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

from ivy_tests.test_ivy.helpers import handle_method

CLASS_TREE = "ivy.Shape"


@handle_method(
method_tree="Shape.__add__",
Expand Down Expand Up @@ -46,7 +44,6 @@ def test_shape__add__(


@handle_method(
init_tree=CLASS_TREE,
method_tree="Shape.__bool__",
dtype_and_x=helpers.dtype_and_values(
available_dtypes=st.one_of(st.just(("bool",)), helpers.get_dtypes("integer")),
Expand All @@ -72,7 +69,7 @@ def test_shape__bool__(
backend_to_test=backend_fw,
init_flags=init_flags,
method_flags=method_flags,
init_all_as_kwargs_np={"shape_tup": (x[0],)},
init_all_as_kwargs_np={"data": x[0]},
init_input_dtypes=dtype,
method_input_dtypes=[],
method_all_as_kwargs_np={},
Expand Down

0 comments on commit e845510

Please sign in to comment.