diff --git a/ivy/__init__.py b/ivy/__init__.py index 1e828280504d4..52d73cf067b33 100644 --- a/ivy/__init__.py +++ b/ivy/__init__.py @@ -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 diff --git a/ivy_tests/test_ivy/test_misc/test_shape.py b/ivy_tests/test_ivy/test_misc/test_shape.py index e7ce71505161a..f20c34bb3a386 100644 --- a/ivy_tests/test_ivy/test_misc/test_shape.py +++ b/ivy_tests/test_ivy/test_misc/test_shape.py @@ -5,8 +5,6 @@ from ivy_tests.test_ivy.helpers import handle_method -CLASS_TREE = "ivy.Shape" - @handle_method( method_tree="Shape.__add__", @@ -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")), @@ -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={},