============================= test session starts ==============================
platform linux -- Python 3.10.12, pytest-7.1.2, pluggy-1.6.0
rootdir: /workspace/minitorch, configfile: setup.cfg
plugins: metadata-3.1.1, env-0.6.2, hypothesis-6.54.0, anyio-4.13.0, cov-7.1.0, json-report-1.5.0
collected 185 items

tests/test_autodiff.py ........                                          [  4%]
tests/test_conv.py FFFFFFF                                               [  8%]
tests/test_module.py ...x..                                              [ 11%]
tests/test_modules.py ..                                                 [ 12%]
tests/test_nn.py FFFFFF                                                  [ 15%]
tests/test_operators.py .............F...................                [ 33%]
tests/test_scalar.py .F........FFFF.....FF.FFFFFFF.FF                    [ 50%]
tests/test_tensor.py .FFFFFFFFFFFFFFFFFFFFFFFFFFFFFsFFFFFF.FFxxFFFF      [ 75%]
tests/test_tensor_data.py .x....F                                        [ 79%]
tests/test_tensor_general.py .FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFsFFFFFF      [100%]

=================================== FAILURES ===================================
______________________________ test_conv1d_simple ______________________________

    @pytest.mark.task4_1
    def test_conv1d_simple() -> None:
>       t = minitorch.tensor([0, 1, 2, 3]).view(1, 1, 4)

tests/test_conv.py:12: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
minitorch/tensor.py:195: in view
    return View.apply(self, tensor(list(shape), backend=self.backend))
minitorch/tensor_functions.py:42: in apply
    c = cls.forward(ctx, *vals)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=((4,),)), a = [0.0, 1.0, 2.0, 3.0]
shape = [1.0, 1.0, 4.0]

    @staticmethod
    def forward(ctx: Context, a: 'Tensor', shape: 'Tensor') -> 'Tensor':
        shape_tuple = tuple(int(shape[i]) for i in range(shape.dims))
        ctx.save_for_backward(a.shape)
>       assert a._tensor.size == int(operators.prod(shape_tuple))
E       AssertionError

minitorch/tensor_functions.py:201: AssertionError
_________________________________ test_conv1d __________________________________

    @pytest.mark.task4_1
>   @given(tensors(shape=(1, 1, 6)), tensors(shape=(1, 1, 4)))
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_conv.py:24: ExceptionGroup
----------------------------- Captured stdout call -----------------------------
[[[-1.175494351e-38]], [[1e-05]], [[-2.2250738585e-313]], [[-0.99999]], [[1.175494351e-38]], [[-77.04381454677538]]] [[[0.99999]], [[0.0]], [[-5.960464477539063e-08]], [[-0.99999]], [[0.3333333333333333]], [[0.0]]] [[[0.99999]], [[0.0]], [[-5.960464477539063e-08]], [[-0.99999]], [[0.3333333333333333]], [[0.0]]] [[[2.343750000000001]], [[81.42128028230245]], [[2.00001]], [[-2.2250738585e-313]], [[-1.175494351e-38]], [[1.5]]] [[[-0.99999]], [[2.225073858507203e-309]], [[-2.2250738585e-313]], [[-1.175494351e-38]]]
[[[2.343750000000001]], [[81.42128028230245]], [[2.00001]], [[-2.2250738585e-313]], [[-1.175494351e-38]], [[1.5]]] [[[-1.175494351e-38]], [[2.225073858507203e-309]], [[-2.2250738585e-313]], [[-1.175494351e-38]]]
[[[2.343750000000001]], [[81.42128028230245]], [[2.00001]], [[-2.2250738585e-313]], [[-1.175494351e-38]], [[1.5]]] [[[-1.175494351e-38]], [[2.225073858507203e-309]], [[-2.2250738585e-313]], [[-1.175494351e-38]]]
[[[2.343750000000001]], [[81.42128028230245]], [[2.00001]], [[-2.2250738585e-313]], [[-1.175494351e-38]], [[1.5]]] [[[-1.175494351e-38]], [[2.225073858507203e-309]], [[-2.2250738585e-313]], [[-1.175494351e-38]]]
[[[81.42128028230245]], [[2.343750000000001]], [[1.5]], [[2.00001]], [[-1.175494351e-38]], [[-2.2250738585e-313]]] [[[-1.175494351e-38]], [[2.225073858507203e-309]], [[-2.2250738585e-313]], [[-1.175494351e-38]]]
[[[81.42128028230245]], [[2.343750000000001]], [[1.5]], [[2.00001]], [[-1.175494351e-38]], [[-2.2250738585e-313]]] [[[81.42128028230245]], [[2.343750000000001]], [[1.5]], [[2.00001]], [[-1.175494351e-38]], [[-2.2250738585e-313]]] [[[2.225073858507203e-309]], [[-1.175494351e-38]], [[-1.175494351e-38]], [[-2.2250738585e-313]]]
[[[81.42128028230245]], [[2.343750000000001]], [[1.5]], [[2.00001]], [[-1.175494351e-38]], [[-2.2250738585e-313]]] [[[81.42128028230245]], [[2.0]], [[1.5]], [[2.00001]], [[-1.175494351e-38]], [[-2.2250738585e-313]]] [[[2.225073858507203e-309]], [[-1.175494351e-38]], [[-1.175494351e-38]], [[-2.2250738585e-313]]]
[[[81.42128028230245]], [[0.0]], [[1.5]], [[2.00001]], [[-1.175494351e-38]], [[-2.2250738585e-313]]] [[[2.225073858507203e-309]], [[-1.175494351e-38]], [[-1.175494351e-38]], [[-2.2250738585e-313]]]
[[[81.0]], [[0.0]], [[1.5]], [[2.00001]], [[-1.175494351e-38]], [[-2.2250738585e-313]]] [[[2.225073858507203e-309]], [[-1.175494351e-38]], [[-1.175494351e-38]], [[-2.2250738585e-313]]]
[[[0.0]], [[0.0]], [[1.5]], [[2.00001]], [[-1.175494351e-38]], [[-2.2250738585e-313]]] [[[2.225073858507203e-309]], [[-1.175494351e-38]], [[-1.175494351e-38]], [[-2.2250738585e-313]]]
[[[0.0]], [[0.0]], [[1.5]], [[2.00001]], [[-1.175494351e-38]], [[-2.2250738585e-313]]] [[[2.225073858507203e-309]], [[-1.175494351e-38]], [[-1.175494351e-38]], [[-2.2250738585e-313]]]
[[[0.0]], [[0.0]], [[1.5]], [[2.00001]], [[-1.175494351e-38]], [[-2.2250738585e-313]]] [[[2.225073858507203e-309]], [[-1.175494351e-38]], [[-1.175494351e-38]], [[-2.2250738585e-313]]]
[[[0.0]], [[0.0]], [[1.5]], [[2.00001]], [[1.175494351e-38]], [[2.2250738585e-313]]] [[[2.225073858507203e-309]], [[1.175494351e-38]], [[1.175494351e-38]], [[2.2250738585e-313]]]
[[[0.0]], [[0.0]], [[1.5]], [[2.00001]], [[1.175494351e-38]], [[0.0]]] [[[2.225073858507203e-309]], [[1.175494351e-38]], [[1.175494351e-38]], [[0.0]]]
[[[0.0]], [[0.0]], [[1.5]], [[2.00001]], [[0.0]], [[0.0]]] [[[2.225073858507203e-309]], [[0.0]], [[0.0]], [[0.0]]]
[[[0.0]], [[0.0]], [[1.5]], [[0.0]], [[0.0]], [[0.0]]] [[[2.225073858507203e-309]], [[0.0]], [[0.0]], [[0.0]]]
[[[0.0]], [[0.0]], [[1.5]], [[0.0]], [[0.0]], [[0.0]]] [[[2.225073858507203e-309]], [[0.0]], [[0.0]], [[0.0]]]
[[[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]]] [[[2.225073858507203e-309]], [[0.0]], [[0.0]], [[0.0]]]
[[[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]]] [[[2.225073858507203e-309]], [[0.0]], [[0.0]], [[0.0]]]
[[[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]]] [[[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]]] [[[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]]] [[[0.0]], [[0.0]], [[0.0]], [[0.0]]]
[[[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]]] [[[0.0]], [[0.0]], [[0.0]], [[0.0]]]
[[[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]]] [[[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]]] [[[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]]] [[[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]]] [[[0.0]], [[0.0]], [[0.0]], [[0.0]]]
[[[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]]] [[[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]]] [[[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]]] [[[0.0]], [[0.0]], [[0.0]], [[0.0]]]
[[[-0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]]] [[[0.0]], [[1.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]]] [[[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]]] [[[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]], [[0.0]]] [[[0.0]], [[0.0]], [[0.0]], [[0.0]]]
_____________________________ test_conv1d_channel ______________________________

    @pytest.mark.task4_1
>   @given(tensors(shape=(2, 2, 6)), tensors(shape=(3, 2, 2)))

tests/test_conv.py:31: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
minitorch/tensor.py:205: in __repr__
    return self._tensor.to_string()
minitorch/tensor_data.py:183: in to_string
    return helper(self.shape, 0)
minitorch/tensor_data.py:182: in helper
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in <genexpr>
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in helper
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in <genexpr>
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:180: in helper
    return '[' + ', '.join(helper((), offset + i * self._strides[-1]) for i in range(inner)) + ']'
minitorch/tensor_data.py:180: in <genexpr>
    return '[' + ', '.join(helper((), offset + i * self._strides[-1]) for i in range(inner)) + ']'
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

shape = (), offset = 24

    def helper(shape: Tuple[int, ...], offset: int) -> str:
        if len(shape) == 0:
>           return str(self._storage[offset])
E           IndexError: index 24 is out of bounds for axis 0 with size 24

minitorch/tensor_data.py:176: IndexError
__________________________________ test_conv ___________________________________

    @pytest.mark.task4_2
>   @given(tensors(shape=(1, 1, 6, 6)), tensors(shape=(1, 1, 2, 4)))

tests/test_conv.py:38: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
minitorch/tensor.py:205: in __repr__
    return self._tensor.to_string()
minitorch/tensor_data.py:183: in to_string
    return helper(self.shape, 0)
minitorch/tensor_data.py:182: in helper
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in <genexpr>
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in helper
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in <genexpr>
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in helper
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in <genexpr>
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:180: in helper
    return '[' + ', '.join(helper((), offset + i * self._strides[-1]) for i in range(inner)) + ']'
minitorch/tensor_data.py:180: in <genexpr>
    return '[' + ', '.join(helper((), offset + i * self._strides[-1]) for i in range(inner)) + ']'
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

shape = (), offset = 36

    def helper(shape: Tuple[int, ...], offset: int) -> str:
        if len(shape) == 0:
>           return str(self._storage[offset])
E           IndexError: index 36 is out of bounds for axis 0 with size 36

minitorch/tensor_data.py:176: IndexError
_______________________________ test_conv_batch ________________________________

    @pytest.mark.task4_2
>   @given(tensors(shape=(2, 1, 6, 6)), tensors(shape=(1, 1, 2, 4)))

tests/test_conv.py:44: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
minitorch/tensor.py:205: in __repr__
    return self._tensor.to_string()
minitorch/tensor_data.py:183: in to_string
    return helper(self.shape, 0)
minitorch/tensor_data.py:182: in helper
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in <genexpr>
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in helper
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in <genexpr>
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in helper
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in <genexpr>
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:180: in helper
    return '[' + ', '.join(helper((), offset + i * self._strides[-1]) for i in range(inner)) + ']'
minitorch/tensor_data.py:180: in <genexpr>
    return '[' + ', '.join(helper((), offset + i * self._strides[-1]) for i in range(inner)) + ']'
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

shape = (), offset = 72

    def helper(shape: Tuple[int, ...], offset: int) -> str:
        if len(shape) == 0:
>           return str(self._storage[offset])
E           IndexError: index 72 is out of bounds for axis 0 with size 72

minitorch/tensor_data.py:176: IndexError
______________________________ test_conv_channel _______________________________

    @pytest.mark.task4_2
>   @given(tensors(shape=(2, 2, 6, 6)), tensors(shape=(3, 2, 2, 4)))

tests/test_conv.py:51: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
minitorch/tensor.py:205: in __repr__
    return self._tensor.to_string()
minitorch/tensor_data.py:183: in to_string
    return helper(self.shape, 0)
minitorch/tensor_data.py:182: in helper
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in <genexpr>
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in helper
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in <genexpr>
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in helper
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in <genexpr>
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:180: in helper
    return '[' + ', '.join(helper((), offset + i * self._strides[-1]) for i in range(inner)) + ']'
minitorch/tensor_data.py:180: in <genexpr>
    return '[' + ', '.join(helper((), offset + i * self._strides[-1]) for i in range(inner)) + ']'
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

shape = (), offset = 144

    def helper(shape: Tuple[int, ...], offset: int) -> str:
        if len(shape) == 0:
>           return str(self._storage[offset])
E           IndexError: index 144 is out of bounds for axis 0 with size 144

minitorch/tensor_data.py:176: IndexError
__________________________________ test_conv2 __________________________________

    @pytest.mark.task4_2
    def test_conv2() -> None:
>       t = minitorch.tensor([[0, 1, 2, 3], [0, 1, 2, 3], [0, 1, 2, 3], [0, 1, 2, 3]]).view(
            1, 1, 4, 4
        )

tests/test_conv.py:59: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
minitorch/tensor.py:195: in view
    return View.apply(self, tensor(list(shape), backend=self.backend))
minitorch/tensor_functions.py:42: in apply
    c = cls.forward(ctx, *vals)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=((4, 4),))
a = [[0.0, 1.0, 2.0, 3.0], [0.0, 1.0, 2.0, 3.0], [0.0, 1.0, 2.0, 3.0], [0.0, 1.0, 2.0, 3.0]]
shape = [1.0, 1.0, 4.0, 4.0]

    @staticmethod
    def forward(ctx: Context, a: 'Tensor', shape: 'Tensor') -> 'Tensor':
        shape_tuple = tuple(int(shape[i]) for i in range(shape.dims))
        ctx.save_for_backward(a.shape)
>       assert a._tensor.size == int(operators.prod(shape_tuple))
E       AssertionError

minitorch/tensor_functions.py:201: AssertionError
___________________________________ test_avg ___________________________________

    @pytest.mark.task4_3
>   @given(tensors(shape=(1, 1, 4, 4)))

tests/test_nn.py:12: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
minitorch/tensor.py:205: in __repr__
    return self._tensor.to_string()
minitorch/tensor_data.py:183: in to_string
    return helper(self.shape, 0)
minitorch/tensor_data.py:182: in helper
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in <genexpr>
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in helper
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in <genexpr>
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in helper
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in <genexpr>
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:180: in helper
    return '[' + ', '.join(helper((), offset + i * self._strides[-1]) for i in range(inner)) + ']'
minitorch/tensor_data.py:180: in <genexpr>
    return '[' + ', '.join(helper((), offset + i * self._strides[-1]) for i in range(inner)) + ']'
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

shape = (), offset = 16

    def helper(shape: Tuple[int, ...], offset: int) -> str:
        if len(shape) == 0:
>           return str(self._storage[offset])
E           IndexError: index 16 is out of bounds for axis 0 with size 16

minitorch/tensor_data.py:176: IndexError
___________________________________ test_max ___________________________________

    @pytest.mark.task4_4
>   @given(tensors(shape=(2, 3, 4)))

tests/test_nn.py:32: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
minitorch/tensor.py:205: in __repr__
    return self._tensor.to_string()
minitorch/tensor_data.py:183: in to_string
    return helper(self.shape, 0)
minitorch/tensor_data.py:182: in helper
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in <genexpr>
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in helper
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in <genexpr>
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:180: in helper
    return '[' + ', '.join(helper((), offset + i * self._strides[-1]) for i in range(inner)) + ']'
minitorch/tensor_data.py:180: in <genexpr>
    return '[' + ', '.join(helper((), offset + i * self._strides[-1]) for i in range(inner)) + ']'
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

shape = (), offset = 24

    def helper(shape: Tuple[int, ...], offset: int) -> str:
        if len(shape) == 0:
>           return str(self._storage[offset])
E           IndexError: index 24 is out of bounds for axis 0 with size 24

minitorch/tensor_data.py:176: IndexError
________________________________ test_max_pool _________________________________

    @pytest.mark.task4_4
>   @given(tensors(shape=(1, 1, 4, 4)))
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_nn.py:39: ExceptionGroup
----------------------------- Captured stdout call -----------------------------
None
None
[[[[27.595776830817424]], [[37.90474518154864]], [[-0.5]], [[0.3333333333333333]]], [[[-99.0]], [[-2.2250738585072014e-308]], [[-1.175494351e-38]], [[1e-05]]], [[[64.93152929783218]], [[1.401298464324817e-45]], [[99.0]], [[0.99999]]], [[[-2.2250738585e-313]], [[100.0]], [[-5e-324]], [[1.1754943508222875e-38]]]]
None
None
None
None
None
[[[[2.2250738585072014e-308]], [[-2.2250738585e-313]], [[-0.5]], [[-0.3333333333333333]]], [[[-39.63780699979057]], [[6.103515625e-05]], [[-1.1]], [[-2.2250738585e-313]]], [[[1.5]], [[1.5]], [[-0.99999]], [[100.0]]], [[[-0.99999]], [[-2.00001]], [[2.2250738585072014e-308]], [[-99.16374779494012]]]]
None
[[[[2.2250738585072014e-308]], [[-2.2250738585e-313]], [[-0.5]], [[-0.3333333333333333]]], [[[-39.63780699979057]], [[6.103515625e-05]], [[-1.1]], [[-2.2250738585e-313]]], [[[1.5]], [[1.5]], [[-0.99999]], [[100.0]]], [[[-0.99999]], [[-2.00001]], [[2.2250738585072014e-308]], [[-99.16374779494012]]]]
None
[[[[-1e-05]], [[-2.2250738585e-313]], [[-1.401298464324817e-45]], [[100.0]]], [[[-2.2250738585e-313]], [[-1.401298464324817e-45]], [[100.0]], [[-1.1754943508222875e-38]]], [[[-1.401298464324817e-45]], [[100.0]], [[-1.1754943508222875e-38]], [[-1.9]]], [[[100.0]], [[-1.1754943508222875e-38]], [[-1.9]], [[1.192092896e-07]]]]
None
[[[[-2.220446049250313e-16]], [[5.960464477539063e-08]], [[1.9]], [[0.3333333333333333]]], [[[5.960464477539063e-08]], [[92.7081589735796]], [[-14.50335726645651]], [[2.00001]]], [[[-1.1]], [[1.1754943508222875e-38]], [[-100.0]], [[100.0]]], [[[1.1125369292536007e-308]], [[1.1754943508222875e-38]], [[-5.960464477539063e-08]], [[-6.103515625e-05]]]]
None
None
[[[[2.2250738585072014e-308]], [[-2.2250738585e-313]], [[-0.5]], [[-0.3333333333333333]]], [[[-39.63780699979057]], [[6.103515625e-05]], [[-1.1]], [[-2.2250738585e-313]]], [[[1.5]], [[1.5]], [[-0.99999]], [[100.0]]], [[[-0.99999]], [[-2.00001]], [[2.2250738585072014e-308]], [[-99.16374779494012]]]]
None
[[[[2.2250738585072014e-308]], [[-2.2250738585e-313]], [[-0.5]], [[-0.3333333333333333]]], [[[-39.63780699979057]], [[6.103515625e-05]], [[-1.1]], [[-2.2250738585e-313]]], [[[1.5]], [[1.5]], [[-0.99999]], [[100.0]]], [[[-0.99999]], [[-2.00001]], [[2.2250738585072014e-308]], [[-99.16374779494012]]]]
None
[[[[2.2250738585072014e-308]], [[-2.2250738585e-313]], [[-0.5]], [[-0.3333333333333333]]], [[[-2.2250738585e-313]], [[-0.5]], [[-0.3333333333333333]], [[-39.63780699979057]]], [[[-0.5]], [[-0.3333333333333333]], [[-39.63780699979057]], [[6.103515625e-05]]], [[[-0.3333333333333333]], [[-39.63780699979057]], [[6.103515625e-05]], [[-1.1]]]]
None
None
[[[[1.5]], [[1.5]], [[6.103515625e-05]], [[-39.63780699979057]]], [[[1.5]], [[6.103515625e-05]], [[-39.63780699979057]], [[-99.16374779494012]]], [[[6.103515625e-05]], [[-39.63780699979057]], [[-99.16374779494012]], [[2.2250738585072014e-308]]], [[[-39.63780699979057]], [[-99.16374779494012]], [[2.2250738585072014e-308]], [[2.2250738585072014e-308]]]]
None
None
[[[[1.5]], [[1.5]], [[6.103515625e-05]], [[-39.63780699979057]]], [[[1.5]], [[6.103515625e-05]], [[-39.63780699979057]], [[-99.0]]], [[[6.103515625e-05]], [[-39.63780699979057]], [[-99.0]], [[2.2250738585072014e-308]]], [[[-39.63780699979057]], [[-99.0]], [[2.2250738585072014e-308]], [[2.2250738585072014e-308]]]]
None
[[[[1.5]], [[1.5]], [[6.103515625e-05]], [[-39.63780699979057]]], [[[1.5]], [[6.103515625e-05]], [[-39.63780699979057]], [[-0.0]]], [[[6.103515625e-05]], [[-39.63780699979057]], [[-0.0]], [[2.2250738585072014e-308]]], [[[-39.63780699979057]], [[-0.0]], [[2.2250738585072014e-308]], [[2.2250738585072014e-308]]]]
None
[[[[1.5]], [[1.5]], [[6.103515625e-05]], [[-39.0]]], [[[1.5]], [[6.103515625e-05]], [[-39.0]], [[-0.0]]], [[[6.103515625e-05]], [[-39.0]], [[-0.0]], [[2.2250738585072014e-308]]], [[[-39.0]], [[-0.0]], [[2.2250738585072014e-308]], [[2.2250738585072014e-308]]]]
None
[[[[1.5]], [[1.5]], [[6.103515625e-05]], [[-0.0]]], [[[1.5]], [[6.103515625e-05]], [[-0.0]], [[-0.0]]], [[[6.103515625e-05]], [[-0.0]], [[-0.0]], [[2.2250738585072014e-308]]], [[[-0.0]], [[-0.0]], [[2.2250738585072014e-308]], [[2.2250738585072014e-308]]]]
None
[[[[1.5]], [[1.5]], [[6.103515625e-05]], [[-0.0]]], [[[1.5]], [[6.103515625e-05]], [[-0.0]], [[-0.0]]], [[[6.103515625e-05]], [[-0.0]], [[-0.0]], [[2.2250738585072014e-308]]], [[[-0.0]], [[-0.0]], [[2.2250738585072014e-308]], [[2.2250738585072014e-308]]]]
None
[[[[1.5]], [[1.5]], [[6.103515625e-05]], [[-0.0]]], [[[1.5]], [[6.103515625e-05]], [[-0.0]], [[-0.0]]], [[[6.103515625e-05]], [[-0.0]], [[-0.0]], [[2.2250738585072014e-308]]], [[[-0.0]], [[-0.0]], [[2.2250738585072014e-308]], [[2.2250738585072014e-308]]]]
None
[[[[1.5]], [[1.5]], [[6.103515625e-05]], [[-0.0]]], [[[1.5]], [[6.103515625e-05]], [[-0.0]], [[-0.0]]], [[[6.103515625e-05]], [[-0.0]], [[-0.0]], [[2.2250738585072014e-308]]], [[[-0.0]], [[-0.0]], [[2.2250738585072014e-308]], [[2.2250738585072014e-308]]]]
None
None
None
[[[[1.5]], [[1.5]], [[6.103515625e-05]], [[0.0]]], [[[1.5]], [[6.103515625e-05]], [[0.0]], [[0.0]]], [[[6.103515625e-05]], [[0.0]], [[0.0]], [[2.2250738585072014e-308]]], [[[0.0]], [[0.0]], [[2.2250738585072014e-308]], [[2.2250738585072014e-308]]]]
None
None
None
[[[[1.5]], [[1.5]], [[6.103515625e-05]], [[0.0]]], [[[1.5]], [[6.103515625e-05]], [[0.0]], [[0.0]]], [[[6.103515625e-05]], [[0.0]], [[0.0]], [[2.2250738585072014e-308]]], [[[0.0]], [[0.0]], [[2.2250738585072014e-308]], [[2.2250738585072014e-308]]]]
None
[[[[1.5]], [[1.5]], [[6.103515625e-05]], [[0.0]]], [[[1.5]], [[6.103515625e-05]], [[0.0]], [[0.0]]], [[[6.103515625e-05]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]]]
None
[[[[1.5]], [[1.5]], [[6.103515625e-05]], [[0.0]]], [[[1.5]], [[6.103515625e-05]], [[0.0]], [[0.0]]], [[[6.103515625e-05]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]]]
None
[[[[0.0]], [[0.0]], [[6.103515625e-05]], [[0.0]]], [[[0.0]], [[6.103515625e-05]], [[0.0]], [[0.0]]], [[[6.103515625e-05]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]]]
None
None
None
None
None
[[[[0.0]], [[0.0]], [[6.103515625e-05]], [[0.0]]], [[[0.0]], [[6.103515625e-05]], [[0.0]], [[0.0]]], [[[6.103515625e-05]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]]]
None
[[[[0.0]], [[0.0]], [[6.103515625e-05]], [[0.0]]], [[[0.0]], [[6.103515625e-05]], [[0.0]], [[0.0]]], [[[6.103515625e-05]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]]]
None
[[[[0.0]], [[0.0]], [[6.103515625e-05]], [[0.0]]], [[[0.0]], [[6.103515625e-05]], [[0.0]], [[0.0]]], [[[6.103515625e-05]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]]]
None
[[[[0.0]], [[0.0]], [[6.103515625e-05]], [[0.0]]], [[[0.0]], [[6.103515625e-05]], [[0.0]], [[0.0]]], [[[6.103515625e-05]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]]]
None
[[[[0.0]], [[0.0]], [[6.103515625e-05]], [[0.0]]], [[[0.0]], [[6.103515625e-05]], [[0.0]], [[0.0]]], [[[6.103515625e-05]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]]]
None
[[[[0.0]], [[0.0]], [[6.103515625e-05]], [[0.0]]], [[[0.0]], [[6.103515625e-05]], [[0.0]], [[0.0]]], [[[6.103515625e-05]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]]]
None
[[[[0.0]], [[0.0]], [[6.103515625e-05]], [[0.0]]], [[[0.0]], [[6.103515625e-05]], [[0.0]], [[0.0]]], [[[6.103515625e-05]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]]]
None
[[[[0.0]], [[0.0]], [[6.103515625e-05]], [[0.0]]], [[[0.0]], [[6.103515625e-05]], [[0.0]], [[0.0]]], [[[6.103515625e-05]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]]]
None
[[[[0.0]], [[0.0]], [[6.103515625e-05]], [[0.0]]], [[[0.0]], [[6.103515625e-05]], [[0.0]], [[0.0]]], [[[6.103515625e-05]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]]]
None
[[[[0.0]], [[0.0]], [[6.103515625e-05]], [[0.0]]], [[[0.0]], [[6.103515625e-05]], [[0.0]], [[0.0]]], [[[6.103515625e-05]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]]]
None
[[[[0.0]], [[0.0]], [[6.103515625e-05]], [[0.0]]], [[[0.0]], [[6.103515625e-05]], [[0.0]], [[0.0]]], [[[6.103515625e-05]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]]]
None
[[[[0.0]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]]]
None
[[[[0.0]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]]]
None
[[[[0.0]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]]]
None
[[[[0.0]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]]]
None
None
[[[[0.0]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]]]
None
None
[[[[0.0]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]], [[[0.0]], [[0.0]], [[0.0]], [[0.0]]]]
__________________________________ test_drop ___________________________________

    @pytest.mark.task4_4
>   @given(tensors())

tests/test_nn.py:60: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

t = [0.0]

    @pytest.mark.task4_4
    @given(tensors())
    def test_drop(t: Tensor) -> None:
        q = minitorch.dropout(t, 0.0)
>       idx = q._tensor.sample()
E       AttributeError: 'NoneType' object has no attribute '_tensor'
E       Falsifying example: test_drop(
E           t=[0.0],
E       )

tests/test_nn.py:63: AttributeError
_________________________________ test_softmax _________________________________

    @pytest.mark.task4_4
>   @given(tensors(shape=(1, 1, 4, 4)))

tests/test_nn.py:73: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
minitorch/tensor.py:205: in __repr__
    return self._tensor.to_string()
minitorch/tensor_data.py:183: in to_string
    return helper(self.shape, 0)
minitorch/tensor_data.py:182: in helper
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in <genexpr>
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in helper
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in <genexpr>
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in helper
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in <genexpr>
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:180: in helper
    return '[' + ', '.join(helper((), offset + i * self._strides[-1]) for i in range(inner)) + ']'
minitorch/tensor_data.py:180: in <genexpr>
    return '[' + ', '.join(helper((), offset + i * self._strides[-1]) for i in range(inner)) + ']'
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

shape = (), offset = 16

    def helper(shape: Tuple[int, ...], offset: int) -> str:
        if len(shape) == 0:
>           return str(self._storage[offset])
E           IndexError: index 16 is out of bounds for axis 0 with size 16

minitorch/tensor_data.py:176: IndexError
_______________________________ test_log_softmax _______________________________

    @pytest.mark.task4_4
>   @given(tensors(shape=(1, 1, 4, 4)))

tests/test_nn.py:87: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
minitorch/tensor.py:205: in __repr__
    return self._tensor.to_string()
minitorch/tensor_data.py:183: in to_string
    return helper(self.shape, 0)
minitorch/tensor_data.py:182: in helper
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in <genexpr>
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in helper
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in <genexpr>
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in helper
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in <genexpr>
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:180: in helper
    return '[' + ', '.join(helper((), offset + i * self._strides[-1]) for i in range(inner)) + ']'
minitorch/tensor_data.py:180: in <genexpr>
    return '[' + ', '.join(helper((), offset + i * self._strides[-1]) for i in range(inner)) + ']'
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

shape = (), offset = 16

    def helper(shape: Tuple[int, ...], offset: int) -> str:
        if len(shape) == 0:
>           return str(self._storage[offset])
E           IndexError: index 16 is out of bounds for axis 0 with size 16

minitorch/tensor_data.py:176: IndexError
_____________________________ test_sum_distribute ______________________________

    @pytest.mark.task0_3
>   @given(
        lists(small_floats, min_size=5, max_size=5),
        lists(small_floats, min_size=5, max_size=5),
    )

tests/test_operators.py:166: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ls1 = [0.0, 0.0, 0.0, 0.0, 0.0], ls2 = [0.0, 0.0, 0.0, 0.0, 0.0]

    @pytest.mark.task0_3
    @given(
        lists(small_floats, min_size=5, max_size=5),
        lists(small_floats, min_size=5, max_size=5),
    )
    def test_sum_distribute(ls1: List[float], ls2: List[float]) -> None:
        """
        Write a test that ensures that the sum of `ls1` plus the sum of `ls2`
        is the same as the sum of each element of `ls1` plus each element of `ls2`.
        """
        # TODO: Implement for Task 0.3.
>       raise NotImplementedError('Need to implement for Task 0.3')
E       NotImplementedError: Need to implement for Task 0.3
E       Falsifying example: test_sum_distribute(
E           ls2=[0.0, 0.0, 0.0, 0.0, 0.0], ls1=[0.0, 0.0, 0.0, 0.0, 0.0],
E       )

tests/test_operators.py:176: NotImplementedError
_________________________________ test_simple __________________________________

    @given(small_floats, small_floats)
>   def test_simple(a: float, b: float) -> None:

tests/test_scalar.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

a = 0.0, b = 0.0

    @given(small_floats, small_floats)
    def test_simple(a: float, b: float) -> None:
        # Simple add
        c = Scalar(a) + Scalar(b)
        assert_close(c.data, a + b)
    
        # Simple mul
        c = Scalar(a) * Scalar(b)
        assert_close(c.data, a * b)
    
        # Simple relu
>       c = Scalar(a).relu() + Scalar(b).relu()
E       AttributeError: 'Scalar' object has no attribute 'relu'
E       Falsifying example: test_simple(
E           b=0.0, a=0.0,
E       )

tests/test_scalar.py:65: AttributeError
______________________________ test_one_args[fn8] ______________________________

fn = ('sig', <function MathTest.sig at 0x7b83f6c453f0>, <function MathTestVariable.sig at 0x7b83f6c45cf0>)

    @given(small_scalars)
>   @pytest.mark.task1_2

tests/test_scalar.py:75: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_scalar.py:81: in test_one_args
    assert_close(scalar_fn(t1).data, base_fn(t1.data))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

a = Scalar(0.000000)

    @staticmethod
    def sig(a: 'minitorch.Scalar') -> 'minitorch.Scalar':
>       return a.sigmoid()
E       AttributeError: 'Scalar' object has no attribute 'sigmoid'
E       Falsifying example: test_one_args(
E           t1=Scalar(0.000000), fn=('sig', sig, sig),
E       )

minitorch/testing.py:140: AttributeError
______________________________ test_one_args[fn9] ______________________________

fn = ('log', <function MathTest.log at 0x7b83f6c45480>, <function MathTestVariable.log at 0x7b83f6c45d80>)

    @given(small_scalars)
>   @pytest.mark.task1_2

tests/test_scalar.py:75: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_scalar.py:81: in test_one_args
    assert_close(scalar_fn(t1).data, base_fn(t1.data))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

a = Scalar(0.000000)

    @staticmethod
    def log(a: 'minitorch.Scalar') -> 'minitorch.Scalar':
>       return (a + 100000).log()
E       AttributeError: 'Scalar' object has no attribute 'log'
E       Falsifying example: test_one_args(
E           t1=Scalar(0.000000), fn=('log', log, log),
E       )

minitorch/testing.py:144: AttributeError
_____________________________ test_one_args[fn10] ______________________________

fn = ('relu', <function MathTest.relu at 0x7b83f6c45510>, <function MathTestVariable.relu at 0x7b83f6c45e10>)

    @given(small_scalars)
>   @pytest.mark.task1_2

tests/test_scalar.py:75: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_scalar.py:81: in test_one_args
    assert_close(scalar_fn(t1).data, base_fn(t1.data))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

a = Scalar(0.000000)

    @staticmethod
    def relu(a: 'minitorch.Scalar') -> 'minitorch.Scalar':
>       return a.relu()
E       AttributeError: 'Scalar' object has no attribute 'relu'
E       Falsifying example: test_one_args(
E           t1=Scalar(0.000000), fn=('relu', relu, relu),
E       )

minitorch/testing.py:148: AttributeError
_____________________________ test_one_args[fn11] ______________________________

fn = ('exp', <function MathTest.exp at 0x7b83f6c455a0>, <function MathTestVariable.exp at 0x7b83f6c45ea0>)

    @given(small_scalars)
>   @pytest.mark.task1_2

tests/test_scalar.py:75: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_scalar.py:81: in test_one_args
    assert_close(scalar_fn(t1).data, base_fn(t1.data))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

a = Scalar(0.000000)

    @staticmethod
    def exp(a: 'minitorch.Scalar') -> 'minitorch.Scalar':
>       return (a - 200).exp()
E       AttributeError: 'Scalar' object has no attribute 'exp'
E       Falsifying example: test_one_args(
E           t1=Scalar(0.000000), fn=('exp', exp, exp),
E       )

minitorch/testing.py:152: AttributeError
___________________________ test_one_derivative[fn2] ___________________________

fn = ('square', <function MathTest.square at 0x7b83f6c45090>, <function MathTestVariable.square at 0x7b83f6c45990>)

    @given(small_scalars)
>   @pytest.mark.task1_4

tests/test_scalar.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_scalar.py:108: in test_one_derivative
    derivative_check(scalar_fn, t1)
minitorch/scalar.py:148: in derivative_check
    out.backward()
minitorch/scalar.py:135: in backward
    backpropagate(self, d_output)
minitorch/autodiff.py:87: in backpropagate
    for var, local_deriv in v.chain_rule(d):
minitorch/scalar.py:122: in chain_rule
    local_derivs = h.last_fn._backward(h.ctx, d_output)
minitorch/scalar_functions.py:37: in _backward
    return cls.backward(ctx, d_out)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=()), d_output = 1.0

    @staticmethod
    def backward(ctx: Context, d_output: float) -> Tuple[float, float]:
>       a, b = ctx.saved_values
E       ValueError: not enough values to unpack (expected 2, got 0)
E       Falsifying example: test_one_derivative(
E           t1=Scalar(0.000000), fn=('square', square, square),
E       )

minitorch/scalar_functions.py:92: ValueError
___________________________ test_one_derivative[fn3] ___________________________

fn = ('cube', <function MathTest.cube at 0x7b83f6c45120>, <function MathTestVariable.cube at 0x7b83f6c45a20>)

    @given(small_scalars)
>   @pytest.mark.task1_4

tests/test_scalar.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_scalar.py:108: in test_one_derivative
    derivative_check(scalar_fn, t1)
minitorch/scalar.py:148: in derivative_check
    out.backward()
minitorch/scalar.py:135: in backward
    backpropagate(self, d_output)
minitorch/autodiff.py:87: in backpropagate
    for var, local_deriv in v.chain_rule(d):
minitorch/scalar.py:122: in chain_rule
    local_derivs = h.last_fn._backward(h.ctx, d_output)
minitorch/scalar_functions.py:37: in _backward
    return cls.backward(ctx, d_out)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=()), d_output = 1.0

    @staticmethod
    def backward(ctx: Context, d_output: float) -> Tuple[float, float]:
>       a, b = ctx.saved_values
E       ValueError: not enough values to unpack (expected 2, got 0)
E       Falsifying example: test_one_derivative(
E           t1=Scalar(0.000000), fn=('cube', cube, cube),
E       )

minitorch/scalar_functions.py:92: ValueError
___________________________ test_one_derivative[fn5] ___________________________

fn = ('multConstant', <function MathTest.multConstant at 0x7b83f6c45240>, <function MathTestVariable.multConstant at 0x7b83f6c45b40>)

    @given(small_scalars)
>   @pytest.mark.task1_4

tests/test_scalar.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_scalar.py:108: in test_one_derivative
    derivative_check(scalar_fn, t1)
minitorch/scalar.py:148: in derivative_check
    out.backward()
minitorch/scalar.py:135: in backward
    backpropagate(self, d_output)
minitorch/autodiff.py:87: in backpropagate
    for var, local_deriv in v.chain_rule(d):
minitorch/scalar.py:122: in chain_rule
    local_derivs = h.last_fn._backward(h.ctx, d_output)
minitorch/scalar_functions.py:37: in _backward
    return cls.backward(ctx, d_out)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=()), d_output = 1.0

    @staticmethod
    def backward(ctx: Context, d_output: float) -> Tuple[float, float]:
>       a, b = ctx.saved_values
E       ValueError: not enough values to unpack (expected 2, got 0)
E       Falsifying example: test_one_derivative(
E           t1=Scalar(0.000000), fn=('multConstant', multConstant, multConstant),
E       )

minitorch/scalar_functions.py:92: ValueError
___________________________ test_one_derivative[fn6] ___________________________

fn = ('div', <function MathTest.div at 0x7b83f6c452d0>, <function MathTestVariable.div at 0x7b83f6c45bd0>)

    @given(small_scalars)
>   @pytest.mark.task1_4

tests/test_scalar.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_scalar.py:108: in test_one_derivative
    derivative_check(scalar_fn, t1)
minitorch/scalar.py:148: in derivative_check
    out.backward()
minitorch/scalar.py:135: in backward
    backpropagate(self, d_output)
minitorch/autodiff.py:87: in backpropagate
    for var, local_deriv in v.chain_rule(d):
minitorch/scalar.py:122: in chain_rule
    local_derivs = h.last_fn._backward(h.ctx, d_output)
minitorch/scalar_functions.py:37: in _backward
    return cls.backward(ctx, d_out)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=()), d_output = 1.0

    @staticmethod
    def backward(ctx: Context, d_output: float) -> Tuple[float, float]:
>       a, b = ctx.saved_values
E       ValueError: not enough values to unpack (expected 2, got 0)
E       Falsifying example: test_one_derivative(
E           t1=Scalar(0.000000), fn=('div', div, div),
E       )

minitorch/scalar_functions.py:92: ValueError
___________________________ test_one_derivative[fn7] ___________________________

fn = ('inv', <function MathTest.inv at 0x7b83f6c45360>, <function MathTestVariable.inv at 0x7b83f6c45c60>)

    @given(small_scalars)
>   @pytest.mark.task1_4

tests/test_scalar.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_scalar.py:108: in test_one_derivative
    derivative_check(scalar_fn, t1)
minitorch/scalar.py:148: in derivative_check
    out.backward()
minitorch/scalar.py:135: in backward
    backpropagate(self, d_output)
minitorch/autodiff.py:87: in backpropagate
    for var, local_deriv in v.chain_rule(d):
minitorch/scalar.py:122: in chain_rule
    local_derivs = h.last_fn._backward(h.ctx, d_output)
minitorch/scalar_functions.py:37: in _backward
    return cls.backward(ctx, d_out)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=()), d_output = 1.0

    @staticmethod
    def backward(ctx: Context, d_output: float) -> Tuple[float, float]:
>       a, b = ctx.saved_values
E       ValueError: not enough values to unpack (expected 2, got 0)
E       Falsifying example: test_one_derivative(
E           t1=Scalar(0.000000), fn=('inv', inv, inv),
E       )

minitorch/scalar_functions.py:92: ValueError
___________________________ test_one_derivative[fn8] ___________________________

fn = ('sig', <function MathTest.sig at 0x7b83f6c453f0>, <function MathTestVariable.sig at 0x7b83f6c45cf0>)

    @given(small_scalars)
>   @pytest.mark.task1_4

tests/test_scalar.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_scalar.py:108: in test_one_derivative
    derivative_check(scalar_fn, t1)
minitorch/scalar.py:147: in derivative_check
    out = f(*scalars)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

a = Scalar(0.000000)

    @staticmethod
    def sig(a: 'minitorch.Scalar') -> 'minitorch.Scalar':
>       return a.sigmoid()
E       AttributeError: 'Scalar' object has no attribute 'sigmoid'
E       Falsifying example: test_one_derivative(
E           t1=Scalar(0.000000), fn=('sig', sig, sig),
E       )

minitorch/testing.py:140: AttributeError
___________________________ test_one_derivative[fn9] ___________________________

fn = ('log', <function MathTest.log at 0x7b83f6c45480>, <function MathTestVariable.log at 0x7b83f6c45d80>)

    @given(small_scalars)
>   @pytest.mark.task1_4

tests/test_scalar.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_scalar.py:108: in test_one_derivative
    derivative_check(scalar_fn, t1)
minitorch/scalar.py:147: in derivative_check
    out = f(*scalars)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

a = Scalar(0.000000)

    @staticmethod
    def log(a: 'minitorch.Scalar') -> 'minitorch.Scalar':
>       return (a + 100000).log()
E       AttributeError: 'Scalar' object has no attribute 'log'
E       Falsifying example: test_one_derivative(
E           t1=Scalar(0.000000), fn=('log', log, log),
E       )

minitorch/testing.py:144: AttributeError
__________________________ test_one_derivative[fn10] ___________________________

fn = ('relu', <function MathTest.relu at 0x7b83f6c45510>, <function MathTestVariable.relu at 0x7b83f6c45e10>)

    @given(small_scalars)
>   @pytest.mark.task1_4

tests/test_scalar.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_scalar.py:108: in test_one_derivative
    derivative_check(scalar_fn, t1)
minitorch/scalar.py:147: in derivative_check
    out = f(*scalars)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

a = Scalar(0.000000)

    @staticmethod
    def relu(a: 'minitorch.Scalar') -> 'minitorch.Scalar':
>       return a.relu()
E       AttributeError: 'Scalar' object has no attribute 'relu'
E       Falsifying example: test_one_derivative(
E           t1=Scalar(0.000000), fn=('relu', relu, relu),
E       )

minitorch/testing.py:148: AttributeError
__________________________ test_one_derivative[fn11] ___________________________

fn = ('exp', <function MathTest.exp at 0x7b83f6c455a0>, <function MathTestVariable.exp at 0x7b83f6c45ea0>)

    @given(small_scalars)
>   @pytest.mark.task1_4

tests/test_scalar.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_scalar.py:108: in test_one_derivative
    derivative_check(scalar_fn, t1)
minitorch/scalar.py:147: in derivative_check
    out = f(*scalars)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

a = Scalar(0.000000)

    @staticmethod
    def exp(a: 'minitorch.Scalar') -> 'minitorch.Scalar':
>       return (a - 200).exp()
E       AttributeError: 'Scalar' object has no attribute 'exp'
E       Falsifying example: test_one_derivative(
E           t1=Scalar(0.000000), fn=('exp', exp, exp),
E       )

minitorch/testing.py:152: AttributeError
___________________________ test_two_derivative[fn1] ___________________________

fn = ('mul2', <function MathTest.mul2 at 0x7b83f6c456c0>, <function MathTestVariable.mul2 at 0x7b83f6c45fc0>)

    @given(small_scalars, small_scalars)
>   @pytest.mark.task1_4

tests/test_scalar.py:112: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_scalar.py:120: in test_two_derivative
    derivative_check(scalar_fn, t1, t2)
minitorch/scalar.py:148: in derivative_check
    out.backward()
minitorch/scalar.py:135: in backward
    backpropagate(self, d_output)
minitorch/autodiff.py:87: in backpropagate
    for var, local_deriv in v.chain_rule(d):
minitorch/scalar.py:122: in chain_rule
    local_derivs = h.last_fn._backward(h.ctx, d_output)
minitorch/scalar_functions.py:37: in _backward
    return cls.backward(ctx, d_out)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=()), d_output = 1.0

    @staticmethod
    def backward(ctx: Context, d_output: float) -> Tuple[float, float]:
>       a, b = ctx.saved_values
E       ValueError: not enough values to unpack (expected 2, got 0)
E       Falsifying example: test_two_derivative(
E           t2=Scalar(0.000000), t1=Scalar(0.000000), fn=('mul2', mul2, mul2),
E       )

minitorch/scalar_functions.py:92: ValueError
___________________________ test_two_derivative[fn2] ___________________________

fn = ('div2', <function MathTest.div2 at 0x7b83f6c45750>, <function MathTestVariable.div2 at 0x7b83f6c46050>)

    @given(small_scalars, small_scalars)
>   @pytest.mark.task1_4

tests/test_scalar.py:112: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_scalar.py:120: in test_two_derivative
    derivative_check(scalar_fn, t1, t2)
minitorch/scalar.py:148: in derivative_check
    out.backward()
minitorch/scalar.py:135: in backward
    backpropagate(self, d_output)
minitorch/autodiff.py:87: in backpropagate
    for var, local_deriv in v.chain_rule(d):
minitorch/scalar.py:122: in chain_rule
    local_derivs = h.last_fn._backward(h.ctx, d_output)
minitorch/scalar_functions.py:37: in _backward
    return cls.backward(ctx, d_out)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=()), d_output = 1.0

    @staticmethod
    def backward(ctx: Context, d_output: float) -> Tuple[float, float]:
>       a, b = ctx.saved_values
E       ValueError: not enough values to unpack (expected 2, got 0)
E       Falsifying example: test_two_derivative(
E           t2=Scalar(0.000000), t1=Scalar(0.000000), fn=('div2', div2, div2),
E       )

minitorch/scalar_functions.py:92: ValueError
______________________________ test_one_args[fn0] ______________________________

fn = ('neg', <function MathTest.neg at 0x7b83f6c44f70>, <function MathTestVariable.neg at 0x7b83f6c45870>)

    @given(tensors())
>   @pytest.mark.task2_3
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor.py:24: ExceptionGroup
______________________________ test_one_args[fn1] ______________________________

fn = ('addConstant', <function MathTest.addConstant at 0x7b83f6c45000>, <function MathTestVariable.addConstant at 0x7b83f6c45900>)

    @given(tensors())
>   @pytest.mark.task2_3
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor.py:24: ExceptionGroup
______________________________ test_one_args[fn2] ______________________________

fn = ('square', <function MathTest.square at 0x7b83f6c45090>, <function MathTestVariable.square at 0x7b83f6c45990>)

    @given(tensors())
>   @pytest.mark.task2_3
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor.py:24: ExceptionGroup
______________________________ test_one_args[fn3] ______________________________

fn = ('cube', <function MathTest.cube at 0x7b83f6c45120>, <function MathTestVariable.cube at 0x7b83f6c45a20>)

    @given(tensors())
>   @pytest.mark.task2_3
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor.py:24: ExceptionGroup
______________________________ test_one_args[fn4] ______________________________

fn = ('subConstant', <function MathTest.subConstant at 0x7b83f6c451b0>, <function MathTestVariable.subConstant at 0x7b83f6c45ab0>)

    @given(tensors())
>   @pytest.mark.task2_3

tests/test_tensor.py:24: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor.py:31: in test_one_args
    t2 = tensor_fn(t1)
minitorch/testing.py:124: in subConstant
    return a - 5
minitorch/tensor.py:130: in __sub__
    return Add.apply(self, -self._ensure_tensor(b))
minitorch/tensor.py:155: in __neg__
    return Neg.apply(self)
minitorch/tensor_functions.py:42: in apply
    c = cls.forward(ctx, *vals)
minitorch/tensor_functions.py:51: in forward
    return t1.f.neg_map(t1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

a = [5.0], out = [0.0]

    def ret(a: 'Tensor', out: Optional['Tensor']=None) -> 'Tensor':
        if out is None:
            out = a.zeros(a.shape)
>       f(*out._tensor._tensor.strides, a.shape, a._tensor._tensor.strides, a._tensor._tensor._storage)
E       AttributeError: 'TensorData' object has no attribute '_tensor'
E       Falsifying example: test_one_args(
E           t1=[0.0], fn=('subConstant', subConstant, subConstant),
E       )

minitorch/tensor_ops.py:91: AttributeError
______________________________ test_one_args[fn5] ______________________________

fn = ('multConstant', <function MathTest.multConstant at 0x7b83f6c45240>, <function MathTestVariable.multConstant at 0x7b83f6c45b40>)

    @given(tensors())
>   @pytest.mark.task2_3
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor.py:24: ExceptionGroup
______________________________ test_one_args[fn6] ______________________________

fn = ('div', <function MathTest.div at 0x7b83f6c452d0>, <function MathTestVariable.div at 0x7b83f6c45bd0>)

    @given(tensors())
>   @pytest.mark.task2_3

tests/test_tensor.py:24: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor.py:31: in test_one_args
    t2 = tensor_fn(t1)
minitorch/testing.py:132: in div
    return a / 5
minitorch/tensor.py:136: in __truediv__
    return Mul.apply(self, Inv.apply(self._ensure_tensor(b)))
minitorch/tensor_functions.py:42: in apply
    c = cls.forward(ctx, *vals)
minitorch/tensor_functions.py:61: in forward
    return t1.f.inv_map(t1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

a = [5.0], out = [0.0]

    def ret(a: 'Tensor', out: Optional['Tensor']=None) -> 'Tensor':
        if out is None:
            out = a.zeros(a.shape)
>       f(*out._tensor._tensor.strides, a.shape, a._tensor._tensor.strides, a._tensor._tensor._storage)
E       AttributeError: 'TensorData' object has no attribute '_tensor'
E       Falsifying example: test_one_args(
E           t1=[0.0], fn=('div', div, div),
E       )

minitorch/tensor_ops.py:91: AttributeError
______________________________ test_one_args[fn7] ______________________________

fn = ('inv', <function MathTest.inv at 0x7b83f6c45360>, <function MathTestVariable.inv at 0x7b83f6c45c60>)

    @given(tensors())
>   @pytest.mark.task2_3
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor.py:24: ExceptionGroup
______________________________ test_one_args[fn8] ______________________________

fn = ('sig', <function MathTest.sig at 0x7b83f6c453f0>, <function MathTestVariable.sig at 0x7b83f6c45cf0>)

    @given(tensors())
>   @pytest.mark.task2_3
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor.py:24: ExceptionGroup
______________________________ test_one_args[fn9] ______________________________

fn = ('log', <function MathTest.log at 0x7b83f6c45480>, <function MathTestVariable.log at 0x7b83f6c45d80>)

    @given(tensors())
>   @pytest.mark.task2_3
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor.py:24: ExceptionGroup
_____________________________ test_one_args[fn10] ______________________________

fn = ('relu', <function MathTest.relu at 0x7b83f6c45510>, <function MathTestVariable.relu at 0x7b83f6c45e10>)

    @given(tensors())
>   @pytest.mark.task2_3
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor.py:24: ExceptionGroup
_____________________________ test_one_args[fn11] ______________________________

fn = ('exp', <function MathTest.exp at 0x7b83f6c455a0>, <function MathTestVariable.exp at 0x7b83f6c45ea0>)

    @given(tensors())
>   @pytest.mark.task2_3

tests/test_tensor.py:24: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor.py:31: in test_one_args
    t2 = tensor_fn(t1)
minitorch/testing.py:152: in exp
    return (a - 200).exp()
minitorch/tensor.py:130: in __sub__
    return Add.apply(self, -self._ensure_tensor(b))
minitorch/tensor.py:155: in __neg__
    return Neg.apply(self)
minitorch/tensor_functions.py:42: in apply
    c = cls.forward(ctx, *vals)
minitorch/tensor_functions.py:51: in forward
    return t1.f.neg_map(t1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

a = [200.0], out = [0.0]

    def ret(a: 'Tensor', out: Optional['Tensor']=None) -> 'Tensor':
        if out is None:
            out = a.zeros(a.shape)
>       f(*out._tensor._tensor.strides, a.shape, a._tensor._tensor.strides, a._tensor._tensor._storage)
E       AttributeError: 'TensorData' object has no attribute '_tensor'
E       Falsifying example: test_one_args(
E           t1=[0.0], fn=('exp', exp, exp),
E       )

minitorch/tensor_ops.py:91: AttributeError
______________________________ test_two_args[fn0] ______________________________

fn = ('add2', <function MathTest.add2 at 0x7b83f6c45630>, <function MathTestVariable.add2 at 0x7b83f6c45f30>)

    @given(shaped_tensors(2))
>   @pytest.mark.task2_3
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor.py:37: ExceptionGroup
______________________________ test_two_args[fn1] ______________________________

fn = ('mul2', <function MathTest.mul2 at 0x7b83f6c456c0>, <function MathTestVariable.mul2 at 0x7b83f6c45fc0>)

    @given(shaped_tensors(2))
>   @pytest.mark.task2_3
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor.py:37: ExceptionGroup
______________________________ test_two_args[fn2] ______________________________

fn = ('div2', <function MathTest.div2 at 0x7b83f6c45750>, <function MathTestVariable.div2 at 0x7b83f6c46050>)

    @given(shaped_tensors(2))
>   @pytest.mark.task2_3
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor.py:37: ExceptionGroup
___________________________ test_one_derivative[fn0] ___________________________

fn = ('neg', <function MathTest.neg at 0x7b83f6c44f70>, <function MathTestVariable.neg at 0x7b83f6c45870>)

    @given(tensors())
>   @pytest.mark.task2_4
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor.py:51: ExceptionGroup
___________________________ test_one_derivative[fn1] ___________________________

fn = ('addConstant', <function MathTest.addConstant at 0x7b83f6c45000>, <function MathTestVariable.addConstant at 0x7b83f6c45900>)

    @given(tensors())
>   @pytest.mark.task2_4
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor.py:51: ExceptionGroup
___________________________ test_one_derivative[fn2] ___________________________

fn = ('square', <function MathTest.square at 0x7b83f6c45090>, <function MathTestVariable.square at 0x7b83f6c45990>)

    @given(tensors())
>   @pytest.mark.task2_4
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor.py:51: ExceptionGroup
___________________________ test_one_derivative[fn3] ___________________________

fn = ('cube', <function MathTest.cube at 0x7b83f6c45120>, <function MathTestVariable.cube at 0x7b83f6c45a20>)

    @given(tensors())
>   @pytest.mark.task2_4
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor.py:51: ExceptionGroup
___________________________ test_one_derivative[fn4] ___________________________

fn = ('subConstant', <function MathTest.subConstant at 0x7b83f6c451b0>, <function MathTestVariable.subConstant at 0x7b83f6c45ab0>)

    @given(tensors())
>   @pytest.mark.task2_4

tests/test_tensor.py:51: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor.py:58: in test_one_derivative
    grad_check(tensor_fn, t1)
minitorch/tensor.py:303: in grad_check
    out = f(*tensors)
minitorch/testing.py:124: in subConstant
    return a - 5
minitorch/tensor.py:130: in __sub__
    return Add.apply(self, -self._ensure_tensor(b))
minitorch/tensor.py:155: in __neg__
    return Neg.apply(self)
minitorch/tensor_functions.py:42: in apply
    c = cls.forward(ctx, *vals)
minitorch/tensor_functions.py:51: in forward
    return t1.f.neg_map(t1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

a = [5.0], out = [0.0]

    def ret(a: 'Tensor', out: Optional['Tensor']=None) -> 'Tensor':
        if out is None:
            out = a.zeros(a.shape)
>       f(*out._tensor._tensor.strides, a.shape, a._tensor._tensor.strides, a._tensor._tensor._storage)
E       AttributeError: 'TensorData' object has no attribute '_tensor'
E       Falsifying example: test_one_derivative(
E           t1=[0.0], fn=('subConstant', subConstant, subConstant),
E       )

minitorch/tensor_ops.py:91: AttributeError
___________________________ test_one_derivative[fn5] ___________________________

fn = ('multConstant', <function MathTest.multConstant at 0x7b83f6c45240>, <function MathTestVariable.multConstant at 0x7b83f6c45b40>)

    @given(tensors())
>   @pytest.mark.task2_4
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor.py:51: ExceptionGroup
___________________________ test_one_derivative[fn6] ___________________________

fn = ('div', <function MathTest.div at 0x7b83f6c452d0>, <function MathTestVariable.div at 0x7b83f6c45bd0>)

    @given(tensors())
>   @pytest.mark.task2_4

tests/test_tensor.py:51: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor.py:58: in test_one_derivative
    grad_check(tensor_fn, t1)
minitorch/tensor.py:303: in grad_check
    out = f(*tensors)
minitorch/testing.py:132: in div
    return a / 5
minitorch/tensor.py:136: in __truediv__
    return Mul.apply(self, Inv.apply(self._ensure_tensor(b)))
minitorch/tensor_functions.py:42: in apply
    c = cls.forward(ctx, *vals)
minitorch/tensor_functions.py:61: in forward
    return t1.f.inv_map(t1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

a = [5.0], out = [0.0]

    def ret(a: 'Tensor', out: Optional['Tensor']=None) -> 'Tensor':
        if out is None:
            out = a.zeros(a.shape)
>       f(*out._tensor._tensor.strides, a.shape, a._tensor._tensor.strides, a._tensor._tensor._storage)
E       AttributeError: 'TensorData' object has no attribute '_tensor'
E       Falsifying example: test_one_derivative(
E           t1=[0.0], fn=('div', div, div),
E       )

minitorch/tensor_ops.py:91: AttributeError
___________________________ test_one_derivative[fn7] ___________________________

fn = ('inv', <function MathTest.inv at 0x7b83f6c45360>, <function MathTestVariable.inv at 0x7b83f6c45c60>)

    @given(tensors())
>   @pytest.mark.task2_4

tests/test_tensor.py:51: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor.py:58: in test_one_derivative
    grad_check(tensor_fn, t1)
minitorch/tensor.py:303: in grad_check
    out = f(*tensors)
minitorch/testing.py:136: in inv
    return operators.inv(a + 3.5)
minitorch/tensor.py:127: in __add__
    return Add.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:42: in apply
    c = cls.forward(ctx, *vals)
minitorch/tensor_functions.py:71: in forward
    return t1.f.add_zip(t1, t2)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

a = [0.0], b = [3.5]

    def ret(a: 'Tensor', b: 'Tensor') -> 'Tensor':
        c_shape = shape_broadcast(a.shape, b.shape)
        out = a.zeros(c_shape)
>       f(*out._tensor._tensor.strides, a._tensor._tensor.strides, b._tensor._tensor.strides, a._tensor._tensor._storage, b._tensor._tensor._storage)
E       AttributeError: 'TensorData' object has no attribute '_tensor'
E       Falsifying example: test_one_derivative(
E           t1=[0.0], fn=('inv', inv, inv),
E       )

minitorch/tensor_ops.py:129: AttributeError
___________________________ test_one_derivative[fn8] ___________________________

fn = ('sig', <function MathTest.sig at 0x7b83f6c453f0>, <function MathTestVariable.sig at 0x7b83f6c45cf0>)

    @given(tensors())
>   @pytest.mark.task2_4
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor.py:51: ExceptionGroup
___________________________ test_one_derivative[fn9] ___________________________

fn = ('log', <function MathTest.log at 0x7b83f6c45480>, <function MathTestVariable.log at 0x7b83f6c45d80>)

    @given(tensors())
>   @pytest.mark.task2_4
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor.py:51: ExceptionGroup
__________________________ test_one_derivative[fn10] ___________________________

fn = ('relu', <function MathTest.relu at 0x7b83f6c45510>, <function MathTestVariable.relu at 0x7b83f6c45e10>)

    @given(tensors())
>   @pytest.mark.task2_4
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor.py:51: ExceptionGroup
__________________________ test_one_derivative[fn11] ___________________________

fn = ('exp', <function MathTest.exp at 0x7b83f6c455a0>, <function MathTestVariable.exp at 0x7b83f6c45ea0>)

    @given(tensors())
>   @pytest.mark.task2_4

tests/test_tensor.py:51: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor.py:58: in test_one_derivative
    grad_check(tensor_fn, t1)
minitorch/tensor.py:303: in grad_check
    out = f(*tensors)
minitorch/testing.py:152: in exp
    return (a - 200).exp()
minitorch/tensor.py:130: in __sub__
    return Add.apply(self, -self._ensure_tensor(b))
minitorch/tensor.py:155: in __neg__
    return Neg.apply(self)
minitorch/tensor_functions.py:42: in apply
    c = cls.forward(ctx, *vals)
minitorch/tensor_functions.py:51: in forward
    return t1.f.neg_map(t1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

a = [200.0], out = [0.0]

    def ret(a: 'Tensor', out: Optional['Tensor']=None) -> 'Tensor':
        if out is None:
            out = a.zeros(a.shape)
>       f(*out._tensor._tensor.strides, a.shape, a._tensor._tensor.strides, a._tensor._tensor._storage)
E       AttributeError: 'TensorData' object has no attribute '_tensor'
E       Falsifying example: test_one_derivative(
E           t1=[0.0], fn=('exp', exp, exp),
E       )

minitorch/tensor_ops.py:91: AttributeError
_________________________________ test_permute _________________________________

    @given(data(), tensors())
>   @pytest.mark.task2_4
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor.py:62: ExceptionGroup
________________________________ test_grad_size ________________________________

    def test_grad_size() -> None:
        "Test the size of the gradient (from @WannaFy)"
        a = tensor([1], requires_grad=True)
        b = tensor([[1, 1]], requires_grad=True)
    
>       c = (a * b).sum()

tests/test_tensor.py:78: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
minitorch/tensor.py:133: in __mul__
    return Mul.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:42: in apply
    c = cls.forward(ctx, *vals)
minitorch/tensor_functions.py:81: in forward
    return t1.f.mul_zip(t1, t2)
minitorch/tensor_ops.py:128: in ret
    out = a.zeros(c_shape)
minitorch/tensor.py:118: in zeros
    return tensor([0.0] * int(operators.prod(shape)), backend=self.backend).view(*shape)
minitorch/tensor.py:195: in view
    return View.apply(self, tensor(list(shape), backend=self.backend))
minitorch/tensor_functions.py:42: in apply
    c = cls.forward(ctx, *vals)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=((2,),)), a = [0.0, 0.0]
shape = [1.0, 2.0]

    @staticmethod
    def forward(ctx: Context, a: 'Tensor', shape: 'Tensor') -> 'Tensor':
        shape_tuple = tuple(int(shape[i]) for i in range(shape.dims))
        ctx.save_for_backward(a.shape)
>       assert a._tensor.size == int(operators.prod(shape_tuple))
E       AssertionError

minitorch/tensor_functions.py:201: AssertionError
______________________________ test_two_grad[fn0] ______________________________

fn = ('add2', <function MathTest.add2 at 0x7b83f6c45630>, <function MathTestVariable.add2 at 0x7b83f6c45f30>)

    @given(shaped_tensors(2))
>   @pytest.mark.task2_4
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor.py:101: ExceptionGroup
______________________________ test_two_grad[fn1] ______________________________

fn = ('mul2', <function MathTest.mul2 at 0x7b83f6c456c0>, <function MathTestVariable.mul2 at 0x7b83f6c45fc0>)

    @given(shaped_tensors(2))
>   @pytest.mark.task2_4
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor.py:101: ExceptionGroup
______________________________ test_two_grad[fn2] ______________________________

fn = ('div2', <function MathTest.div2 at 0x7b83f6c45750>, <function MathTestVariable.div2 at 0x7b83f6c46050>)

    @given(shaped_tensors(2))
>   @pytest.mark.task2_4
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor.py:101: ExceptionGroup
_________________________ test_two_grad_broadcast[fn0] _________________________

fn = ('add2', <function MathTest.add2 at 0x7b83f6c45630>, <function MathTestVariable.add2 at 0x7b83f6c45f30>)

    @given(shaped_tensors(2))
>   @pytest.mark.task2_4
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor.py:113: ExceptionGroup
_________________________ test_two_grad_broadcast[fn1] _________________________

fn = ('mul2', <function MathTest.mul2 at 0x7b83f6c456c0>, <function MathTestVariable.mul2 at 0x7b83f6c45fc0>)

    @given(shaped_tensors(2))
>   @pytest.mark.task2_4
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor.py:113: ExceptionGroup
_________________________ test_two_grad_broadcast[fn2] _________________________

fn = ('div2', <function MathTest.div2 at 0x7b83f6c45750>, <function MathTestVariable.div2 at 0x7b83f6c46050>)

    @given(shaped_tensors(2))
>   @pytest.mark.task2_4
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor.py:113: ExceptionGroup
__________________________________ test_view ___________________________________

    def test_view() -> None:
        "Test view"
        t = tensor([[2, 3, 4], [4, 5, 7]])
        assert t.shape == (2, 3)
        t2 = t.view(6)
        assert t2.shape == (6,)
>       t2 = t2.view(1, 6)

tests/test_tensor.py:143: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
minitorch/tensor.py:195: in view
    return View.apply(self, tensor(list(shape), backend=self.backend))
minitorch/tensor_functions.py:42: in apply
    c = cls.forward(ctx, *vals)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=((6,),))
a = [2.0, 3.0, 4.0, 4.0, 5.0, 7.0], shape = [1.0, 6.0]

    @staticmethod
    def forward(ctx: Context, a: 'Tensor', shape: 'Tensor') -> 'Tensor':
        shape_tuple = tuple(int(shape[i]) for i in range(shape.dims))
        ctx.save_for_backward(a.shape)
>       assert a._tensor.size == int(operators.prod(shape_tuple))
E       AssertionError

minitorch/tensor_functions.py:201: AssertionError
________________________________ test_back_view ________________________________

    @given(tensors())
>   def test_back_view(t1: Tensor) -> None:

tests/test_tensor.py:152: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor.py:159: in test_back_view
    grad_check(view, t1)
minitorch/tensor.py:304: in grad_check
    out.backward()
minitorch/tensor.py:288: in backward
    d_output = tensor([1.0], backend=self.backend).view(self.shape)
minitorch/tensor.py:195: in view
    return View.apply(self, tensor(list(shape), backend=self.backend))
minitorch/tensor_functions.py:42: in apply
    c = cls.forward(ctx, *vals)
minitorch/tensor_functions.py:199: in forward
    shape_tuple = tuple(int(shape[i]) for i in range(shape.dims))
minitorch/tensor_functions.py:199: in <genexpr>
    shape_tuple = tuple(int(shape[i]) for i in range(shape.dims))
minitorch/tensor.py:209: in __getitem__
    return self._tensor.get(key2)
minitorch/tensor_data.py:186: in get
    return self._storage[self.index(key)]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <minitorch.tensor_data.TensorData object at 0x7b83f64e40a0>, index = (0,)

    def index(self, index: UserIndex) -> int:
        """
        Convert an index to a position in storage.
        """
        if len(index) != self.dims:
>           raise IndexingError(f"Index {index} has wrong length for shape {self.shape}")
E           minitorch.tensor_data.IndexingError: Index (0,) has wrong length for shape (1, 1)
E           Falsifying example: test_back_view(
E               t1=[0.0],
E           )

minitorch/tensor_data.py:152: IndexingError
________________________________ test_fromnumpy ________________________________

    def test_fromnumpy() -> None:
        t = tensor([[2, 3, 4], [4, 5, 7]])
>       print(t)

tests/test_tensor.py:179: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
minitorch/tensor.py:205: in __repr__
    return self._tensor.to_string()
minitorch/tensor_data.py:183: in to_string
    return helper(self.shape, 0)
minitorch/tensor_data.py:182: in helper
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in <genexpr>
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:180: in helper
    return '[' + ', '.join(helper((), offset + i * self._strides[-1]) for i in range(inner)) + ']'
minitorch/tensor_data.py:180: in <genexpr>
    return '[' + ', '.join(helper((), offset + i * self._strides[-1]) for i in range(inner)) + ']'
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

shape = (), offset = 6

    def helper(shape: Tuple[int, ...], offset: int) -> str:
        if len(shape) == 0:
>           return str(self._storage[offset])
E           IndexError: index 6 is out of bounds for axis 0 with size 6

minitorch/tensor_data.py:176: IndexError
_________________________ test_reduce_forward_one_dim __________________________

    @pytest.mark.task2_3
    def test_reduce_forward_one_dim() -> None:
        # shape (3, 2)
        t = tensor([[2, 3], [4, 6], [5, 7]])
    
        # here 0 means to reduce the 0th dim, 3 -> nothing
>       t_summed = t.sum(0)

tests/test_tensor.py:196: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
minitorch/tensor.py:180: in sum
    return Sum.apply(self, self._ensure_tensor(dim))
minitorch/tensor_functions.py:42: in apply
    c = cls.forward(ctx, *vals)
minitorch/tensor_functions.py:138: in forward
    return a.f.add_reduce(a, int(dim.item()))
minitorch/tensor_ops.py:162: in ret
    out = a.zeros(tuple(out_shape))
minitorch/tensor.py:118: in zeros
    return tensor([0.0] * int(operators.prod(shape)), backend=self.backend).view(*shape)
minitorch/tensor.py:195: in view
    return View.apply(self, tensor(list(shape), backend=self.backend))
minitorch/tensor_functions.py:42: in apply
    c = cls.forward(ctx, *vals)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=((2,),)), a = [0.0, 0.0]
shape = [1.0, 2.0]

    @staticmethod
    def forward(ctx: Context, a: 'Tensor', shape: 'Tensor') -> 'Tensor':
        shape_tuple = tuple(int(shape[i]) for i in range(shape.dims))
        ctx.save_for_backward(a.shape)
>       assert a._tensor.size == int(operators.prod(shape_tuple))
E       AssertionError

minitorch/tensor_functions.py:201: AssertionError
________________________ test_reduce_forward_one_dim_2 _________________________

    @pytest.mark.task2_3
    def test_reduce_forward_one_dim_2() -> None:
        # shape (3, 2)
        t = tensor([[2, 3], [4, 6], [5, 7]])
    
        # here 1 means reduce the 1st dim, 2 -> nothing
>       t_summed_2 = t.sum(1)

tests/test_tensor.py:209: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
minitorch/tensor.py:180: in sum
    return Sum.apply(self, self._ensure_tensor(dim))
minitorch/tensor_functions.py:42: in apply
    c = cls.forward(ctx, *vals)
minitorch/tensor_functions.py:138: in forward
    return a.f.add_reduce(a, int(dim.item()))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

a = [[2.0, 3.0, 4.0], [4.0, 6.0, 5.0]], dim = 1

    def ret(a: 'Tensor', dim: int) -> 'Tensor':
        out_shape = list(a.shape)
        out_shape[dim] = 1
        out = a.zeros(tuple(out_shape))
>       f(*out._tensor._tensor.strides, a._tensor._tensor.strides, dim)
E       AttributeError: 'TensorData' object has no attribute '_tensor'

minitorch/tensor_ops.py:163: AttributeError
_________________________ test_reduce_forward_all_dims _________________________

    @pytest.mark.task2_3
    def test_reduce_forward_all_dims() -> None:
        # shape (3, 2)
        t = tensor([[2, 3], [4, 6], [5, 7]])
    
        # reduce all dims, (3 -> 1, 2 -> 1)
>       t_summed_all = t.sum()

tests/test_tensor.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
minitorch/tensor.py:178: in sum
    return Sum.apply(self, self._ensure_tensor(0))
minitorch/tensor_functions.py:42: in apply
    c = cls.forward(ctx, *vals)
minitorch/tensor_functions.py:138: in forward
    return a.f.add_reduce(a, int(dim.item()))
minitorch/tensor_ops.py:162: in ret
    out = a.zeros(tuple(out_shape))
minitorch/tensor.py:118: in zeros
    return tensor([0.0] * int(operators.prod(shape)), backend=self.backend).view(*shape)
minitorch/tensor.py:195: in view
    return View.apply(self, tensor(list(shape), backend=self.backend))
minitorch/tensor_functions.py:42: in apply
    c = cls.forward(ctx, *vals)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=((2,),)), a = [0.0, 0.0]
shape = [1.0, 2.0]

    @staticmethod
    def forward(ctx: Context, a: 'Tensor', shape: 'Tensor') -> 'Tensor':
        shape_tuple = tuple(int(shape[i]) for i in range(shape.dims))
        ctx.save_for_backward(a.shape)
>       assert a._tensor.size == int(operators.prod(shape_tuple))
E       AssertionError

minitorch/tensor_functions.py:201: AssertionError
_________________________________ test_string __________________________________

    @given(tensor_data())
>   def test_string(tensor_data: TensorData) -> None:

tests/test_tensor_data.py:124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor_data.py:125: in test_string
    tensor_data.to_string()
minitorch/tensor_data.py:183: in to_string
    return helper(self.shape, 0)
minitorch/tensor_data.py:182: in helper
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in <genexpr>
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:180: in helper
    return '[' + ', '.join(helper((), offset + i * self._strides[-1]) for i in range(inner)) + ']'
minitorch/tensor_data.py:180: in <genexpr>
    return '[' + ', '.join(helper((), offset + i * self._strides[-1]) for i in range(inner)) + ']'
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

shape = (), offset = 2

    def helper(shape: Tuple[int, ...], offset: int) -> str:
        if len(shape) == 0:
>           return str(self._storage[offset])
E           IndexError: index 2 is out of bounds for axis 0 with size 2
E           Falsifying example: test_string(
E               tensor_data=<minitorch.tensor_data.TensorData at 0x7b83f632dc00>,
E           )

minitorch/tensor_data.py:176: IndexError
___________________________ test_one_args[fast-fn0] ____________________________

fn = ('neg', <function MathTest.neg at 0x7b83f6c44f70>, <function MathTestVariable.neg at 0x7b83f6c45870>)
backend = 'fast'

    @given(data())
>   @settings(max_examples=100)
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor_general.py:54: ExceptionGroup
___________________________ test_one_args[fast-fn1] ____________________________

fn = ('addConstant', <function MathTest.addConstant at 0x7b83f6c45000>, <function MathTestVariable.addConstant at 0x7b83f6c45900>)
backend = 'fast'

    @given(data())
>   @settings(max_examples=100)
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor_general.py:54: ExceptionGroup
___________________________ test_one_args[fast-fn2] ____________________________

fn = ('square', <function MathTest.square at 0x7b83f6c45090>, <function MathTestVariable.square at 0x7b83f6c45990>)
backend = 'fast'

    @given(data())
>   @settings(max_examples=100)
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor_general.py:54: ExceptionGroup
___________________________ test_one_args[fast-fn3] ____________________________

fn = ('cube', <function MathTest.cube at 0x7b83f6c45120>, <function MathTestVariable.cube at 0x7b83f6c45a20>)
backend = 'fast'

    @given(data())
>   @settings(max_examples=100)
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor_general.py:54: ExceptionGroup
___________________________ test_one_args[fast-fn4] ____________________________

fn = ('subConstant', <function MathTest.subConstant at 0x7b83f6c451b0>, <function MathTestVariable.subConstant at 0x7b83f6c45ab0>)
backend = 'fast'

    @given(data())
>   @settings(max_examples=100)
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor_general.py:54: ExceptionGroup
___________________________ test_one_args[fast-fn5] ____________________________

fn = ('multConstant', <function MathTest.multConstant at 0x7b83f6c45240>, <function MathTestVariable.multConstant at 0x7b83f6c45b40>)
backend = 'fast'

    @given(data())
>   @settings(max_examples=100)

tests/test_tensor_general.py:54: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor_general.py:65: in test_one_args
    t2 = tensor_fn(t1)
minitorch/testing.py:128: in multConstant
    return a * 5
minitorch/tensor.py:133: in __mul__
    return Mul.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:42: in apply
    c = cls.forward(ctx, *vals)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=([0.0], [5.0])), t1 = [0.0]
t2 = [5.0]

    @staticmethod
    def forward(ctx: Context, t1: 'Tensor', t2: 'Tensor') -> 'Tensor':
        ctx.save_for_backward(t1, t2)
>       return t1.f.mul_zip(t1, t2)
E       TypeError: 'NoneType' object is not callable
E       Falsifying example: test_one_args(
E           data=data(...),
E           fn=('multConstant', multConstant, multConstant),
E           backend='fast',
E       )
E       Draw 1: [0.0]

minitorch/tensor_functions.py:81: TypeError
___________________________ test_one_args[fast-fn6] ____________________________

fn = ('div', <function MathTest.div at 0x7b83f6c452d0>, <function MathTestVariable.div at 0x7b83f6c45bd0>)
backend = 'fast'

    @given(data())
>   @settings(max_examples=100)

tests/test_tensor_general.py:54: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor_general.py:65: in test_one_args
    t2 = tensor_fn(t1)
minitorch/testing.py:132: in div
    return a / 5
minitorch/tensor.py:136: in __truediv__
    return Mul.apply(self, Inv.apply(self._ensure_tensor(b)))
minitorch/tensor_functions.py:42: in apply
    c = cls.forward(ctx, *vals)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=([5.0],)), t1 = [5.0]

    @staticmethod
    def forward(ctx: Context, t1: 'Tensor') -> 'Tensor':
        ctx.save_for_backward(t1)
>       return t1.f.inv_map(t1)
E       TypeError: 'NoneType' object is not callable
E       Falsifying example: test_one_args(
E           data=data(...), fn=('div', div, div), backend='fast',
E       )
E       Draw 1: [0.0]

minitorch/tensor_functions.py:61: TypeError
___________________________ test_one_args[fast-fn7] ____________________________

fn = ('inv', <function MathTest.inv at 0x7b83f6c45360>, <function MathTestVariable.inv at 0x7b83f6c45c60>)
backend = 'fast'

    @given(data())
>   @settings(max_examples=100)

tests/test_tensor_general.py:54: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor_general.py:65: in test_one_args
    t2 = tensor_fn(t1)
minitorch/testing.py:136: in inv
    return operators.inv(a + 3.5)
minitorch/tensor.py:127: in __add__
    return Add.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:42: in apply
    c = cls.forward(ctx, *vals)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=()), t1 = [0.0], t2 = [3.5]

    @staticmethod
    def forward(ctx: Context, t1: 'Tensor', t2: 'Tensor') -> 'Tensor':
>       return t1.f.add_zip(t1, t2)
E       TypeError: 'NoneType' object is not callable
E       Falsifying example: test_one_args(
E           data=data(...), fn=('inv', inv, inv), backend='fast',
E       )
E       Draw 1: [0.0]

minitorch/tensor_functions.py:71: TypeError
___________________________ test_one_args[fast-fn8] ____________________________

fn = ('sig', <function MathTest.sig at 0x7b83f6c453f0>, <function MathTestVariable.sig at 0x7b83f6c45cf0>)
backend = 'fast'

    @given(data())
>   @settings(max_examples=100)

tests/test_tensor_general.py:54: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor_general.py:65: in test_one_args
    t2 = tensor_fn(t1)
minitorch/testing.py:140: in sig
    return a.sigmoid()
minitorch/tensor.py:170: in sigmoid
    return Sigmoid.apply(self)
minitorch/tensor_functions.py:42: in apply
    c = cls.forward(ctx, *vals)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=()), t1 = [0.0]

    @staticmethod
    def forward(ctx: Context, t1: 'Tensor') -> 'Tensor':
>       out = t1.f.sigmoid_map(t1)
E       TypeError: 'NoneType' object is not callable
E       Falsifying example: test_one_args(
E           data=data(...), fn=('sig', sig, sig), backend='fast',
E       )
E       Draw 1: [0.0]

minitorch/tensor_functions.py:91: TypeError
___________________________ test_one_args[fast-fn9] ____________________________

fn = ('log', <function MathTest.log at 0x7b83f6c45480>, <function MathTestVariable.log at 0x7b83f6c45d80>)
backend = 'fast'

    @given(data())
>   @settings(max_examples=100)
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor_general.py:54: ExceptionGroup
___________________________ test_one_args[fast-fn10] ___________________________

fn = ('relu', <function MathTest.relu at 0x7b83f6c45510>, <function MathTestVariable.relu at 0x7b83f6c45e10>)
backend = 'fast'

    @given(data())
>   @settings(max_examples=100)
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor_general.py:54: ExceptionGroup
___________________________ test_one_args[fast-fn11] ___________________________

fn = ('exp', <function MathTest.exp at 0x7b83f6c455a0>, <function MathTestVariable.exp at 0x7b83f6c45ea0>)
backend = 'fast'

    @given(data())
>   @settings(max_examples=100)
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor_general.py:54: ExceptionGroup
___________________________ test_two_args[fast-fn0] ____________________________

fn = ('add2', <function MathTest.add2 at 0x7b83f6c45630>, <function MathTestVariable.add2 at 0x7b83f6c45f30>)
backend = 'fast'

    @given(data())
>   @settings(max_examples=100)
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor_general.py:71: ExceptionGroup
___________________________ test_two_args[fast-fn1] ____________________________

fn = ('mul2', <function MathTest.mul2 at 0x7b83f6c456c0>, <function MathTestVariable.mul2 at 0x7b83f6c45fc0>)
backend = 'fast'

    @given(data())
>   @settings(max_examples=100)
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor_general.py:71: ExceptionGroup
___________________________ test_two_args[fast-fn2] ____________________________

fn = ('div2', <function MathTest.div2 at 0x7b83f6c45750>, <function MathTestVariable.div2 at 0x7b83f6c46050>)
backend = 'fast'

    @given(data())
>   @settings(max_examples=100)
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor_general.py:71: ExceptionGroup
________________________ test_one_derivative[fast-fn0] _________________________

fn = ('neg', <function MathTest.neg at 0x7b83f6c44f70>, <function MathTestVariable.neg at 0x7b83f6c45870>)
backend = 'fast'

    @given(data())
>   @pytest.mark.parametrize("fn", one_arg)

tests/test_tensor_general.py:88: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor_general.py:98: in test_one_derivative
    grad_check(tensor_fn, t1)
minitorch/tensor.py:303: in grad_check
    out = f(*tensors)
minitorch/testing.py:108: in neg
    return -a
minitorch/tensor.py:155: in __neg__
    return Neg.apply(self)
minitorch/tensor_functions.py:42: in apply
    c = cls.forward(ctx, *vals)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=()), t1 = [0.0]

    @staticmethod
    def forward(ctx: Context, t1: 'Tensor') -> 'Tensor':
>       return t1.f.neg_map(t1)
E       TypeError: 'NoneType' object is not callable
E       Falsifying example: test_one_derivative(
E           data=data(...), fn=('neg', neg, neg), backend='fast',
E       )
E       Draw 1: [0.0]

minitorch/tensor_functions.py:51: TypeError
________________________ test_one_derivative[fast-fn1] _________________________

fn = ('addConstant', <function MathTest.addConstant at 0x7b83f6c45000>, <function MathTestVariable.addConstant at 0x7b83f6c45900>)
backend = 'fast'

    @given(data())
>   @pytest.mark.parametrize("fn", one_arg)

tests/test_tensor_general.py:88: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor_general.py:98: in test_one_derivative
    grad_check(tensor_fn, t1)
minitorch/tensor.py:303: in grad_check
    out = f(*tensors)
minitorch/testing.py:112: in addConstant
    return a + 5
minitorch/tensor.py:127: in __add__
    return Add.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:42: in apply
    c = cls.forward(ctx, *vals)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=()), t1 = [0.0], t2 = [5.0]

    @staticmethod
    def forward(ctx: Context, t1: 'Tensor', t2: 'Tensor') -> 'Tensor':
>       return t1.f.add_zip(t1, t2)
E       TypeError: 'NoneType' object is not callable
E       Falsifying example: test_one_derivative(
E           data=data(...),
E           fn=('addConstant', addConstant, addConstant),
E           backend='fast',
E       )
E       Draw 1: [0.0]

minitorch/tensor_functions.py:71: TypeError
________________________ test_one_derivative[fast-fn2] _________________________

fn = ('square', <function MathTest.square at 0x7b83f6c45090>, <function MathTestVariable.square at 0x7b83f6c45990>)
backend = 'fast'

    @given(data())
>   @pytest.mark.parametrize("fn", one_arg)
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor_general.py:88: ExceptionGroup
________________________ test_one_derivative[fast-fn3] _________________________

fn = ('cube', <function MathTest.cube at 0x7b83f6c45120>, <function MathTestVariable.cube at 0x7b83f6c45a20>)
backend = 'fast'

    @given(data())
>   @pytest.mark.parametrize("fn", one_arg)
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor_general.py:88: ExceptionGroup
________________________ test_one_derivative[fast-fn4] _________________________

fn = ('subConstant', <function MathTest.subConstant at 0x7b83f6c451b0>, <function MathTestVariable.subConstant at 0x7b83f6c45ab0>)
backend = 'fast'

    @given(data())
>   @pytest.mark.parametrize("fn", one_arg)
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor_general.py:88: ExceptionGroup
________________________ test_one_derivative[fast-fn5] _________________________

fn = ('multConstant', <function MathTest.multConstant at 0x7b83f6c45240>, <function MathTestVariable.multConstant at 0x7b83f6c45b40>)
backend = 'fast'

    @given(data())
>   @pytest.mark.parametrize("fn", one_arg)
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor_general.py:88: ExceptionGroup
________________________ test_one_derivative[fast-fn6] _________________________

fn = ('div', <function MathTest.div at 0x7b83f6c452d0>, <function MathTestVariable.div at 0x7b83f6c45bd0>)
backend = 'fast'

    @given(data())
>   @pytest.mark.parametrize("fn", one_arg)
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor_general.py:88: ExceptionGroup
________________________ test_one_derivative[fast-fn7] _________________________

fn = ('inv', <function MathTest.inv at 0x7b83f6c45360>, <function MathTestVariable.inv at 0x7b83f6c45c60>)
backend = 'fast'

    @given(data())
>   @pytest.mark.parametrize("fn", one_arg)
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor_general.py:88: ExceptionGroup
________________________ test_one_derivative[fast-fn8] _________________________

fn = ('sig', <function MathTest.sig at 0x7b83f6c453f0>, <function MathTestVariable.sig at 0x7b83f6c45cf0>)
backend = 'fast'

    @given(data())
>   @pytest.mark.parametrize("fn", one_arg)
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor_general.py:88: ExceptionGroup
________________________ test_one_derivative[fast-fn9] _________________________

fn = ('log', <function MathTest.log at 0x7b83f6c45480>, <function MathTestVariable.log at 0x7b83f6c45d80>)
backend = 'fast'

    @given(data())
>   @pytest.mark.parametrize("fn", one_arg)
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor_general.py:88: ExceptionGroup
________________________ test_one_derivative[fast-fn10] ________________________

fn = ('relu', <function MathTest.relu at 0x7b83f6c45510>, <function MathTestVariable.relu at 0x7b83f6c45e10>)
backend = 'fast'

    @given(data())
>   @pytest.mark.parametrize("fn", one_arg)
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor_general.py:88: ExceptionGroup
________________________ test_one_derivative[fast-fn11] ________________________

fn = ('exp', <function MathTest.exp at 0x7b83f6c455a0>, <function MathTestVariable.exp at 0x7b83f6c45ea0>)
backend = 'fast'

    @given(data())
>   @pytest.mark.parametrize("fn", one_arg)
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor_general.py:88: ExceptionGroup
___________________________ test_two_grad[fast-fn0] ____________________________

fn = ('add2', <function MathTest.add2 at 0x7b83f6c45630>, <function MathTestVariable.add2 at 0x7b83f6c45f30>)
backend = 'fast'

    @given(data())
>   @settings(max_examples=50)
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor_general.py:102: ExceptionGroup
___________________________ test_two_grad[fast-fn1] ____________________________

fn = ('mul2', <function MathTest.mul2 at 0x7b83f6c456c0>, <function MathTestVariable.mul2 at 0x7b83f6c45fc0>)
backend = 'fast'

    @given(data())
>   @settings(max_examples=50)
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor_general.py:102: ExceptionGroup
___________________________ test_two_grad[fast-fn2] ____________________________

fn = ('div2', <function MathTest.div2 at 0x7b83f6c45750>, <function MathTestVariable.div2 at 0x7b83f6c46050>)
backend = 'fast'

    @given(data())
>   @settings(max_examples=50)
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor_general.py:102: ExceptionGroup
______________________ test_two_grad_broadcast[fast-fn0] _______________________

fn = ('add2', <function MathTest.add2 at 0x7b83f6c45630>, <function MathTestVariable.add2 at 0x7b83f6c45f30>)
backend = 'fast'

    @given(data())
>   @settings(max_examples=25)
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor_general.py:308: ExceptionGroup
______________________ test_two_grad_broadcast[fast-fn1] _______________________

fn = ('mul2', <function MathTest.mul2 at 0x7b83f6c456c0>, <function MathTestVariable.mul2 at 0x7b83f6c45fc0>)
backend = 'fast'

    @given(data())
>   @settings(max_examples=25)
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor_general.py:308: ExceptionGroup
______________________ test_two_grad_broadcast[fast-fn2] _______________________

fn = ('div2', <function MathTest.div2 at 0x7b83f6c45750>, <function MathTestVariable.div2 at 0x7b83f6c46050>)
backend = 'fast'

    @given(data())
>   @settings(max_examples=25)
E   exceptiongroup.ExceptionGroup: Hypothesis found 2 distinct failures. (2 sub-exceptions)

tests/test_tensor_general.py:308: ExceptionGroup
______________________________ test_permute[fast] ______________________________

backend = 'fast'

    @given(data())
>   @settings(max_examples=100)
E   exceptiongroup.ExceptionGroup: Hypothesis found 3 distinct failures. (3 sub-exceptions)

tests/test_tensor_general.py:328: ExceptionGroup
___________________________________ test_mm2 ___________________________________

    @pytest.mark.task3_2
    def test_mm2() -> None:
        a = minitorch.rand((2, 3), backend=FastTensorBackend)
        b = minitorch.rand((3, 4), backend=FastTensorBackend)
>       c = a @ b

tests/test_tensor_general.py:345: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
minitorch/tensor.py:143: in __matmul__
    return MatMul.apply(self, b)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cls = <class 'minitorch.tensor_functions.MatMul'>
vals = (<[IndexError('index 6 is out of bounds for axis 0 with size 6') raised in repr()] Tensor object at 0x7b83f61ede10>, <[IndexError('index 12 is out of bounds for axis 0 with size 12') raised in repr()] Tensor object at 0x7b83f61ec8b0>)
raw_vals = [array([0.72356111, 0.66455179, 0.73206173, 0.02287296, 0.4868588 ,
       0.91831561]), array([0.16150882, 0.91517358...993314, 0.23390547,
       0.99118086, 0.51143494, 0.55955872, 0.27965689, 0.52668226,
       0.3310656 , 0.35936448])]
need_grad = False
v = <[IndexError('index 12 is out of bounds for axis 0 with size 12') raised in repr()] Tensor object at 0x7b83f61ec8b0>

    @classmethod
    def apply(cls, *vals):
        raw_vals = []
        need_grad = False
        for v in vals:
            if isinstance(v, minitorch.Tensor):
                raw_vals.append(v._tensor._storage)
                if v.history is not None:
                    need_grad = True
            else:
                raw_vals.append(v)
    
        ctx = Context(False)
        c = cls.forward(ctx, *vals)
>       assert isinstance(c, minitorch.Tensor)
E       AssertionError

minitorch/tensor_functions.py:43: AssertionError
________________________________ test_bmm[fast] ________________________________

backend = 'fast'

    @given(data())
>   @pytest.mark.parametrize("backend", matmul_tests)

tests/test_tensor_general.py:361: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor_general.py:371: in test_bmm
    b = data.draw(tensors(backend=shared[backend], shape=(1, B, C)))
/home/openhands/.local/lib/python3.10/site-packages/hypothesis/strategies/_internal/core.py:1818: in draw
    note(f"Draw {self.count}: {result!r}")
minitorch/tensor.py:205: in __repr__
    return self._tensor.to_string()
minitorch/tensor_data.py:183: in to_string
    return helper(self.shape, 0)
minitorch/tensor_data.py:182: in helper
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in <genexpr>
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in helper
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:182: in <genexpr>
    return '[' + ', '.join(helper(rest, offset + i * self._strides[len(shape) - 2]) for i in range(inner)) + ']'
minitorch/tensor_data.py:180: in helper
    return '[' + ', '.join(helper((), offset + i * self._strides[-1]) for i in range(inner)) + ']'
minitorch/tensor_data.py:180: in <genexpr>
    return '[' + ', '.join(helper((), offset + i * self._strides[-1]) for i in range(inner)) + ']'
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

shape = (), offset = 4

    def helper(shape: Tuple[int, ...], offset: int) -> str:
        if len(shape) == 0:
>           return str(self._storage[offset])
E           IndexError: index 4 is out of bounds for axis 0 with size 4
E           Falsifying example: test_bmm(
E               data=data(...), backend='fast',
E           )
E           Draw 1: 2
E           Draw 2: 2
E           Draw 3: 2
E           Draw 4: 2
E           Draw 5: [[[0.0, 0.0], [0.0, 0.0]], [[0.0, 0.0], [0.0, 0.0]]]

minitorch/tensor_data.py:176: IndexError
--------------------------------- JSON report ----------------------------------
report saved to: report.json
=========================== short test summary info ============================
FAILED tests/test_conv.py::test_conv1d_simple - AssertionError
FAILED tests/test_conv.py::test_conv1d - exceptiongroup.ExceptionGroup: Hypot...
FAILED tests/test_conv.py::test_conv1d_channel - IndexError: index 24 is out ...
FAILED tests/test_conv.py::test_conv - IndexError: index 36 is out of bounds ...
FAILED tests/test_conv.py::test_conv_batch - IndexError: index 72 is out of b...
FAILED tests/test_conv.py::test_conv_channel - IndexError: index 144 is out o...
FAILED tests/test_conv.py::test_conv2 - AssertionError
FAILED tests/test_nn.py::test_avg - IndexError: index 16 is out of bounds for...
FAILED tests/test_nn.py::test_max - IndexError: index 24 is out of bounds for...
FAILED tests/test_nn.py::test_max_pool - exceptiongroup.ExceptionGroup: Hypot...
FAILED tests/test_nn.py::test_drop - AttributeError: 'NoneType' object has no...
FAILED tests/test_nn.py::test_softmax - IndexError: index 16 is out of bounds...
FAILED tests/test_nn.py::test_log_softmax - IndexError: index 16 is out of bo...
FAILED tests/test_operators.py::test_sum_distribute - NotImplementedError: Ne...
FAILED tests/test_scalar.py::test_simple - AttributeError: 'Scalar' object ha...
FAILED tests/test_scalar.py::test_one_args[fn8] - AttributeError: 'Scalar' ob...
FAILED tests/test_scalar.py::test_one_args[fn9] - AttributeError: 'Scalar' ob...
FAILED tests/test_scalar.py::test_one_args[fn10] - AttributeError: 'Scalar' o...
FAILED tests/test_scalar.py::test_one_args[fn11] - AttributeError: 'Scalar' o...
FAILED tests/test_scalar.py::test_one_derivative[fn2] - ValueError: not enoug...
FAILED tests/test_scalar.py::test_one_derivative[fn3] - ValueError: not enoug...
FAILED tests/test_scalar.py::test_one_derivative[fn5] - ValueError: not enoug...
FAILED tests/test_scalar.py::test_one_derivative[fn6] - ValueError: not enoug...
FAILED tests/test_scalar.py::test_one_derivative[fn7] - ValueError: not enoug...
FAILED tests/test_scalar.py::test_one_derivative[fn8] - AttributeError: 'Scal...
FAILED tests/test_scalar.py::test_one_derivative[fn9] - AttributeError: 'Scal...
FAILED tests/test_scalar.py::test_one_derivative[fn10] - AttributeError: 'Sca...
FAILED tests/test_scalar.py::test_one_derivative[fn11] - AttributeError: 'Sca...
FAILED tests/test_scalar.py::test_two_derivative[fn1] - ValueError: not enoug...
FAILED tests/test_scalar.py::test_two_derivative[fn2] - ValueError: not enoug...
FAILED tests/test_tensor.py::test_one_args[fn0] - exceptiongroup.ExceptionGro...
FAILED tests/test_tensor.py::test_one_args[fn1] - exceptiongroup.ExceptionGro...
FAILED tests/test_tensor.py::test_one_args[fn2] - exceptiongroup.ExceptionGro...
FAILED tests/test_tensor.py::test_one_args[fn3] - exceptiongroup.ExceptionGro...
FAILED tests/test_tensor.py::test_one_args[fn4] - AttributeError: 'TensorData...
FAILED tests/test_tensor.py::test_one_args[fn5] - exceptiongroup.ExceptionGro...
FAILED tests/test_tensor.py::test_one_args[fn6] - AttributeError: 'TensorData...
FAILED tests/test_tensor.py::test_one_args[fn7] - exceptiongroup.ExceptionGro...
FAILED tests/test_tensor.py::test_one_args[fn8] - exceptiongroup.ExceptionGro...
FAILED tests/test_tensor.py::test_one_args[fn9] - exceptiongroup.ExceptionGro...
FAILED tests/test_tensor.py::test_one_args[fn10] - exceptiongroup.ExceptionGr...
FAILED tests/test_tensor.py::test_one_args[fn11] - AttributeError: 'TensorDat...
FAILED tests/test_tensor.py::test_two_args[fn0] - exceptiongroup.ExceptionGro...
FAILED tests/test_tensor.py::test_two_args[fn1] - exceptiongroup.ExceptionGro...
FAILED tests/test_tensor.py::test_two_args[fn2] - exceptiongroup.ExceptionGro...
FAILED tests/test_tensor.py::test_one_derivative[fn0] - exceptiongroup.Except...
FAILED tests/test_tensor.py::test_one_derivative[fn1] - exceptiongroup.Except...
FAILED tests/test_tensor.py::test_one_derivative[fn2] - exceptiongroup.Except...
FAILED tests/test_tensor.py::test_one_derivative[fn3] - exceptiongroup.Except...
FAILED tests/test_tensor.py::test_one_derivative[fn4] - AttributeError: 'Tens...
FAILED tests/test_tensor.py::test_one_derivative[fn5] - exceptiongroup.Except...
FAILED tests/test_tensor.py::test_one_derivative[fn6] - AttributeError: 'Tens...
FAILED tests/test_tensor.py::test_one_derivative[fn7] - AttributeError: 'Tens...
FAILED tests/test_tensor.py::test_one_derivative[fn8] - exceptiongroup.Except...
FAILED tests/test_tensor.py::test_one_derivative[fn9] - exceptiongroup.Except...
FAILED tests/test_tensor.py::test_one_derivative[fn10] - exceptiongroup.Excep...
FAILED tests/test_tensor.py::test_one_derivative[fn11] - AttributeError: 'Ten...
FAILED tests/test_tensor.py::test_permute - exceptiongroup.ExceptionGroup: Hy...
FAILED tests/test_tensor.py::test_grad_size - AssertionError
FAILED tests/test_tensor.py::test_two_grad[fn0] - exceptiongroup.ExceptionGro...
FAILED tests/test_tensor.py::test_two_grad[fn1] - exceptiongroup.ExceptionGro...
FAILED tests/test_tensor.py::test_two_grad[fn2] - exceptiongroup.ExceptionGro...
FAILED tests/test_tensor.py::test_two_grad_broadcast[fn0] - exceptiongroup.Ex...
FAILED tests/test_tensor.py::test_two_grad_broadcast[fn1] - exceptiongroup.Ex...
FAILED tests/test_tensor.py::test_two_grad_broadcast[fn2] - exceptiongroup.Ex...
FAILED tests/test_tensor.py::test_view - AssertionError
FAILED tests/test_tensor.py::test_back_view - minitorch.tensor_data.IndexingE...
FAILED tests/test_tensor.py::test_fromnumpy - IndexError: index 6 is out of b...
FAILED tests/test_tensor.py::test_reduce_forward_one_dim - AssertionError
FAILED tests/test_tensor.py::test_reduce_forward_one_dim_2 - AttributeError: ...
FAILED tests/test_tensor.py::test_reduce_forward_all_dims - AssertionError
FAILED tests/test_tensor_data.py::test_string - IndexError: index 2 is out of...
FAILED tests/test_tensor_general.py::test_one_args[fast-fn0] - exceptiongroup...
FAILED tests/test_tensor_general.py::test_one_args[fast-fn1] - exceptiongroup...
FAILED tests/test_tensor_general.py::test_one_args[fast-fn2] - exceptiongroup...
FAILED tests/test_tensor_general.py::test_one_args[fast-fn3] - exceptiongroup...
FAILED tests/test_tensor_general.py::test_one_args[fast-fn4] - exceptiongroup...
FAILED tests/test_tensor_general.py::test_one_args[fast-fn5] - TypeError: 'No...
FAILED tests/test_tensor_general.py::test_one_args[fast-fn6] - TypeError: 'No...
FAILED tests/test_tensor_general.py::test_one_args[fast-fn7] - TypeError: 'No...
FAILED tests/test_tensor_general.py::test_one_args[fast-fn8] - TypeError: 'No...
FAILED tests/test_tensor_general.py::test_one_args[fast-fn9] - exceptiongroup...
FAILED tests/test_tensor_general.py::test_one_args[fast-fn10] - exceptiongrou...
FAILED tests/test_tensor_general.py::test_one_args[fast-fn11] - exceptiongrou...
FAILED tests/test_tensor_general.py::test_two_args[fast-fn0] - exceptiongroup...
FAILED tests/test_tensor_general.py::test_two_args[fast-fn1] - exceptiongroup...
FAILED tests/test_tensor_general.py::test_two_args[fast-fn2] - exceptiongroup...
FAILED tests/test_tensor_general.py::test_one_derivative[fast-fn0] - TypeErro...
FAILED tests/test_tensor_general.py::test_one_derivative[fast-fn1] - TypeErro...
FAILED tests/test_tensor_general.py::test_one_derivative[fast-fn2] - exceptio...
FAILED tests/test_tensor_general.py::test_one_derivative[fast-fn3] - exceptio...
FAILED tests/test_tensor_general.py::test_one_derivative[fast-fn4] - exceptio...
FAILED tests/test_tensor_general.py::test_one_derivative[fast-fn5] - exceptio...
FAILED tests/test_tensor_general.py::test_one_derivative[fast-fn6] - exceptio...
FAILED tests/test_tensor_general.py::test_one_derivative[fast-fn7] - exceptio...
FAILED tests/test_tensor_general.py::test_one_derivative[fast-fn8] - exceptio...
FAILED tests/test_tensor_general.py::test_one_derivative[fast-fn9] - exceptio...
FAILED tests/test_tensor_general.py::test_one_derivative[fast-fn10] - excepti...
FAILED tests/test_tensor_general.py::test_one_derivative[fast-fn11] - excepti...
FAILED tests/test_tensor_general.py::test_two_grad[fast-fn0] - exceptiongroup...
FAILED tests/test_tensor_general.py::test_two_grad[fast-fn1] - exceptiongroup...
FAILED tests/test_tensor_general.py::test_two_grad[fast-fn2] - exceptiongroup...
FAILED tests/test_tensor_general.py::test_two_grad_broadcast[fast-fn0] - exce...
FAILED tests/test_tensor_general.py::test_two_grad_broadcast[fast-fn1] - exce...
FAILED tests/test_tensor_general.py::test_two_grad_broadcast[fast-fn2] - exce...
FAILED tests/test_tensor_general.py::test_permute[fast] - exceptiongroup.Exce...
FAILED tests/test_tensor_general.py::test_mm2 - AssertionError
FAILED tests/test_tensor_general.py::test_bmm[fast] - IndexError: index 4 is ...
======= 108 failed, 71 passed, 2 skipped, 4 xfailed in 110.22s (0:01:50) =======