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

tests/test_autodiff.py FFFF....                                          [  4%]
tests/test_conv.py FFFFFFF                                               [  8%]
tests/test_module.py FFFx.F                                              [ 11%]
tests/test_modules.py FF                                                 [ 12%]
tests/test_nn.py FFFFFF                                                  [ 15%]
tests/test_operators.py ..........................F......                [ 33%]
tests/test_scalar.py .........F.F.F..FFFFFFFFFFFFFFFF                    [ 50%]
tests/test_tensor.py FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFxxFFFF      [ 75%]
tests/test_tensor_data.py FxFFF.F                                        [ 79%]
tests/test_tensor_general.py FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF      [100%]

=================================== FAILURES ===================================
_______________________________ test_chain_rule1 _______________________________

    @pytest.mark.task1_3
    def test_chain_rule1() -> None:
        x = minitorch.Scalar(0.0)
        constant = minitorch.Scalar(
            0.0, ScalarHistory(Function1, ctx=Context(), inputs=[x, x])
        )
>       back = constant.chain_rule(d_output=5)
E       AttributeError: 'Scalar' object has no attribute 'chain_rule'

tests/test_autodiff.py:48: AttributeError
_______________________________ test_chain_rule2 _______________________________

    @pytest.mark.task1_3
    def test_chain_rule2() -> None:
        var = minitorch.Scalar(0.0, ScalarHistory())
        constant = minitorch.Scalar(
            0.0, ScalarHistory(Function1, ctx=Context(), inputs=[var, var])
        )
>       back = constant.chain_rule(d_output=5)
E       AttributeError: 'Scalar' object has no attribute 'chain_rule'

tests/test_autodiff.py:58: AttributeError
_______________________________ test_chain_rule3 _______________________________

    @pytest.mark.task1_3
    def test_chain_rule3() -> None:
        "Check that constrants are ignored and variables get derivatives."
        constant = 10
        var = minitorch.Scalar(5)
    
        y = Function2.apply(constant, var)
    
>       back = y.chain_rule(d_output=5)
E       AttributeError: 'Scalar' object has no attribute 'chain_rule'

tests/test_autodiff.py:73: AttributeError
_______________________________ test_chain_rule4 _______________________________

    @pytest.mark.task1_3
    def test_chain_rule4() -> None:
        var1 = minitorch.Scalar(5)
        var2 = minitorch.Scalar(10)
    
        y = Function2.apply(var1, var2)
    
>       back = y.chain_rule(d_output=5)
E       AttributeError: 'Scalar' object has no attribute 'chain_rule'

tests/test_autodiff.py:88: AttributeError
______________________________ 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:151: in view
    return View.apply(self, shape)
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=((4,),))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf6a4f10>
shape = (1, 1, 4)

    @staticmethod
    def forward(ctx: Context, t1, shape):
        ctx.save_for_backward(t1.shape)
>       return Tensor.make(t1._tensor._storage, shape, backend=t1.backend)
E       NameError: name 'Tensor' is not defined

minitorch/tensor_functions.py:209: NameError
_________________________________ test_conv1d __________________________________

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

tests/test_conv.py:24: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_conv.py:27: in test_conv1d
    minitorch.grad_check(minitorch.Conv1dFun.apply, input, weight)
minitorch/tensor_functions.py:334: in grad_check
    out_plus = fn(*tensors)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cls = <class 'minitorch.fast_conv.Conv1dFun'>
inputs = (Tensor([[[1.e-05 0.e+00 0.e+00 0.e+00 0.e+00 0.e+00]]]), Tensor([[[0. 0. 0. 0.]]]))
History = <class 'minitorch.tensor.History'>
raw_inputs = [<minitorch.tensor_data.TensorData object at 0x74e0cf6ea710>, <minitorch.tensor_data.TensorData object at 0x74e0cf6e8f40>]
tensor_inputs = [Tensor([[[1.e-05 0.e+00 0.e+00 0.e+00 0.e+00 0.e+00]]]), Tensor([[[0. 0. 0. 0.]]])]

    @classmethod
    def apply(cls, *inputs):
        from .tensor import Tensor, History
    
        # Convert inputs to tensors
        raw_inputs = []
        tensor_inputs = []
        for x in inputs:
            if isinstance(x, Tensor):
                tensor_inputs.append(x)
                raw_inputs.append(x._tensor)
            else:
                tensor_inputs.append(x)
                raw_inputs.append(x)
    
        ctx = Context(False)
    
        # Call forward
        result_data = cls.forward(ctx, *raw_inputs)
    
        # Create output tensor
>       result = Tensor.make(result_data._storage, result_data.shape, backend=tensor_inputs[0].backend)
E       AttributeError: 'NoneType' object has no attribute '_storage'
E       Falsifying example: test_conv1d(
E           weight=Tensor([[[0. 0. 0. 0.]]]), input=Tensor([[[0. 0. 0. 0. 0. 0.]]]),
E       )

minitorch/tensor_functions.py:47: AttributeError
----------------------------- Captured stdout call -----------------------------
Tensor([[[0. 0. 0. 0. 0. 0.]]]) Tensor([[[0. 0. 0. 0.]]])
Tensor([[[0. 0. 0. 0. 0. 0.]]]) Tensor([[[0. 0. 0. 0.]]])
Tensor([[[0. 0. 0. 0. 0. 0.]]]) Tensor([[[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: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_conv.py:34: in test_conv1d_channel
    minitorch.grad_check(minitorch.Conv1dFun.apply, input, weight)
minitorch/tensor_functions.py:334: in grad_check
    out_plus = fn(*tensors)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cls = <class 'minitorch.fast_conv.Conv1dFun'>
inputs = (Tensor([[[1.e-05 0.e+00 0.e+00 0.e+00 0.e+00 0.e+00]
  [0.e+00 0.e+00 0.e+00 0.e+00 0.e+00 0.e+00]]

 [[0.e+00 0.e+00...e+00 0.e+00 0.e+00 0.e+00 0.e+00 0.e+00]]]), Tensor([[[0. 0.]
  [0. 0.]]

 [[0. 0.]
  [0. 0.]]

 [[0. 0.]
  [0. 0.]]]))
History = <class 'minitorch.tensor.History'>
raw_inputs = [<minitorch.tensor_data.TensorData object at 0x74e0cf67c7c0>, <minitorch.tensor_data.TensorData object at 0x74e0cf67db40>]
tensor_inputs = [Tensor([[[1.e-05 0.e+00 0.e+00 0.e+00 0.e+00 0.e+00]
  [0.e+00 0.e+00 0.e+00 0.e+00 0.e+00 0.e+00]]

 [[0.e+00 0.e+00...e+00 0.e+00 0.e+00 0.e+00 0.e+00 0.e+00]]]), Tensor([[[0. 0.]
  [0. 0.]]

 [[0. 0.]
  [0. 0.]]

 [[0. 0.]
  [0. 0.]]])]

    @classmethod
    def apply(cls, *inputs):
        from .tensor import Tensor, History
    
        # Convert inputs to tensors
        raw_inputs = []
        tensor_inputs = []
        for x in inputs:
            if isinstance(x, Tensor):
                tensor_inputs.append(x)
                raw_inputs.append(x._tensor)
            else:
                tensor_inputs.append(x)
                raw_inputs.append(x)
    
        ctx = Context(False)
    
        # Call forward
        result_data = cls.forward(ctx, *raw_inputs)
    
        # Create output tensor
>       result = Tensor.make(result_data._storage, result_data.shape, backend=tensor_inputs[0].backend)
E       AttributeError: 'NoneType' object has no attribute '_storage'
E       Falsifying example: test_conv1d_channel(
E           weight=Tensor([[[0. 0.]
E             [0. 0.]]
E           
E            [[0. 0.]
E             [0. 0.]]
E           
E            [[0. 0.]
E             [0. 0.]]]), input=Tensor([[[0. 0. 0. 0. 0. 0.]
E             [0. 0. 0. 0. 0. 0.]]
E           
E            [[0. 0. 0. 0. 0. 0.]
E             [0. 0. 0. 0. 0. 0.]]]),
E       )

minitorch/tensor_functions.py:47: AttributeError
__________________________________ test_conv ___________________________________

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

tests/test_conv.py:38: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_conv.py:40: in test_conv
    minitorch.grad_check(minitorch.Conv2dFun.apply, input, weight)
minitorch/tensor_functions.py:334: in grad_check
    out_plus = fn(*tensors)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cls = <class 'minitorch.fast_conv.Conv2dFun'>
inputs = (Tensor([[[[1.e-05 0.e+00 0.e+00 0.e+00 0.e+00 0.e+00]
   [0.e+00 0.e+00 0.e+00 0.e+00 0.e+00 0.e+00]
   [0.e+00 0.e+0...0.e+00 0.e+00 0.e+00]
   [0.e+00 0.e+00 0.e+00 0.e+00 0.e+00 0.e+00]]]]), Tensor([[[[0. 0. 0. 0.]
   [0. 0. 0. 0.]]]]))
History = <class 'minitorch.tensor.History'>
raw_inputs = [<minitorch.tensor_data.TensorData object at 0x74e0cf687160>, <minitorch.tensor_data.TensorData object at 0x74e0cf6a6680>]
tensor_inputs = [Tensor([[[[1.e-05 0.e+00 0.e+00 0.e+00 0.e+00 0.e+00]
   [0.e+00 0.e+00 0.e+00 0.e+00 0.e+00 0.e+00]
   [0.e+00 0.e+0...0.e+00 0.e+00 0.e+00]
   [0.e+00 0.e+00 0.e+00 0.e+00 0.e+00 0.e+00]]]]), Tensor([[[[0. 0. 0. 0.]
   [0. 0. 0. 0.]]]])]

    @classmethod
    def apply(cls, *inputs):
        from .tensor import Tensor, History
    
        # Convert inputs to tensors
        raw_inputs = []
        tensor_inputs = []
        for x in inputs:
            if isinstance(x, Tensor):
                tensor_inputs.append(x)
                raw_inputs.append(x._tensor)
            else:
                tensor_inputs.append(x)
                raw_inputs.append(x)
    
        ctx = Context(False)
    
        # Call forward
        result_data = cls.forward(ctx, *raw_inputs)
    
        # Create output tensor
>       result = Tensor.make(result_data._storage, result_data.shape, backend=tensor_inputs[0].backend)
E       AttributeError: 'NoneType' object has no attribute '_storage'
E       Falsifying example: test_conv(
E           weight=Tensor([[[[0. 0. 0. 0.]
E              [0. 0. 0. 0.]]]]), input=Tensor([[[[0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]]]]),
E       )

minitorch/tensor_functions.py:47: AttributeError
_______________________________ 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: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_conv.py:47: in test_conv_batch
    minitorch.grad_check(minitorch.Conv2dFun.apply, input, weight)
minitorch/tensor_functions.py:334: in grad_check
    out_plus = fn(*tensors)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cls = <class 'minitorch.fast_conv.Conv2dFun'>
inputs = (Tensor([[[[1.e-05 0.e+00 0.e+00 0.e+00 0.e+00 0.e+00]
   [0.e+00 0.e+00 0.e+00 0.e+00 0.e+00 0.e+00]
   [0.e+00 0.e+0...0.e+00 0.e+00 0.e+00]
   [0.e+00 0.e+00 0.e+00 0.e+00 0.e+00 0.e+00]]]]), Tensor([[[[0. 0. 0. 0.]
   [0. 0. 0. 0.]]]]))
History = <class 'minitorch.tensor.History'>
raw_inputs = [<minitorch.tensor_data.TensorData object at 0x74e0cf503520>, <minitorch.tensor_data.TensorData object at 0x74e0cf5020e0>]
tensor_inputs = [Tensor([[[[1.e-05 0.e+00 0.e+00 0.e+00 0.e+00 0.e+00]
   [0.e+00 0.e+00 0.e+00 0.e+00 0.e+00 0.e+00]
   [0.e+00 0.e+0...0.e+00 0.e+00 0.e+00]
   [0.e+00 0.e+00 0.e+00 0.e+00 0.e+00 0.e+00]]]]), Tensor([[[[0. 0. 0. 0.]
   [0. 0. 0. 0.]]]])]

    @classmethod
    def apply(cls, *inputs):
        from .tensor import Tensor, History
    
        # Convert inputs to tensors
        raw_inputs = []
        tensor_inputs = []
        for x in inputs:
            if isinstance(x, Tensor):
                tensor_inputs.append(x)
                raw_inputs.append(x._tensor)
            else:
                tensor_inputs.append(x)
                raw_inputs.append(x)
    
        ctx = Context(False)
    
        # Call forward
        result_data = cls.forward(ctx, *raw_inputs)
    
        # Create output tensor
>       result = Tensor.make(result_data._storage, result_data.shape, backend=tensor_inputs[0].backend)
E       AttributeError: 'NoneType' object has no attribute '_storage'
E       Falsifying example: test_conv_batch(
E           weight=Tensor([[[[0. 0. 0. 0.]
E              [0. 0. 0. 0.]]]]), input=Tensor([[[[0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]]]
E           
E           
E            [[[0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]]]]),
E       )

minitorch/tensor_functions.py:47: AttributeError
______________________________ 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: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_conv.py:54: in test_conv_channel
    minitorch.grad_check(minitorch.Conv2dFun.apply, input, weight)
minitorch/tensor_functions.py:334: in grad_check
    out_plus = fn(*tensors)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cls = <class 'minitorch.fast_conv.Conv2dFun'>
inputs = (Tensor([[[[1.e-05 0.e+00 0.e+00 0.e+00 0.e+00 0.e+00]
   [0.e+00 0.e+00 0.e+00 0.e+00 0.e+00 0.e+00]
   [0.e+00 0.e+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.]]]]))
History = <class 'minitorch.tensor.History'>
raw_inputs = [<minitorch.tensor_data.TensorData object at 0x74e0cf5383d0>, <minitorch.tensor_data.TensorData object at 0x74e0cf53b340>]
tensor_inputs = [Tensor([[[[1.e-05 0.e+00 0.e+00 0.e+00 0.e+00 0.e+00]
   [0.e+00 0.e+00 0.e+00 0.e+00 0.e+00 0.e+00]
   [0.e+00 0.e+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.]]]])]

    @classmethod
    def apply(cls, *inputs):
        from .tensor import Tensor, History
    
        # Convert inputs to tensors
        raw_inputs = []
        tensor_inputs = []
        for x in inputs:
            if isinstance(x, Tensor):
                tensor_inputs.append(x)
                raw_inputs.append(x._tensor)
            else:
                tensor_inputs.append(x)
                raw_inputs.append(x)
    
        ctx = Context(False)
    
        # Call forward
        result_data = cls.forward(ctx, *raw_inputs)
    
        # Create output tensor
>       result = Tensor.make(result_data._storage, result_data.shape, backend=tensor_inputs[0].backend)
E       AttributeError: 'NoneType' object has no attribute '_storage'
E       Falsifying example: test_conv_channel(
E           weight=Tensor([[[[0. 0. 0. 0.]
E              [0. 0. 0. 0.]]
E           
E             [[0. 0. 0. 0.]
E              [0. 0. 0. 0.]]]
E           
E           
E            [[[0. 0. 0. 0.]
E              [0. 0. 0. 0.]]
E           
E             [[0. 0. 0. 0.]
E              [0. 0. 0. 0.]]]
E           
E           
E            [[[0. 0. 0. 0.]
E              [0. 0. 0. 0.]]
E           
E             [[0. 0. 0. 0.]
E              [0. 0. 0. 0.]]]]), input=Tensor([[[[0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]]
E           
E             [[0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]]]
E           
E           
E            [[[0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]]
E           
E             [[0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]
E              [0. 0. 0. 0. 0. 0.]]]]),
E       )

minitorch/tensor_functions.py:47: AttributeError
__________________________________ 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_functions.py:311: in tensor
    return Tensor.make(data, shape, backend=backend)
minitorch/tensor.py:174: in make
    tensor_data = TensorData(storage, shape, strides)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <minitorch.tensor_data.TensorData object at 0x74e0cf6a7e20>
storage = array([[0., 1., 2., 3.],
       [0., 1., 2., 3.],
       [0., 1., 2., 3.],
       [0., 1., 2., 3.]])
shape = (4, 4), strides = (4, 1)

    def __init__(self, storage: Union[Sequence[float], Storage], shape: UserShape, strides: Optional[UserStrides]=None):
        if isinstance(storage, np.ndarray):
            self._storage = storage
        else:
            self._storage = array(storage, dtype=float64)
        if strides is None:
            strides = strides_from_shape(shape)
        assert isinstance(strides, tuple), 'Strides must be tuple'
        assert isinstance(shape, tuple), 'Shape must be tuple'
        if len(strides) != len(shape):
            raise IndexingError(f'Len of strides {strides} must match {shape}.')
        self._strides = array(strides)
        self._shape = array(shape)
        self.strides = strides
        self.dims = len(strides)
        self.size = int(prod(shape))
        self.shape = shape
>       assert len(self._storage) == self.size
E       AssertionError

minitorch/tensor_data.py:156: AssertionError
______________________________ test_stacked_demo _______________________________

    @pytest.mark.task0_4
    def test_stacked_demo() -> None:
        "Check that each of the properties match"
        mod = ModuleA1()
>       np = dict(mod.named_parameters())
E       TypeError: 'NoneType' object is not iterable

tests/test_module.py:49: TypeError
_________________________________ test_module __________________________________

    @pytest.mark.task0_4
>   @given(med_ints, med_ints)

tests/test_module.py:96: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

size_a = 1, size_b = 1

    @pytest.mark.task0_4
    @given(med_ints, med_ints)
    def test_module(size_a: int, size_b: int) -> None:
        "Check the properties of a single module"
        module = Module2()
        module.eval()
>       assert not module.training
E       assert not True
E        +  where True = Module2(\n  (module_c): Module3()\n).training
E       Falsifying example: test_module(
E           size_b=1, size_a=1,
E       )

tests/test_module.py:101: AssertionError
_____________________________ test_stacked_module ______________________________

    @pytest.mark.task0_4
>   @given(med_ints, med_ints, small_floats)

tests/test_module.py:117: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

size_a = 1, size_b = 1, val = 0.0

    @pytest.mark.task0_4
    @given(med_ints, med_ints, small_floats)
    def test_stacked_module(size_a: int, size_b: int, val: float) -> None:
        "Check the properties of a stacked module"
        module = Module1(size_a, size_b, val)
        module.eval()
>       assert not module.training
E       assert not True
E        +  where True = Module1(\n  (module_a): Module2(\n    (module_c): Module3()\n  )\n  (module_b): Module2(\n    (module_c): Module3()\n  )\n).training
E       Falsifying example: test_stacked_module(
E           val=0.0, size_b=1, size_a=1,
E       )

tests/test_module.py:122: AssertionError
________________________________ test_parameter ________________________________

    def test_parameter() -> None:
        t = MockParam()
        q = minitorch.Parameter(t)
        print(q)
        assert t.x
        t2 = MockParam()
        q.update(t2)
>       assert t2.x
E       assert False
E        +  where False = <tests.test_module.MockParam object at 0x74e0cf5c2bc0>.x

tests/test_module.py:184: AssertionError
----------------------------- Captured stdout call -----------------------------
<tests.test_module.MockParam object at 0x74e0cf5c2b60>
_________________________________ test_linear __________________________________

    @given(lists(scalars(), max_size=10), integers(min_value=5, max_value=20))
>   def test_linear(inputs: List[Scalar], out_size: int) -> None:

tests/test_modules.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_modules.py:63: in test_linear
    mid = lin.forward(inputs)
tests/test_modules.py:53: in forward
    y = [b.value for b in self.bias]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

.0 = <list_iterator object at 0x74e0cf5b3b20>

>   y = [b.value for b in self.bias]
E   AttributeError: 'NoneType' object has no attribute 'value'
E   Falsifying example: test_linear(
E       out_size=5, inputs=[],
E   )

tests/test_modules.py:53: AttributeError
_________________________________ test_nn_size _________________________________

    def test_nn_size() -> None:
        model = Network2()
>       assert len(model.parameters()) == (
            len(model.layer1.parameters()) + len(model.layer2.parameters())
        )
E       TypeError: object of type 'NoneType' has no len()

tests/test_modules.py:85: TypeError
___________________________________ test_avg ___________________________________

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

tests/test_nn.py:12: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

t = Tensor([[[[0. 0. 0. 0.]
   [0. 0. 0. 0.]
   [0. 0. 0. 0.]
   [0. 0. 0. 0.]]]])

    @pytest.mark.task4_3
    @given(tensors(shape=(1, 1, 4, 4)))
    def test_avg(t: Tensor) -> None:
        out = minitorch.avgpool2d(t, (2, 2))
        assert_close(
>           out[0, 0, 0, 0], sum([t[0, 0, i, j] for i in range(2) for j in range(2)]) / 4.0
        )
E       TypeError: 'NoneType' object is not subscriptable
E       Falsifying example: test_avg(
E           t=Tensor([[[[0. 0. 0. 0.]
E              [0. 0. 0. 0.]
E              [0. 0. 0. 0.]
E              [0. 0. 0. 0.]]]]),
E       )

tests/test_nn.py:16: TypeError
___________________________________ test_max ___________________________________

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

tests/test_nn.py:32: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

t = Tensor([[[0. 0. 0. 0.]
  [0. 0. 0. 0.]
  [0. 0. 0. 0.]]

 [[0. 0. 0. 0.]
  [0. 0. 0. 0.]
  [0. 0. 0. 0.]]])

    @pytest.mark.task4_4
    @given(tensors(shape=(2, 3, 4)))
    def test_max(t: Tensor) -> None:
        # TODO: Implement for Task 4.4.
>       raise NotImplementedError('Need to implement for Task 4.4')
E       NotImplementedError: Need to implement for Task 4.4
E       Falsifying example: test_max(
E           t=Tensor([[[0. 0. 0. 0.]
E             [0. 0. 0. 0.]
E             [0. 0. 0. 0.]]
E           
E            [[0. 0. 0. 0.]
E             [0. 0. 0. 0.]
E             [0. 0. 0. 0.]]]),
E       )

tests/test_nn.py:35: NotImplementedError
________________________________ test_max_pool _________________________________

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

tests/test_nn.py:39: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

t = Tensor([[[[0. 0. 0. 0.]
   [0. 0. 0. 0.]
   [0. 0. 0. 0.]
   [0. 0. 0. 0.]]]])

    @pytest.mark.task4_4
    @given(tensors(shape=(1, 1, 4, 4)))
    def test_max_pool(t: Tensor) -> None:
        out = minitorch.maxpool2d(t, (2, 2))
        print(out)
        print(t)
        assert_close(
>           out[0, 0, 0, 0], max([t[0, 0, i, j] for i in range(2) for j in range(2)])
        )
E       TypeError: 'NoneType' object is not subscriptable
E       Falsifying example: test_max_pool(
E           t=Tensor([[[[0. 0. 0. 0.]
E              [0. 0. 0. 0.]
E              [0. 0. 0. 0.]
E              [0. 0. 0. 0.]]]]),
E       )

tests/test_nn.py:45: TypeError
----------------------------- Captured stdout call -----------------------------
None
Tensor([[[[0. 0. 0. 0.]
   [0. 0. 0. 0.]
   [0. 0. 0. 0.]
   [0. 0. 0. 0.]]]])
None
Tensor([[[[0. 0. 0. 0.]
   [0. 0. 0. 0.]
   [0. 0. 0. 0.]
   [0. 0. 0. 0.]]]])
None
Tensor([[[[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 = Tensor([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=Tensor([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: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

t = Tensor([[[[0. 0. 0. 0.]
   [0. 0. 0. 0.]
   [0. 0. 0. 0.]
   [0. 0. 0. 0.]]]])

    @pytest.mark.task4_4
    @given(tensors(shape=(1, 1, 4, 4)))
    def test_softmax(t: Tensor) -> None:
        q = minitorch.softmax(t, 3)
>       x = q.sum(dim=3)
E       AttributeError: 'NoneType' object has no attribute 'sum'
E       Falsifying example: test_softmax(
E           t=Tensor([[[[0. 0. 0. 0.]
E              [0. 0. 0. 0.]
E              [0. 0. 0. 0.]
E              [0. 0. 0. 0.]]]]),
E       )

tests/test_nn.py:76: AttributeError
_______________________________ test_log_softmax _______________________________

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

tests/test_nn.py:87: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

t = Tensor([[[[0. 0. 0. 0.]
   [0. 0. 0. 0.]
   [0. 0. 0. 0.]
   [0. 0. 0. 0.]]]])

    @pytest.mark.task4_4
    @given(tensors(shape=(1, 1, 4, 4)))
    def test_log_softmax(t: Tensor) -> None:
        q = minitorch.softmax(t, 3)
>       q2 = minitorch.logsoftmax(t, 3).exp()
E       AttributeError: 'NoneType' object has no attribute 'exp'
E       Falsifying example: test_log_softmax(
E           t=Tensor([[[[0. 0. 0. 0.]
E              [0. 0. 0. 0.]
E              [0. 0. 0. 0.]
E              [0. 0. 0. 0.]]]]),
E       )

tests/test_nn.py:90: AttributeError
______________________________ test_one_args[fn9] ______________________________

fn = ('log', <function MathTest.log at 0x74e0cfa24430>)

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

tests/test_operators.py:230: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_operators.py:233: in test_one_args
    base_fn(t1)
minitorch/testing.py:55: in log
    return operators.log(operators.add(a, 100.0))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = 0.0

    def log(x: float) -> float:
        """$f(x) = log(x)$"""
>       return math.log(x)
E       ValueError: math domain error
E       Falsifying example: test_one_args(
E           t1=-100.0, fn=('log', log),
E       )

minitorch/operators.py:68: ValueError
______________________________ test_one_args[fn7] ______________________________

fn = ('inv', <function MathTestVariable.inv at 0x74e0cfa24c10>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf771480>)

    @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))
minitorch/testing.py:196: in <lambda>
    ('inv', cls.inv, lambda s: minitorch.operators.inv(s + 1.0)),
minitorch/operators.py:80: in inv
    return 1.0 / x
minitorch/scalar.py:62: in __rtruediv__
    return Mul.apply(b, Inv.apply(self))
minitorch/scalar_functions.py:43: in apply
    c = cls.forward(ctx, *raw_vals)
minitorch/scalar_functions.py:93: in forward
    return operators.inv(x)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = 0.0

    def inv(x: float) -> float:
        """$f(x) = 1/x$"""
>       return 1.0 / x
E       ZeroDivisionError: float division by zero
E       Falsifying example: test_one_args(
E           t1=Scalar(-1.000000),
E           fn=('inv', inv, lambda s: minitorch.operators.inv(s + 1.0)),
E       )

minitorch/operators.py:80: ZeroDivisionError
______________________________ test_one_args[fn9] ______________________________

fn = ('log', <function MathTestVariable.log at 0x74e0cfa24d30>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7715a0>)

    @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))
minitorch/testing.py:198: in <lambda>
    ('log', cls.log, lambda s: s.log()),
minitorch/scalar.py:129: in log
    return Log.apply(self)
minitorch/scalar_functions.py:43: in apply
    c = cls.forward(ctx, *raw_vals)
minitorch/scalar_functions.py:67: in forward
    return operators.log(x)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = 0.0

    def log(x: float) -> float:
        """$f(x) = log(x)$"""
>       return math.log(x)
E       ValueError: math domain error
E       Falsifying example: test_one_args(
E           t1=Scalar(0.000000), fn=('log', log, lambda s: s.log()),
E       )

minitorch/operators.py:68: ValueError
_____________________________ test_one_args[fn11] ______________________________

fn = ('exp', <function MathTestVariable.exp at 0x74e0cfa24e50>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7716c0>)

    @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 = 3.0041660239464334, b = 2.718281828459045

    def assert_close(a: float, b: float) -> None:
>       assert minitorch.operators.is_close(a, b), "Failure x=%f y=%f" % (a, b)
E       AssertionError: Failure x=3.004166 y=2.718282
E       Falsifying example: test_one_args(
E           t1=Scalar(11.000000), fn=('exp', exp, lambda s: (s * 0.1).exp()),
E       )

tests/strategies.py:16: AssertionError
______________________________ test_two_args[fn2] ______________________________

fn = ('div2', <function MathTestVariable.div2 at 0x74e0cfa25000>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf771870>)

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

tests/test_scalar.py:85: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_scalar.py:93: in test_two_args
    assert_close(scalar_fn(t1, t2).data, base_fn(t1.data, t2.data))
minitorch/testing.py:205: in <lambda>
    ('div2', cls.div2, lambda s1, s2: s1 / s2),
minitorch/scalar.py:59: in __truediv__
    return Mul.apply(self, Inv.apply(b))
minitorch/scalar_functions.py:43: in apply
    c = cls.forward(ctx, *raw_vals)
minitorch/scalar_functions.py:93: in forward
    return operators.inv(x)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = 0.0

    def inv(x: float) -> float:
        """$f(x) = 1/x$"""
>       return 1.0 / x
E       ZeroDivisionError: float division by zero
E       Falsifying example: test_two_args(
E           t2=Scalar(0.000000),
E           t1=Scalar(0.000000),
E           fn=('div2', div2, lambda s1, s2: s1 / s2),
E       )

minitorch/operators.py:80: ZeroDivisionError
___________________________ test_one_derivative[fn0] ___________________________

fn = ('neg', <function MathTestVariable.neg at 0x74e0cfa24820>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf770d30>)

    @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)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

f = <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf770d30>
scalars = (Scalar(0.000000),), i = 0, x = Scalar(0.000000)
numerical = Scalar(-1.000000)

    def derivative_check(f: Any, *scalars: Scalar) -> None:
        """
        Checks that autodiff works on a python function.
        Asserts False if derivative is incorrect.
    
        Parameters:
            f : function from n-scalars to 1-scalar.
            *scalars  : n input scalar values.
        """
        for i, x in enumerate(scalars):
            # Compute derivative using central difference
            numerical = central_difference(f, *scalars, arg=i)
    
            # Compute derivative using autodiff
            out = f(*scalars)
            out.backward()
            autodiff = scalars[i].derivative
    
            # Check they are close
>           assert abs(numerical - autodiff) < 1e-4, f"Derivative check failed for arg {i}: numerical={numerical}, autodiff={autodiff}"
E           TypeError: bad operand type for abs(): 'Scalar'
E           Falsifying example: test_one_derivative(
E               t1=Scalar(0.000000), fn=('neg', neg, lambda s: -s),
E           )

minitorch/scalar.py:154: TypeError
___________________________ test_one_derivative[fn1] ___________________________

fn = ('addConstant', <function MathTestVariable.addConstant at 0x74e0cfa248b0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf770f70>)

    @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)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

f = <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf770f70>
scalars = (Scalar(0.000000),), i = 0, x = Scalar(0.000000)
numerical = Scalar(1.000000)

    def derivative_check(f: Any, *scalars: Scalar) -> None:
        """
        Checks that autodiff works on a python function.
        Asserts False if derivative is incorrect.
    
        Parameters:
            f : function from n-scalars to 1-scalar.
            *scalars  : n input scalar values.
        """
        for i, x in enumerate(scalars):
            # Compute derivative using central difference
            numerical = central_difference(f, *scalars, arg=i)
    
            # Compute derivative using autodiff
            out = f(*scalars)
            out.backward()
            autodiff = scalars[i].derivative
    
            # Check they are close
>           assert abs(numerical - autodiff) < 1e-4, f"Derivative check failed for arg {i}: numerical={numerical}, autodiff={autodiff}"
E           TypeError: bad operand type for abs(): 'Scalar'
E           Falsifying example: test_one_derivative(
E               t1=Scalar(0.000000), fn=('addConstant', addConstant, lambda s: s + 5.0),
E           )

minitorch/scalar.py:154: TypeError
___________________________ test_one_derivative[fn2] ___________________________

fn = ('square', <function MathTestVariable.square at 0x74e0cfa24940>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7711b0>)

    @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)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

f = <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7711b0>
scalars = (Scalar(0.000000),), i = 0, x = Scalar(0.000000)
numerical = Scalar(0.000000)

    def derivative_check(f: Any, *scalars: Scalar) -> None:
        """
        Checks that autodiff works on a python function.
        Asserts False if derivative is incorrect.
    
        Parameters:
            f : function from n-scalars to 1-scalar.
            *scalars  : n input scalar values.
        """
        for i, x in enumerate(scalars):
            # Compute derivative using central difference
            numerical = central_difference(f, *scalars, arg=i)
    
            # Compute derivative using autodiff
            out = f(*scalars)
            out.backward()
            autodiff = scalars[i].derivative
    
            # Check they are close
>           assert abs(numerical - autodiff) < 1e-4, f"Derivative check failed for arg {i}: numerical={numerical}, autodiff={autodiff}"
E           TypeError: bad operand type for abs(): 'Scalar'
E           Falsifying example: test_one_derivative(
E               t1=Scalar(0.000000), fn=('square', square, lambda s: s * s),
E           )

minitorch/scalar.py:154: TypeError
___________________________ test_one_derivative[fn3] ___________________________

fn = ('cube', <function MathTestVariable.cube at 0x74e0cfa249d0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf771240>)

    @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)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

f = <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf771240>
scalars = (Scalar(0.000000),), i = 0, x = Scalar(0.000000)
numerical = Scalar(0.000000)

    def derivative_check(f: Any, *scalars: Scalar) -> None:
        """
        Checks that autodiff works on a python function.
        Asserts False if derivative is incorrect.
    
        Parameters:
            f : function from n-scalars to 1-scalar.
            *scalars  : n input scalar values.
        """
        for i, x in enumerate(scalars):
            # Compute derivative using central difference
            numerical = central_difference(f, *scalars, arg=i)
    
            # Compute derivative using autodiff
            out = f(*scalars)
            out.backward()
            autodiff = scalars[i].derivative
    
            # Check they are close
>           assert abs(numerical - autodiff) < 1e-4, f"Derivative check failed for arg {i}: numerical={numerical}, autodiff={autodiff}"
E           TypeError: bad operand type for abs(): 'Scalar'
E           Falsifying example: test_one_derivative(
E               t1=Scalar(0.000000), fn=('cube', cube, lambda s: s * s * s),
E           )

minitorch/scalar.py:154: TypeError
___________________________ test_one_derivative[fn4] ___________________________

fn = ('subConstant', <function MathTestVariable.subConstant at 0x74e0cfa24a60>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7712d0>)

    @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)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

f = <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7712d0>
scalars = (Scalar(0.000000),), i = 0, x = Scalar(0.000000)
numerical = Scalar(1.000000)

    def derivative_check(f: Any, *scalars: Scalar) -> None:
        """
        Checks that autodiff works on a python function.
        Asserts False if derivative is incorrect.
    
        Parameters:
            f : function from n-scalars to 1-scalar.
            *scalars  : n input scalar values.
        """
        for i, x in enumerate(scalars):
            # Compute derivative using central difference
            numerical = central_difference(f, *scalars, arg=i)
    
            # Compute derivative using autodiff
            out = f(*scalars)
            out.backward()
            autodiff = scalars[i].derivative
    
            # Check they are close
>           assert abs(numerical - autodiff) < 1e-4, f"Derivative check failed for arg {i}: numerical={numerical}, autodiff={autodiff}"
E           TypeError: bad operand type for abs(): 'Scalar'
E           Falsifying example: test_one_derivative(
E               t1=Scalar(0.000000), fn=('subConstant', subConstant, lambda s: s - 5.0),
E           )

minitorch/scalar.py:154: TypeError
___________________________ test_one_derivative[fn5] ___________________________

fn = ('multConstant', <function MathTestVariable.multConstant at 0x74e0cfa24af0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf771360>)

    @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)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

f = <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf771360>
scalars = (Scalar(0.000000),), i = 0, x = Scalar(0.000000)
numerical = Scalar(5.000000)

    def derivative_check(f: Any, *scalars: Scalar) -> None:
        """
        Checks that autodiff works on a python function.
        Asserts False if derivative is incorrect.
    
        Parameters:
            f : function from n-scalars to 1-scalar.
            *scalars  : n input scalar values.
        """
        for i, x in enumerate(scalars):
            # Compute derivative using central difference
            numerical = central_difference(f, *scalars, arg=i)
    
            # Compute derivative using autodiff
            out = f(*scalars)
            out.backward()
            autodiff = scalars[i].derivative
    
            # Check they are close
>           assert abs(numerical - autodiff) < 1e-4, f"Derivative check failed for arg {i}: numerical={numerical}, autodiff={autodiff}"
E           TypeError: bad operand type for abs(): 'Scalar'
E           Falsifying example: test_one_derivative(
E               t1=Scalar(0.000000), fn=('multConstant', multConstant, lambda s: s * 5.0),
E           )

minitorch/scalar.py:154: TypeError
___________________________ test_one_derivative[fn6] ___________________________

fn = ('div', <function MathTestVariable.div at 0x74e0cfa24b80>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7713f0>)

    @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)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

f = <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7713f0>
scalars = (Scalar(0.000000),), i = 0, x = Scalar(0.000000)
numerical = Scalar(0.500000)

    def derivative_check(f: Any, *scalars: Scalar) -> None:
        """
        Checks that autodiff works on a python function.
        Asserts False if derivative is incorrect.
    
        Parameters:
            f : function from n-scalars to 1-scalar.
            *scalars  : n input scalar values.
        """
        for i, x in enumerate(scalars):
            # Compute derivative using central difference
            numerical = central_difference(f, *scalars, arg=i)
    
            # Compute derivative using autodiff
            out = f(*scalars)
            out.backward()
            autodiff = scalars[i].derivative
    
            # Check they are close
>           assert abs(numerical - autodiff) < 1e-4, f"Derivative check failed for arg {i}: numerical={numerical}, autodiff={autodiff}"
E           TypeError: bad operand type for abs(): 'Scalar'
E           Falsifying example: test_one_derivative(
E               t1=Scalar(0.000000), fn=('div', div, lambda s: s / 2.0),
E           )

minitorch/scalar.py:154: TypeError
___________________________ test_one_derivative[fn7] ___________________________

fn = ('inv', <function MathTestVariable.inv at 0x74e0cfa24c10>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf771480>)

    @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)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

f = <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf771480>
scalars = (Scalar(0.000000),), i = 0, x = Scalar(0.000000)
numerical = Scalar(-1.000000)

    def derivative_check(f: Any, *scalars: Scalar) -> None:
        """
        Checks that autodiff works on a python function.
        Asserts False if derivative is incorrect.
    
        Parameters:
            f : function from n-scalars to 1-scalar.
            *scalars  : n input scalar values.
        """
        for i, x in enumerate(scalars):
            # Compute derivative using central difference
            numerical = central_difference(f, *scalars, arg=i)
    
            # Compute derivative using autodiff
            out = f(*scalars)
            out.backward()
            autodiff = scalars[i].derivative
    
            # Check they are close
>           assert abs(numerical - autodiff) < 1e-4, f"Derivative check failed for arg {i}: numerical={numerical}, autodiff={autodiff}"
E           TypeError: bad operand type for abs(): 'Scalar'
E           Falsifying example: test_one_derivative(
E               t1=Scalar(0.000000),
E               fn=('inv', inv, lambda s: minitorch.operators.inv(s + 1.0)),
E           )

minitorch/scalar.py:154: TypeError
___________________________ test_one_derivative[fn8] ___________________________

fn = ('sig', <function MathTestVariable.sig at 0x74e0cfa24ca0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf771510>)

    @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)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

f = <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf771510>
scalars = (Scalar(0.000000),), i = 0, x = Scalar(0.000000)
numerical = Scalar(0.250000)

    def derivative_check(f: Any, *scalars: Scalar) -> None:
        """
        Checks that autodiff works on a python function.
        Asserts False if derivative is incorrect.
    
        Parameters:
            f : function from n-scalars to 1-scalar.
            *scalars  : n input scalar values.
        """
        for i, x in enumerate(scalars):
            # Compute derivative using central difference
            numerical = central_difference(f, *scalars, arg=i)
    
            # Compute derivative using autodiff
            out = f(*scalars)
            out.backward()
            autodiff = scalars[i].derivative
    
            # Check they are close
>           assert abs(numerical - autodiff) < 1e-4, f"Derivative check failed for arg {i}: numerical={numerical}, autodiff={autodiff}"
E           TypeError: bad operand type for abs(): 'Scalar'
E           Falsifying example: test_one_derivative(
E               t1=Scalar(0.000000), fn=('sig', sig, lambda s: s.sigmoid()),
E           )

minitorch/scalar.py:154: TypeError
___________________________ test_one_derivative[fn9] ___________________________

fn = ('log', <function MathTestVariable.log at 0x74e0cfa24d30>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7715a0>)

    @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:146: in derivative_check
    numerical = central_difference(f, *scalars, arg=i)
minitorch/autodiff.py:30: in central_difference
    return (f(*vals_plus) - f(*vals_minus)) / (2 * epsilon)
minitorch/testing.py:198: in <lambda>
    ('log', cls.log, lambda s: s.log()),
minitorch/scalar.py:129: in log
    return Log.apply(self)
minitorch/scalar_functions.py:43: in apply
    c = cls.forward(ctx, *raw_vals)
minitorch/scalar_functions.py:67: in forward
    return operators.log(x)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = -1e-06

    def log(x: float) -> float:
        """$f(x) = log(x)$"""
>       return math.log(x)
E       ValueError: math domain error
E       Falsifying example: test_one_derivative(
E           t1=Scalar(0.000000), fn=('log', log, lambda s: s.log()),
E       )

minitorch/operators.py:68: ValueError
__________________________ test_one_derivative[fn10] ___________________________

fn = ('relu', <function MathTestVariable.relu at 0x74e0cfa24dc0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf771630>)

    @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)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

f = <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf771630>
scalars = (Scalar(0.000000),), i = 0, x = Scalar(0.000000)
numerical = Scalar(0.500000)

    def derivative_check(f: Any, *scalars: Scalar) -> None:
        """
        Checks that autodiff works on a python function.
        Asserts False if derivative is incorrect.
    
        Parameters:
            f : function from n-scalars to 1-scalar.
            *scalars  : n input scalar values.
        """
        for i, x in enumerate(scalars):
            # Compute derivative using central difference
            numerical = central_difference(f, *scalars, arg=i)
    
            # Compute derivative using autodiff
            out = f(*scalars)
            out.backward()
            autodiff = scalars[i].derivative
    
            # Check they are close
>           assert abs(numerical - autodiff) < 1e-4, f"Derivative check failed for arg {i}: numerical={numerical}, autodiff={autodiff}"
E           TypeError: bad operand type for abs(): 'Scalar'
E           Falsifying example: test_one_derivative(
E               t1=Scalar(0.000000), fn=('relu', relu, lambda s: s.relu()),
E           )

minitorch/scalar.py:154: TypeError
__________________________ test_one_derivative[fn11] ___________________________

fn = ('exp', <function MathTestVariable.exp at 0x74e0cfa24e50>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7716c0>)

    @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)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

f = <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7716c0>
scalars = (Scalar(0.000000),), i = 0, x = Scalar(0.000000)
numerical = Scalar(0.100000)

    def derivative_check(f: Any, *scalars: Scalar) -> None:
        """
        Checks that autodiff works on a python function.
        Asserts False if derivative is incorrect.
    
        Parameters:
            f : function from n-scalars to 1-scalar.
            *scalars  : n input scalar values.
        """
        for i, x in enumerate(scalars):
            # Compute derivative using central difference
            numerical = central_difference(f, *scalars, arg=i)
    
            # Compute derivative using autodiff
            out = f(*scalars)
            out.backward()
            autodiff = scalars[i].derivative
    
            # Check they are close
>           assert abs(numerical - autodiff) < 1e-4, f"Derivative check failed for arg {i}: numerical={numerical}, autodiff={autodiff}"
E           TypeError: bad operand type for abs(): 'Scalar'
E           Falsifying example: test_one_derivative(
E               t1=Scalar(0.000000), fn=('exp', exp, lambda s: (s * 0.1).exp()),
E           )

minitorch/scalar.py:154: TypeError
___________________________ test_two_derivative[fn0] ___________________________

fn = ('add2', <function MathTestVariable.add2 at 0x74e0cfa24ee0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf771750>)

    @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)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

f = <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf771750>
scalars = (Scalar(0.000000), Scalar(0.000000)), i = 0, x = Scalar(0.000000)
numerical = Scalar(1.000000)

    def derivative_check(f: Any, *scalars: Scalar) -> None:
        """
        Checks that autodiff works on a python function.
        Asserts False if derivative is incorrect.
    
        Parameters:
            f : function from n-scalars to 1-scalar.
            *scalars  : n input scalar values.
        """
        for i, x in enumerate(scalars):
            # Compute derivative using central difference
            numerical = central_difference(f, *scalars, arg=i)
    
            # Compute derivative using autodiff
            out = f(*scalars)
            out.backward()
            autodiff = scalars[i].derivative
    
            # Check they are close
>           assert abs(numerical - autodiff) < 1e-4, f"Derivative check failed for arg {i}: numerical={numerical}, autodiff={autodiff}"
E           TypeError: bad operand type for abs(): 'Scalar'
E           Falsifying example: test_two_derivative(
E               t2=Scalar(0.000000),
E               t1=Scalar(0.000000),
E               fn=('add2', add2, lambda s1, s2: s1 + s2),
E           )

minitorch/scalar.py:154: TypeError
___________________________ test_two_derivative[fn1] ___________________________

fn = ('mul2', <function MathTestVariable.mul2 at 0x74e0cfa24f70>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7717e0>)

    @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)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

f = <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7717e0>
scalars = (Scalar(0.000000), Scalar(0.000000)), i = 0, x = Scalar(0.000000)
numerical = Scalar(0.000000)

    def derivative_check(f: Any, *scalars: Scalar) -> None:
        """
        Checks that autodiff works on a python function.
        Asserts False if derivative is incorrect.
    
        Parameters:
            f : function from n-scalars to 1-scalar.
            *scalars  : n input scalar values.
        """
        for i, x in enumerate(scalars):
            # Compute derivative using central difference
            numerical = central_difference(f, *scalars, arg=i)
    
            # Compute derivative using autodiff
            out = f(*scalars)
            out.backward()
            autodiff = scalars[i].derivative
    
            # Check they are close
>           assert abs(numerical - autodiff) < 1e-4, f"Derivative check failed for arg {i}: numerical={numerical}, autodiff={autodiff}"
E           TypeError: bad operand type for abs(): 'Scalar'
E           Falsifying example: test_two_derivative(
E               t2=Scalar(0.000000),
E               t1=Scalar(0.000000),
E               fn=('mul2', mul2, lambda s1, s2: s1 * s2),
E           )

minitorch/scalar.py:154: TypeError
___________________________ test_two_derivative[fn2] ___________________________

fn = ('div2', <function MathTestVariable.div2 at 0x74e0cfa25000>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf771870>)

    @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:146: in derivative_check
    numerical = central_difference(f, *scalars, arg=i)
minitorch/autodiff.py:30: in central_difference
    return (f(*vals_plus) - f(*vals_minus)) / (2 * epsilon)
minitorch/testing.py:205: in <lambda>
    ('div2', cls.div2, lambda s1, s2: s1 / s2),
minitorch/scalar.py:59: in __truediv__
    return Mul.apply(self, Inv.apply(b))
minitorch/scalar_functions.py:43: in apply
    c = cls.forward(ctx, *raw_vals)
minitorch/scalar_functions.py:93: in forward
    return operators.inv(x)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = 0.0

    def inv(x: float) -> float:
        """$f(x) = 1/x$"""
>       return 1.0 / x
E       ZeroDivisionError: float division by zero
E       Falsifying example: test_two_derivative(
E           t2=Scalar(0.000000),
E           t1=Scalar(0.000000),
E           fn=('div2', div2, lambda s1, s2: s1 / s2),
E       )

minitorch/operators.py:80: ZeroDivisionError
_________________________________ test_create __________________________________

    @given(lists(small_floats, min_size=1))
>   def test_create(t1: List[float]) -> None:

tests/test_tensor.py:16: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor.py:20: in test_create
    assert t1[i] == t2[i]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = Tensor([0.]), key = 0

    def __getitem__(self, key: Union[int, UserIndex]) -> float:
        key2 = (key,) if isinstance(key, int) else key
>       return self._tensor.get(key2)
E       AttributeError: 'TensorData' object has no attribute 'get'
E       Falsifying example: test_create(
E           t1=[0.0],
E       )

minitorch/tensor.py:162: AttributeError
______________________________ test_one_args[fn0] ______________________________

fn = ('neg', <function MathTestVariable.neg at 0x74e0cfa24820>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf772680>)

    @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:189: in <lambda>
    ('neg', cls.neg, lambda s: -s),
minitorch/tensor.py:125: in __neg__
    return Neg.apply(self)
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=())
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf393dc0>

    @staticmethod
    def forward(ctx: Context, t1):
>       return t1.backend.neg_map(t1)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_args(
E           t1=Tensor([0.]), fn=('neg', neg, lambda s: -s),
E       )

minitorch/tensor_functions.py:59: AttributeError
______________________________ test_one_args[fn1] ______________________________

fn = ('addConstant', <function MathTestVariable.addConstant at 0x74e0cfa248b0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf772710>)

    @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:190: in <lambda>
    ('addConstant', cls.addConstant, lambda s: s + 5.0),
minitorch/tensor.py:97: in __add__
    return Add.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=())
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf084460>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf0874f0>

    @staticmethod
    def forward(ctx: Context, t1, t2):
>       return t1.backend.add_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_args(
E           t1=Tensor([0.]), fn=('addConstant', addConstant, lambda s: s + 5.0),
E       )

minitorch/tensor_functions.py:79: AttributeError
______________________________ test_one_args[fn2] ______________________________

fn = ('square', <function MathTestVariable.square at 0x74e0cfa24940>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7727a0>)

    @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:191: in <lambda>
    ('square', cls.square, lambda s: s * s),
minitorch/tensor.py:103: in __mul__
    return Mul.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf10f040>, <minitorch.tensor_data.TensorData object at 0x74e0cf10f040>))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf10f040>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf10f040>

    @staticmethod
    def forward(ctx: Context, t1, t2):
        ctx.save_for_backward(t1, t2)
>       return t1.backend.mul_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_args(
E           t1=Tensor([0.]), fn=('square', square, lambda s: s * s),
E       )

minitorch/tensor_functions.py:89: AttributeError
______________________________ test_one_args[fn3] ______________________________

fn = ('cube', <function MathTestVariable.cube at 0x74e0cfa249d0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf772830>)

    @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:192: in <lambda>
    ('cube', cls.cube, lambda s: s * s * s),
minitorch/tensor.py:103: in __mul__
    return Mul.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf3c1630>, <minitorch.tensor_data.TensorData object at 0x74e0cf3c1630>))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf3c1630>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf3c1630>

    @staticmethod
    def forward(ctx: Context, t1, t2):
        ctx.save_for_backward(t1, t2)
>       return t1.backend.mul_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_args(
E           t1=Tensor([0.]), fn=('cube', cube, lambda s: s * s * s),
E       )

minitorch/tensor_functions.py:89: AttributeError
______________________________ test_one_args[fn4] ______________________________

fn = ('subConstant', <function MathTestVariable.subConstant at 0x74e0cfa24a60>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7728c0>)

    @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:193: in <lambda>
    ('subConstant', cls.subConstant, lambda s: s - 5.0),
minitorch/tensor.py:100: in __sub__
    return Add.apply(self, -self._ensure_tensor(b))
minitorch/tensor.py:125: in __neg__
    return Neg.apply(self)
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=())
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf10e9b0>

    @staticmethod
    def forward(ctx: Context, t1):
>       return t1.backend.neg_map(t1)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_args(
E           t1=Tensor([0.]), fn=('subConstant', subConstant, lambda s: s - 5.0),
E       )

minitorch/tensor_functions.py:59: AttributeError
______________________________ test_one_args[fn5] ______________________________

fn = ('multConstant', <function MathTestVariable.multConstant at 0x74e0cfa24af0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf772950>)

    @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:194: in <lambda>
    ('multConstant', cls.multConstant, lambda s: s * 5.0),
minitorch/tensor.py:103: in __mul__
    return Mul.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf5a4ac0>, <minitorch.tensor_data.TensorData object at 0x74e0cf5a7c10>))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf5a4ac0>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf5a7c10>

    @staticmethod
    def forward(ctx: Context, t1, t2):
        ctx.save_for_backward(t1, t2)
>       return t1.backend.mul_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_args(
E           t1=Tensor([0.]), fn=('multConstant', multConstant, lambda s: s * 5.0),
E       )

minitorch/tensor_functions.py:89: AttributeError
______________________________ test_one_args[fn6] ______________________________

fn = ('div', <function MathTestVariable.div at 0x74e0cfa24b80>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7729e0>)

    @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:195: in <lambda>
    ('div', cls.div, lambda s: s / 2.0),
minitorch/tensor.py:106: in __truediv__
    return Mul.apply(self, Inv.apply(self._ensure_tensor(b)))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf5a5b10>,))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf5a5b10>

    @staticmethod
    def forward(ctx: Context, t1):
        ctx.save_for_backward(t1)
>       return t1.backend.inv_map(t1)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_args(
E           t1=Tensor([0.]), fn=('div', div, lambda s: s / 2.0),
E       )

minitorch/tensor_functions.py:69: AttributeError
______________________________ test_one_args[fn7] ______________________________

fn = ('inv', <function MathTestVariable.inv at 0x74e0cfa24c10>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf772a70>)

    @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:196: in <lambda>
    ('inv', cls.inv, lambda s: minitorch.operators.inv(s + 1.0)),
minitorch/tensor.py:97: in __add__
    return Add.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=())
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf0cfd00>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf0cd840>

    @staticmethod
    def forward(ctx: Context, t1, t2):
>       return t1.backend.add_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_args(
E           t1=Tensor([0.]),
E           fn=('inv', inv, lambda s: minitorch.operators.inv(s + 1.0)),
E       )

minitorch/tensor_functions.py:79: AttributeError
______________________________ test_one_args[fn8] ______________________________

fn = ('sig', <function MathTestVariable.sig at 0x74e0cfa24ca0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf772b00>)

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

tests/test_tensor.py:24: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor.py:31: in test_one_args
    t2 = tensor_fn(t1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

s = Tensor([0.])

>       ('sig', cls.sig, lambda s: s.sigmoid()),
        ('log', cls.log, lambda s: s.log()),
        ('relu', cls.relu, lambda s: s.relu()),
        ('exp', cls.exp, lambda s: (s * 0.1).exp()),
    ]
E   AttributeError: 'Tensor' object has no attribute 'sigmoid'
E   Falsifying example: test_one_args(
E       t1=Tensor([0.]), fn=('sig', sig, lambda s: s.sigmoid()),
E   )

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

fn = ('log', <function MathTestVariable.log at 0x74e0cfa24d30>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf772b90>)

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

tests/test_tensor.py:24: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor.py:31: in test_one_args
    t2 = tensor_fn(t1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

s = Tensor([0.])

>       ('log', cls.log, lambda s: s.log()),
        ('relu', cls.relu, lambda s: s.relu()),
        ('exp', cls.exp, lambda s: (s * 0.1).exp()),
    ]
E   AttributeError: 'Tensor' object has no attribute 'log'
E   Falsifying example: test_one_args(
E       t1=Tensor([0.]), fn=('log', log, lambda s: s.log()),
E   )

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

fn = ('relu', <function MathTestVariable.relu at 0x74e0cfa24dc0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf772c20>)

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

tests/test_tensor.py:24: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor.py:31: in test_one_args
    t2 = tensor_fn(t1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

s = Tensor([0.])

>       ('relu', cls.relu, lambda s: s.relu()),
        ('exp', cls.exp, lambda s: (s * 0.1).exp()),
    ]
E   AttributeError: 'Tensor' object has no attribute 'relu'
E   Falsifying example: test_one_args(
E       t1=Tensor([0.]), fn=('relu', relu, lambda s: s.relu()),
E   )

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

fn = ('exp', <function MathTestVariable.exp at 0x74e0cfa24e50>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf772cb0>)

    @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:200: in <lambda>
    ('exp', cls.exp, lambda s: (s * 0.1).exp()),
minitorch/tensor.py:103: in __mul__
    return Mul.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf10ff10>, <minitorch.tensor_data.TensorData object at 0x74e0cf10d090>))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf10ff10>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf10d090>

    @staticmethod
    def forward(ctx: Context, t1, t2):
        ctx.save_for_backward(t1, t2)
>       return t1.backend.mul_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_args(
E           t1=Tensor([0.]), fn=('exp', exp, lambda s: (s * 0.1).exp()),
E       )

minitorch/tensor_functions.py:89: AttributeError
______________________________ test_two_args[fn0] ______________________________

fn = ('add2', <function MathTestVariable.add2 at 0x74e0cfa24ee0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf772d40>)

    @given(shaped_tensors(2))
>   @pytest.mark.task2_3

tests/test_tensor.py:37: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor.py:45: in test_two_args
    t3 = tensor_fn(t1, t2)
minitorch/testing.py:203: in <lambda>
    ('add2', cls.add2, lambda s1, s2: s1 + s2),
minitorch/tensor.py:97: in __add__
    return Add.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=())
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf4b0a00>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf26a530>

    @staticmethod
    def forward(ctx: Context, t1, t2):
>       return t1.backend.add_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_two_args(
E           ts=[Tensor([0.]), Tensor([0.])], fn=('add2', add2, lambda s1, s2: s1 + s2),
E       )

minitorch/tensor_functions.py:79: AttributeError
______________________________ test_two_args[fn1] ______________________________

fn = ('mul2', <function MathTestVariable.mul2 at 0x74e0cfa24f70>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf772dd0>)

    @given(shaped_tensors(2))
>   @pytest.mark.task2_3

tests/test_tensor.py:37: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor.py:45: in test_two_args
    t3 = tensor_fn(t1, t2)
minitorch/testing.py:204: in <lambda>
    ('mul2', cls.mul2, lambda s1, s2: s1 * s2),
minitorch/tensor.py:103: in __mul__
    return Mul.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf26ba30>, <minitorch.tensor_data.TensorData object at 0x74e0cf2e8e50>))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf26ba30>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf2e8e50>

    @staticmethod
    def forward(ctx: Context, t1, t2):
        ctx.save_for_backward(t1, t2)
>       return t1.backend.mul_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_two_args(
E           ts=[Tensor([0.]), Tensor([0.])], fn=('mul2', mul2, lambda s1, s2: s1 * s2),
E       )

minitorch/tensor_functions.py:89: AttributeError
______________________________ test_two_args[fn2] ______________________________

fn = ('div2', <function MathTestVariable.div2 at 0x74e0cfa25000>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf772e60>)

    @given(shaped_tensors(2))
>   @pytest.mark.task2_3

tests/test_tensor.py:37: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor.py:45: in test_two_args
    t3 = tensor_fn(t1, t2)
minitorch/testing.py:205: in <lambda>
    ('div2', cls.div2, lambda s1, s2: s1 / s2),
minitorch/tensor.py:106: in __truediv__
    return Mul.apply(self, Inv.apply(self._ensure_tensor(b)))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf2dab90>,))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf2dab90>

    @staticmethod
    def forward(ctx: Context, t1):
        ctx.save_for_backward(t1)
>       return t1.backend.inv_map(t1)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_two_args(
E           ts=[Tensor([0.]), Tensor([0.])], fn=('div2', div2, lambda s1, s2: s1 / s2),
E       )

minitorch/tensor_functions.py:69: AttributeError
___________________________ test_one_derivative[fn0] ___________________________

fn = ('neg', <function MathTestVariable.neg at 0x74e0cfa24820>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf772680>)

    @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_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:189: in <lambda>
    ('neg', cls.neg, lambda s: -s),
minitorch/tensor.py:125: in __neg__
    return Neg.apply(self)
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=())
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf5c0ac0>

    @staticmethod
    def forward(ctx: Context, t1):
>       return t1.backend.neg_map(t1)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_derivative(
E           t1=Tensor([0.]), fn=('neg', neg, lambda s: -s),
E       )

minitorch/tensor_functions.py:59: AttributeError
___________________________ test_one_derivative[fn1] ___________________________

fn = ('addConstant', <function MathTestVariable.addConstant at 0x74e0cfa248b0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf772710>)

    @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_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:190: in <lambda>
    ('addConstant', cls.addConstant, lambda s: s + 5.0),
minitorch/tensor.py:97: in __add__
    return Add.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=())
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf4b3c40>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf4b1c00>

    @staticmethod
    def forward(ctx: Context, t1, t2):
>       return t1.backend.add_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_derivative(
E           t1=Tensor([0.]), fn=('addConstant', addConstant, lambda s: s + 5.0),
E       )

minitorch/tensor_functions.py:79: AttributeError
___________________________ test_one_derivative[fn2] ___________________________

fn = ('square', <function MathTestVariable.square at 0x74e0cfa24940>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7727a0>)

    @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_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:191: in <lambda>
    ('square', cls.square, lambda s: s * s),
minitorch/tensor.py:103: in __mul__
    return Mul.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf1ba4a0>, <minitorch.tensor_data.TensorData object at 0x74e0cf1ba4a0>))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf1ba4a0>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf1ba4a0>

    @staticmethod
    def forward(ctx: Context, t1, t2):
        ctx.save_for_backward(t1, t2)
>       return t1.backend.mul_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_derivative(
E           t1=Tensor([0.]), fn=('square', square, lambda s: s * s),
E       )

minitorch/tensor_functions.py:89: AttributeError
___________________________ test_one_derivative[fn3] ___________________________

fn = ('cube', <function MathTestVariable.cube at 0x74e0cfa249d0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf772830>)

    @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_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:192: in <lambda>
    ('cube', cls.cube, lambda s: s * s * s),
minitorch/tensor.py:103: in __mul__
    return Mul.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf2b5de0>, <minitorch.tensor_data.TensorData object at 0x74e0cf2b5de0>))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf2b5de0>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf2b5de0>

    @staticmethod
    def forward(ctx: Context, t1, t2):
        ctx.save_for_backward(t1, t2)
>       return t1.backend.mul_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_derivative(
E           t1=Tensor([0.]), fn=('cube', cube, lambda s: s * s * s),
E       )

minitorch/tensor_functions.py:89: AttributeError
___________________________ test_one_derivative[fn4] ___________________________

fn = ('subConstant', <function MathTestVariable.subConstant at 0x74e0cfa24a60>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7728c0>)

    @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_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:193: in <lambda>
    ('subConstant', cls.subConstant, lambda s: s - 5.0),
minitorch/tensor.py:100: in __sub__
    return Add.apply(self, -self._ensure_tensor(b))
minitorch/tensor.py:125: in __neg__
    return Neg.apply(self)
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=())
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf67df00>

    @staticmethod
    def forward(ctx: Context, t1):
>       return t1.backend.neg_map(t1)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_derivative(
E           t1=Tensor([0.]), fn=('subConstant', subConstant, lambda s: s - 5.0),
E       )

minitorch/tensor_functions.py:59: AttributeError
___________________________ test_one_derivative[fn5] ___________________________

fn = ('multConstant', <function MathTestVariable.multConstant at 0x74e0cfa24af0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf772950>)

    @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_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:194: in <lambda>
    ('multConstant', cls.multConstant, lambda s: s * 5.0),
minitorch/tensor.py:103: in __mul__
    return Mul.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf5a6080>, <minitorch.tensor_data.TensorData object at 0x74e0cf5a7910>))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf5a6080>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf5a7910>

    @staticmethod
    def forward(ctx: Context, t1, t2):
        ctx.save_for_backward(t1, t2)
>       return t1.backend.mul_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_derivative(
E           t1=Tensor([0.]), fn=('multConstant', multConstant, lambda s: s * 5.0),
E       )

minitorch/tensor_functions.py:89: AttributeError
___________________________ test_one_derivative[fn6] ___________________________

fn = ('div', <function MathTestVariable.div at 0x74e0cfa24b80>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7729e0>)

    @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_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:195: in <lambda>
    ('div', cls.div, lambda s: s / 2.0),
minitorch/tensor.py:106: in __truediv__
    return Mul.apply(self, Inv.apply(self._ensure_tensor(b)))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf3698a0>,))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf3698a0>

    @staticmethod
    def forward(ctx: Context, t1):
        ctx.save_for_backward(t1)
>       return t1.backend.inv_map(t1)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_derivative(
E           t1=Tensor([0.]), fn=('div', div, lambda s: s / 2.0),
E       )

minitorch/tensor_functions.py:69: AttributeError
___________________________ test_one_derivative[fn7] ___________________________

fn = ('inv', <function MathTestVariable.inv at 0x74e0cfa24c10>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf772a70>)

    @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_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:196: in <lambda>
    ('inv', cls.inv, lambda s: minitorch.operators.inv(s + 1.0)),
minitorch/tensor.py:97: in __add__
    return Add.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=())
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf4f7f10>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf4f58a0>

    @staticmethod
    def forward(ctx: Context, t1, t2):
>       return t1.backend.add_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_derivative(
E           t1=Tensor([0.]),
E           fn=('inv', inv, lambda s: minitorch.operators.inv(s + 1.0)),
E       )

minitorch/tensor_functions.py:79: AttributeError
___________________________ test_one_derivative[fn8] ___________________________

fn = ('sig', <function MathTestVariable.sig at 0x74e0cfa24ca0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf772b00>)

    @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_functions.py:334: in grad_check
    out_plus = fn(*tensors)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

s = Tensor([1.e-05])

>       ('sig', cls.sig, lambda s: s.sigmoid()),
        ('log', cls.log, lambda s: s.log()),
        ('relu', cls.relu, lambda s: s.relu()),
        ('exp', cls.exp, lambda s: (s * 0.1).exp()),
    ]
E   AttributeError: 'Tensor' object has no attribute 'sigmoid'
E   Falsifying example: test_one_derivative(
E       t1=Tensor([0.]), fn=('sig', sig, lambda s: s.sigmoid()),
E   )

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

fn = ('log', <function MathTestVariable.log at 0x74e0cfa24d30>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf772b90>)

    @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_functions.py:334: in grad_check
    out_plus = fn(*tensors)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

s = Tensor([1.e-05])

>       ('log', cls.log, lambda s: s.log()),
        ('relu', cls.relu, lambda s: s.relu()),
        ('exp', cls.exp, lambda s: (s * 0.1).exp()),
    ]
E   AttributeError: 'Tensor' object has no attribute 'log'
E   Falsifying example: test_one_derivative(
E       t1=Tensor([0.]), fn=('log', log, lambda s: s.log()),
E   )

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

fn = ('relu', <function MathTestVariable.relu at 0x74e0cfa24dc0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf772c20>)

    @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_functions.py:334: in grad_check
    out_plus = fn(*tensors)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

s = Tensor([1.e-05])

>       ('relu', cls.relu, lambda s: s.relu()),
        ('exp', cls.exp, lambda s: (s * 0.1).exp()),
    ]
E   AttributeError: 'Tensor' object has no attribute 'relu'
E   Falsifying example: test_one_derivative(
E       t1=Tensor([0.]), fn=('relu', relu, lambda s: s.relu()),
E   )

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

fn = ('exp', <function MathTestVariable.exp at 0x74e0cfa24e50>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf772cb0>)

    @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_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:200: in <lambda>
    ('exp', cls.exp, lambda s: (s * 0.1).exp()),
minitorch/tensor.py:103: in __mul__
    return Mul.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf212470>, <minitorch.tensor_data.TensorData object at 0x74e0cf212ef0>))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf212470>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf212ef0>

    @staticmethod
    def forward(ctx: Context, t1, t2):
        ctx.save_for_backward(t1, t2)
>       return t1.backend.mul_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_derivative(
E           t1=Tensor([0.]), fn=('exp', exp, lambda s: (s * 0.1).exp()),
E       )

minitorch/tensor_functions.py:89: AttributeError
_________________________________ test_permute _________________________________

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

tests/test_tensor.py:62: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor.py:70: in test_permute
    grad_check(permute, t1)
minitorch/tensor_functions.py:334: in grad_check
    out_plus = fn(*tensors)
tests/test_tensor.py:68: in permute
    return a.permute(*permutation)
minitorch/tensor.py:147: in permute
    return Permute.apply(self, order)
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=((0,),))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf2946d0>, order = (0,)

    @staticmethod
    def forward(ctx: Context, t1, order):
        ctx.save_for_backward(order)
>       return Tensor.make(t1._tensor.permute(*order)._storage, t1._tensor.permute(*order).shape, backend=t1.backend)
E       NameError: name 'Tensor' is not defined
E       Falsifying example: test_permute(
E           t1=Tensor([0.]), data=data(...),
E       )
E       Draw 1: [0]

minitorch/tensor_functions.py:197: NameError
________________________________ 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)

tests/test_tensor.py:76: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
minitorch/tensor_functions.py:311: in tensor
    return Tensor.make(data, shape, backend=backend)
minitorch/tensor.py:174: in make
    tensor_data = TensorData(storage, shape, strides)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <minitorch.tensor_data.TensorData object at 0x74e0cf4f7640>
storage = array([[1., 1.]]), shape = (1, 2), strides = (2, 1)

    def __init__(self, storage: Union[Sequence[float], Storage], shape: UserShape, strides: Optional[UserStrides]=None):
        if isinstance(storage, np.ndarray):
            self._storage = storage
        else:
            self._storage = array(storage, dtype=float64)
        if strides is None:
            strides = strides_from_shape(shape)
        assert isinstance(strides, tuple), 'Strides must be tuple'
        assert isinstance(shape, tuple), 'Shape must be tuple'
        if len(strides) != len(shape):
            raise IndexingError(f'Len of strides {strides} must match {shape}.')
        self._strides = array(strides)
        self._shape = array(shape)
        self.strides = strides
        self.dims = len(strides)
        self.size = int(prod(shape))
        self.shape = shape
>       assert len(self._storage) == self.size
E       AssertionError

minitorch/tensor_data.py:156: AssertionError
____________________________ test_grad_reduce[fn0] _____________________________

fn = ('sum', <function sum at 0x74e0fee676d0>, None)

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

tests/test_tensor.py:89: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor.py:97: in test_grad_reduce
    grad_check(tensor_fn, t1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

fn = None, tensors = (Tensor([1.e-05]),)
Tensor = <class 'minitorch.tensor.Tensor'>, numerical_grads = [], i = 0

    def grad_check(fn, *tensors):
        """
        Check the gradient of a function by comparing numerical and autodiff gradients.
    
        Args:
            fn: function to check
            *tensors: input tensors
        """
        from .tensor import Tensor
    
        # Compute numerical gradients
        numerical_grads = []
        for i, t in enumerate(tensors):
            # Save original data
            original_data = t._tensor._storage.copy()
    
            grad = np.zeros_like(t._tensor._storage)
            for j in range(len(t._tensor._storage)):
                # f(x + eps)
                t._tensor._storage[j] = original_data[j] + 1e-5
>               out_plus = fn(*tensors)
E               TypeError: 'NoneType' object is not callable
E               Falsifying example: test_grad_reduce(
E                   t1=Tensor([0.]), fn=('sum', sum, None),
E               )

minitorch/tensor_functions.py:334: TypeError
______________________________ test_two_grad[fn0] ______________________________

fn = ('add2', <function MathTestVariable.add2 at 0x74e0cfa24ee0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf772d40>)

    @given(shaped_tensors(2))
>   @pytest.mark.task2_4

tests/test_tensor.py:101: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor.py:109: in test_two_grad
    grad_check(tensor_fn, t1, t2)
minitorch/tensor_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:203: in <lambda>
    ('add2', cls.add2, lambda s1, s2: s1 + s2),
minitorch/tensor.py:97: in __add__
    return Add.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=())
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf687880>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf681a20>

    @staticmethod
    def forward(ctx: Context, t1, t2):
>       return t1.backend.add_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_two_grad(
E           ts=[Tensor([0.]), Tensor([0.])], fn=('add2', add2, lambda s1, s2: s1 + s2),
E       )

minitorch/tensor_functions.py:79: AttributeError
______________________________ test_two_grad[fn1] ______________________________

fn = ('mul2', <function MathTestVariable.mul2 at 0x74e0cfa24f70>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf772dd0>)

    @given(shaped_tensors(2))
>   @pytest.mark.task2_4

tests/test_tensor.py:101: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor.py:109: in test_two_grad
    grad_check(tensor_fn, t1, t2)
minitorch/tensor_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:204: in <lambda>
    ('mul2', cls.mul2, lambda s1, s2: s1 * s2),
minitorch/tensor.py:103: in __mul__
    return Mul.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf5a7b50>, <minitorch.tensor_data.TensorData object at 0x74e0cf5a5f60>))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf5a7b50>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf5a5f60>

    @staticmethod
    def forward(ctx: Context, t1, t2):
        ctx.save_for_backward(t1, t2)
>       return t1.backend.mul_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_two_grad(
E           ts=[Tensor([0.]), Tensor([0.])], fn=('mul2', mul2, lambda s1, s2: s1 * s2),
E       )

minitorch/tensor_functions.py:89: AttributeError
______________________________ test_two_grad[fn2] ______________________________

fn = ('div2', <function MathTestVariable.div2 at 0x74e0cfa25000>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf772e60>)

    @given(shaped_tensors(2))
>   @pytest.mark.task2_4

tests/test_tensor.py:101: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor.py:109: in test_two_grad
    grad_check(tensor_fn, t1, t2)
minitorch/tensor_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:205: in <lambda>
    ('div2', cls.div2, lambda s1, s2: s1 / s2),
minitorch/tensor.py:106: in __truediv__
    return Mul.apply(self, Inv.apply(self._ensure_tensor(b)))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf23dff0>,))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf23dff0>

    @staticmethod
    def forward(ctx: Context, t1):
        ctx.save_for_backward(t1)
>       return t1.backend.inv_map(t1)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_two_grad(
E           ts=[Tensor([0.]), Tensor([0.])], fn=('div2', div2, lambda s1, s2: s1 / s2),
E       )

minitorch/tensor_functions.py:69: AttributeError
_________________________ test_two_grad_broadcast[fn0] _________________________

fn = ('add2', <function MathTestVariable.add2 at 0x74e0cfa24ee0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf772d40>)

    @given(shaped_tensors(2))
>   @pytest.mark.task2_4

tests/test_tensor.py:113: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor.py:122: in test_two_grad_broadcast
    grad_check(tensor_fn, t1, t2)
minitorch/tensor_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:203: in <lambda>
    ('add2', cls.add2, lambda s1, s2: s1 + s2),
minitorch/tensor.py:97: in __add__
    return Add.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=())
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf1e2860>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf1e3910>

    @staticmethod
    def forward(ctx: Context, t1, t2):
>       return t1.backend.add_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_two_grad_broadcast(
E           ts=[Tensor([0.]), Tensor([0.])], fn=('add2', add2, lambda s1, s2: s1 + s2),
E       )

minitorch/tensor_functions.py:79: AttributeError
_________________________ test_two_grad_broadcast[fn1] _________________________

fn = ('mul2', <function MathTestVariable.mul2 at 0x74e0cfa24f70>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf772dd0>)

    @given(shaped_tensors(2))
>   @pytest.mark.task2_4

tests/test_tensor.py:113: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor.py:122: in test_two_grad_broadcast
    grad_check(tensor_fn, t1, t2)
minitorch/tensor_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:204: in <lambda>
    ('mul2', cls.mul2, lambda s1, s2: s1 * s2),
minitorch/tensor.py:103: in __mul__
    return Mul.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf1e07c0>, <minitorch.tensor_data.TensorData object at 0x74e0cf0cdcc0>))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf1e07c0>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf0cdcc0>

    @staticmethod
    def forward(ctx: Context, t1, t2):
        ctx.save_for_backward(t1, t2)
>       return t1.backend.mul_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_two_grad_broadcast(
E           ts=[Tensor([0.]), Tensor([0.])], fn=('mul2', mul2, lambda s1, s2: s1 * s2),
E       )

minitorch/tensor_functions.py:89: AttributeError
_________________________ test_two_grad_broadcast[fn2] _________________________

fn = ('div2', <function MathTestVariable.div2 at 0x74e0cfa25000>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf772e60>)

    @given(shaped_tensors(2))
>   @pytest.mark.task2_4

tests/test_tensor.py:113: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor.py:122: in test_two_grad_broadcast
    grad_check(tensor_fn, t1, t2)
minitorch/tensor_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:205: in <lambda>
    ('div2', cls.div2, lambda s1, s2: s1 / s2),
minitorch/tensor.py:106: in __truediv__
    return Mul.apply(self, Inv.apply(self._ensure_tensor(b)))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf4b2a40>,))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf4b2a40>

    @staticmethod
    def forward(ctx: Context, t1):
        ctx.save_for_backward(t1)
>       return t1.backend.inv_map(t1)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_two_grad_broadcast(
E           ts=[Tensor([0.]), Tensor([0.])], fn=('div2', div2, lambda s1, s2: s1 / s2),
E       )

minitorch/tensor_functions.py:69: AttributeError
________________________________ test_fromlist _________________________________

    def test_fromlist() -> None:
        "Test longer from list conversion"
>       t = tensor([[2, 3, 4], [4, 5, 7]])

tests/test_tensor.py:131: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
minitorch/tensor_functions.py:311: in tensor
    return Tensor.make(data, shape, backend=backend)
minitorch/tensor.py:174: in make
    tensor_data = TensorData(storage, shape, strides)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <minitorch.tensor_data.TensorData object at 0x74e0cf3c1f30>
storage = array([[2., 3., 4.],
       [4., 5., 7.]]), shape = (2, 3)
strides = (3, 1)

    def __init__(self, storage: Union[Sequence[float], Storage], shape: UserShape, strides: Optional[UserStrides]=None):
        if isinstance(storage, np.ndarray):
            self._storage = storage
        else:
            self._storage = array(storage, dtype=float64)
        if strides is None:
            strides = strides_from_shape(shape)
        assert isinstance(strides, tuple), 'Strides must be tuple'
        assert isinstance(shape, tuple), 'Shape must be tuple'
        if len(strides) != len(shape):
            raise IndexingError(f'Len of strides {strides} must match {shape}.')
        self._strides = array(strides)
        self._shape = array(shape)
        self.strides = strides
        self.dims = len(strides)
        self.size = int(prod(shape))
        self.shape = shape
>       assert len(self._storage) == self.size
E       AssertionError

minitorch/tensor_data.py:156: AssertionError
__________________________________ test_view ___________________________________

    def test_view() -> None:
        "Test view"
>       t = tensor([[2, 3, 4], [4, 5, 7]])

tests/test_tensor.py:139: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
minitorch/tensor_functions.py:311: in tensor
    return Tensor.make(data, shape, backend=backend)
minitorch/tensor.py:174: in make
    tensor_data = TensorData(storage, shape, strides)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <minitorch.tensor_data.TensorData object at 0x74e0cf23e410>
storage = array([[2., 3., 4.],
       [4., 5., 7.]]), shape = (2, 3)
strides = (3, 1)

    def __init__(self, storage: Union[Sequence[float], Storage], shape: UserShape, strides: Optional[UserStrides]=None):
        if isinstance(storage, np.ndarray):
            self._storage = storage
        else:
            self._storage = array(storage, dtype=float64)
        if strides is None:
            strides = strides_from_shape(shape)
        assert isinstance(strides, tuple), 'Strides must be tuple'
        assert isinstance(shape, tuple), 'Shape must be tuple'
        if len(strides) != len(shape):
            raise IndexingError(f'Len of strides {strides} must match {shape}.')
        self._strides = array(strides)
        self._shape = array(shape)
        self.strides = strides
        self.dims = len(strides)
        self.size = int(prod(shape))
        self.shape = shape
>       assert len(self._storage) == self.size
E       AssertionError

minitorch/tensor_data.py:156: 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_functions.py:334: in grad_check
    out_plus = fn(*tensors)
tests/test_tensor.py:156: in view
    a = a.contiguous()
minitorch/tensor.py:155: in contiguous
    return Copy.apply(self)
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=())
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf1e0a30>

    @staticmethod
    def forward(ctx: Context, t1):
>       return Tensor.make(t1._tensor._storage.copy(), t1.shape, backend=t1.backend)
E       NameError: name 'Tensor' is not defined
E       Falsifying example: test_back_view(
E           t1=Tensor([0.]),
E       )

minitorch/tensor_functions.py:219: NameError
________________________________ test_fromnumpy ________________________________

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

tests/test_tensor.py:178: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
minitorch/tensor_functions.py:311: in tensor
    return Tensor.make(data, shape, backend=backend)
minitorch/tensor.py:174: in make
    tensor_data = TensorData(storage, shape, strides)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <minitorch.tensor_data.TensorData object at 0x74e0cf3696f0>
storage = array([[2., 3., 4.],
       [4., 5., 7.]]), shape = (2, 3)
strides = (3, 1)

    def __init__(self, storage: Union[Sequence[float], Storage], shape: UserShape, strides: Optional[UserStrides]=None):
        if isinstance(storage, np.ndarray):
            self._storage = storage
        else:
            self._storage = array(storage, dtype=float64)
        if strides is None:
            strides = strides_from_shape(shape)
        assert isinstance(strides, tuple), 'Strides must be tuple'
        assert isinstance(shape, tuple), 'Shape must be tuple'
        if len(strides) != len(shape):
            raise IndexingError(f'Len of strides {strides} must match {shape}.')
        self._strides = array(strides)
        self._shape = array(shape)
        self.strides = strides
        self.dims = len(strides)
        self.size = int(prod(shape))
        self.shape = shape
>       assert len(self._storage) == self.size
E       AssertionError

minitorch/tensor_data.py:156: AssertionError
_________________________ 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]])

tests/test_tensor.py:193: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
minitorch/tensor_functions.py:311: in tensor
    return Tensor.make(data, shape, backend=backend)
minitorch/tensor.py:174: in make
    tensor_data = TensorData(storage, shape, strides)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <minitorch.tensor_data.TensorData object at 0x74e0cf0cecb0>
storage = array([[2., 3.],
       [4., 6.],
       [5., 7.]]), shape = (3, 2)
strides = (2, 1)

    def __init__(self, storage: Union[Sequence[float], Storage], shape: UserShape, strides: Optional[UserStrides]=None):
        if isinstance(storage, np.ndarray):
            self._storage = storage
        else:
            self._storage = array(storage, dtype=float64)
        if strides is None:
            strides = strides_from_shape(shape)
        assert isinstance(strides, tuple), 'Strides must be tuple'
        assert isinstance(shape, tuple), 'Shape must be tuple'
        if len(strides) != len(shape):
            raise IndexingError(f'Len of strides {strides} must match {shape}.')
        self._strides = array(strides)
        self._shape = array(shape)
        self.strides = strides
        self.dims = len(strides)
        self.size = int(prod(shape))
        self.shape = shape
>       assert len(self._storage) == self.size
E       AssertionError

minitorch/tensor_data.py:156: 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]])

tests/test_tensor.py:206: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
minitorch/tensor_functions.py:311: in tensor
    return Tensor.make(data, shape, backend=backend)
minitorch/tensor.py:174: in make
    tensor_data = TensorData(storage, shape, strides)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <minitorch.tensor_data.TensorData object at 0x74e0cf10d450>
storage = array([[2., 3.],
       [4., 6.],
       [5., 7.]]), shape = (3, 2)
strides = (2, 1)

    def __init__(self, storage: Union[Sequence[float], Storage], shape: UserShape, strides: Optional[UserStrides]=None):
        if isinstance(storage, np.ndarray):
            self._storage = storage
        else:
            self._storage = array(storage, dtype=float64)
        if strides is None:
            strides = strides_from_shape(shape)
        assert isinstance(strides, tuple), 'Strides must be tuple'
        assert isinstance(shape, tuple), 'Shape must be tuple'
        if len(strides) != len(shape):
            raise IndexingError(f'Len of strides {strides} must match {shape}.')
        self._strides = array(strides)
        self._shape = array(shape)
        self.strides = strides
        self.dims = len(strides)
        self.size = int(prod(shape))
        self.shape = shape
>       assert len(self._storage) == self.size
E       AssertionError

minitorch/tensor_data.py:156: AssertionError
_________________________ 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]])

tests/test_tensor.py:219: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
minitorch/tensor_functions.py:311: in tensor
    return Tensor.make(data, shape, backend=backend)
minitorch/tensor.py:174: in make
    tensor_data = TensorData(storage, shape, strides)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <minitorch.tensor_data.TensorData object at 0x74e0cf3dd510>
storage = array([[2., 3.],
       [4., 6.],
       [5., 7.]]), shape = (3, 2)
strides = (2, 1)

    def __init__(self, storage: Union[Sequence[float], Storage], shape: UserShape, strides: Optional[UserStrides]=None):
        if isinstance(storage, np.ndarray):
            self._storage = storage
        else:
            self._storage = array(storage, dtype=float64)
        if strides is None:
            strides = strides_from_shape(shape)
        assert isinstance(strides, tuple), 'Strides must be tuple'
        assert isinstance(shape, tuple), 'Shape must be tuple'
        if len(strides) != len(shape):
            raise IndexingError(f'Len of strides {strides} must match {shape}.')
        self._strides = array(strides)
        self._shape = array(shape)
        self.strides = strides
        self.dims = len(strides)
        self.size = int(prod(shape))
        self.shape = shape
>       assert len(self._storage) == self.size
E       AssertionError

minitorch/tensor_data.py:156: AssertionError
_________________________________ test_layout __________________________________

    @pytest.mark.task2_1
    def test_layout() -> None:
        "Test basis properties of layout and strides"
        data = [0] * 3 * 5
        tensor_data = minitorch.TensorData(data, (3, 5), (5, 1))
    
        assert tensor_data.is_contiguous()
        assert tensor_data.shape == (3, 5)
>       assert tensor_data.index((1, 0)) == 5
E       AttributeError: 'TensorData' object has no attribute 'index'

tests/test_tensor_data.py:23: AttributeError
_______________________________ test_enumeration _______________________________

    @pytest.mark.task2_1
>   @given(tensor_data())

tests/test_tensor_data.py:43: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

tensor_data = <minitorch.tensor_data.TensorData object at 0x74e0cf2b6e90>

    @pytest.mark.task2_1
    @given(tensor_data())
    def test_enumeration(tensor_data: TensorData) -> None:
        "Test enumeration of tensor_datas."
>       indices = list(tensor_data.indices())
E       AttributeError: 'TensorData' object has no attribute 'indices'
E       Falsifying example: test_enumeration(
E           tensor_data=<minitorch.tensor_data.TensorData at 0x74e0cf2b6e90>,
E       )

tests/test_tensor_data.py:46: AttributeError
__________________________________ test_index __________________________________

    @pytest.mark.task2_1
>   @given(tensor_data())

tests/test_tensor_data.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

tensor_data = <minitorch.tensor_data.TensorData object at 0x74e0cf4b10f0>

    @pytest.mark.task2_1
    @given(tensor_data())
    def test_index(tensor_data: TensorData) -> None:
        "Test enumeration of tensor_data."
        # Check that all indices are within the size.
>       for ind in tensor_data.indices():
E       AttributeError: 'TensorData' object has no attribute 'indices'
E       Falsifying example: test_index(
E           tensor_data=<minitorch.tensor_data.TensorData at 0x74e0cf4b10f0>,
E       )

tests/test_tensor_data.py:65: AttributeError
_________________________________ test_permute _________________________________

    @pytest.mark.task2_1
>   @given(data())

tests/test_tensor_data.py:81: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

data = data(...)

    @pytest.mark.task2_1
    @given(data())
    def test_permute(data: DataObject) -> None:
        td = data.draw(tensor_data())
        ind = data.draw(indices(td))
        td_rev = td.permute(*list(reversed(range(td.dims))))
>       assert td.index(ind) == td_rev.index(tuple(reversed(ind)))
E       AttributeError: 'TensorData' object has no attribute 'index'
E       Falsifying example: test_permute(
E           data=data(...),
E       )
E       Draw 1: <minitorch.tensor_data.TensorData object at 0x74e0cf2b4940>
E       Draw 2: (0,)

tests/test_tensor_data.py:86: AttributeError
_________________________________ test_string __________________________________

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

tests/test_tensor_data.py:124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

tensor_data = <minitorch.tensor_data.TensorData object at 0x74e0cf67c910>

    @given(tensor_data())
    def test_string(tensor_data: TensorData) -> None:
>       tensor_data.to_string()
E       AttributeError: 'TensorData' object has no attribute 'to_string'
E       Falsifying example: test_string(
E           tensor_data=<minitorch.tensor_data.TensorData at 0x74e0cf67c910>,
E       )

tests/test_tensor_data.py:125: AttributeError
______________________________ test_create[fast] _______________________________

backend = 'fast'

    @given(lists(small_floats, min_size=1))
>   @pytest.mark.parametrize("backend", backend_tests)

tests/test_tensor_general.py:45: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor_general.py:50: in test_create
    assert t1[i] == t2[i]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = Tensor([0.]), key = 0

    def __getitem__(self, key: Union[int, UserIndex]) -> float:
        key2 = (key,) if isinstance(key, int) else key
>       return self._tensor.get(key2)
E       AttributeError: 'TensorData' object has no attribute 'get'
E       Falsifying example: test_create(
E           t1=[0.0], backend='fast',
E       )

minitorch/tensor.py:162: AttributeError
___________________________ test_one_args[fast-fn0] ____________________________

fn = ('neg', <function MathTestVariable.neg at 0x74e0cfa24820>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c1bd0>)
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:189: in <lambda>
    ('neg', cls.neg, lambda s: -s),
minitorch/tensor.py:125: in __neg__
    return Neg.apply(self)
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=())
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf683880>

    @staticmethod
    def forward(ctx: Context, t1):
>       return t1.backend.neg_map(t1)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_args(
E           data=data(...), fn=('neg', neg, lambda s: -s), backend='fast',
E       )
E       Draw 1: Tensor([0.])

minitorch/tensor_functions.py:59: AttributeError
___________________________ test_one_args[fast-fn1] ____________________________

fn = ('addConstant', <function MathTestVariable.addConstant at 0x74e0cfa248b0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c1c60>)
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:190: in <lambda>
    ('addConstant', cls.addConstant, lambda s: s + 5.0),
minitorch/tensor.py:97: in __add__
    return Add.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=())
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf211000>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf210370>

    @staticmethod
    def forward(ctx: Context, t1, t2):
>       return t1.backend.add_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_args(
E           data=data(...),
E           fn=('addConstant', addConstant, lambda s: s + 5.0),
E           backend='fast',
E       )
E       Draw 1: Tensor([0.])

minitorch/tensor_functions.py:79: AttributeError
___________________________ test_one_args[fast-fn2] ____________________________

fn = ('square', <function MathTestVariable.square at 0x74e0cfa24940>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c1cf0>)
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:191: in <lambda>
    ('square', cls.square, lambda s: s * s),
minitorch/tensor.py:103: in __mul__
    return Mul.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf36af20>, <minitorch.tensor_data.TensorData object at 0x74e0cf36af20>))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf36af20>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf36af20>

    @staticmethod
    def forward(ctx: Context, t1, t2):
        ctx.save_for_backward(t1, t2)
>       return t1.backend.mul_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_args(
E           data=data(...), fn=('square', square, lambda s: s * s), backend='fast',
E       )
E       Draw 1: Tensor([0.])

minitorch/tensor_functions.py:89: AttributeError
___________________________ test_one_args[fast-fn3] ____________________________

fn = ('cube', <function MathTestVariable.cube at 0x74e0cfa249d0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c1d80>)
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:192: in <lambda>
    ('cube', cls.cube, lambda s: s * s * s),
minitorch/tensor.py:103: in __mul__
    return Mul.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf6ea620>, <minitorch.tensor_data.TensorData object at 0x74e0cf6ea620>))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf6ea620>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf6ea620>

    @staticmethod
    def forward(ctx: Context, t1, t2):
        ctx.save_for_backward(t1, t2)
>       return t1.backend.mul_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_args(
E           data=data(...), fn=('cube', cube, lambda s: s * s * s), backend='fast',
E       )
E       Draw 1: Tensor([0.])

minitorch/tensor_functions.py:89: AttributeError
___________________________ test_one_args[fast-fn4] ____________________________

fn = ('subConstant', <function MathTestVariable.subConstant at 0x74e0cfa24a60>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c1e10>)
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:193: in <lambda>
    ('subConstant', cls.subConstant, lambda s: s - 5.0),
minitorch/tensor.py:100: in __sub__
    return Add.apply(self, -self._ensure_tensor(b))
minitorch/tensor.py:125: in __neg__
    return Neg.apply(self)
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=())
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf6a4ac0>

    @staticmethod
    def forward(ctx: Context, t1):
>       return t1.backend.neg_map(t1)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_args(
E           data=data(...),
E           fn=('subConstant', subConstant, lambda s: s - 5.0),
E           backend='fast',
E       )
E       Draw 1: Tensor([0.])

minitorch/tensor_functions.py:59: AttributeError
___________________________ test_one_args[fast-fn5] ____________________________

fn = ('multConstant', <function MathTestVariable.multConstant at 0x74e0cfa24af0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c1ea0>)
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:194: in <lambda>
    ('multConstant', cls.multConstant, lambda s: s * 5.0),
minitorch/tensor.py:103: in __mul__
    return Mul.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf34bd30>, <minitorch.tensor_data.TensorData object at 0x74e0cf34b220>))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf34bd30>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf34b220>

    @staticmethod
    def forward(ctx: Context, t1, t2):
        ctx.save_for_backward(t1, t2)
>       return t1.backend.mul_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_args(
E           data=data(...),
E           fn=('multConstant', multConstant, lambda s: s * 5.0),
E           backend='fast',
E       )
E       Draw 1: Tensor([0.])

minitorch/tensor_functions.py:89: AttributeError
___________________________ test_one_args[fast-fn6] ____________________________

fn = ('div', <function MathTestVariable.div at 0x74e0cfa24b80>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c1f30>)
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:195: in <lambda>
    ('div', cls.div, lambda s: s / 2.0),
minitorch/tensor.py:106: in __truediv__
    return Mul.apply(self, Inv.apply(self._ensure_tensor(b)))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf10c970>,))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf10c970>

    @staticmethod
    def forward(ctx: Context, t1):
        ctx.save_for_backward(t1)
>       return t1.backend.inv_map(t1)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_args(
E           data=data(...), fn=('div', div, lambda s: s / 2.0), backend='fast',
E       )
E       Draw 1: Tensor([0.])

minitorch/tensor_functions.py:69: AttributeError
___________________________ test_one_args[fast-fn7] ____________________________

fn = ('inv', <function MathTestVariable.inv at 0x74e0cfa24c10>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c1fc0>)
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:196: in <lambda>
    ('inv', cls.inv, lambda s: minitorch.operators.inv(s + 1.0)),
minitorch/tensor.py:97: in __add__
    return Add.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=())
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf10cfa0>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf10ff10>

    @staticmethod
    def forward(ctx: Context, t1, t2):
>       return t1.backend.add_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_args(
E           data=data(...),
E           fn=('inv', inv, lambda s: minitorch.operators.inv(s + 1.0)),
E           backend='fast',
E       )
E       Draw 1: Tensor([0.])

minitorch/tensor_functions.py:79: AttributeError
___________________________ test_one_args[fast-fn8] ____________________________

fn = ('sig', <function MathTestVariable.sig at 0x74e0cfa24ca0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c2050>)
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)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

s = Tensor([0.])

>       ('sig', cls.sig, lambda s: s.sigmoid()),
        ('log', cls.log, lambda s: s.log()),
        ('relu', cls.relu, lambda s: s.relu()),
        ('exp', cls.exp, lambda s: (s * 0.1).exp()),
    ]
E   AttributeError: 'Tensor' object has no attribute 'sigmoid'
E   Falsifying example: test_one_args(
E       data=data(...), fn=('sig', sig, lambda s: s.sigmoid()), backend='fast',
E   )
E   Draw 1: Tensor([0.])

minitorch/testing.py:197: AttributeError
___________________________ test_one_args[fast-fn9] ____________________________

fn = ('log', <function MathTestVariable.log at 0x74e0cfa24d30>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c20e0>)
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)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

s = Tensor([0.])

>       ('log', cls.log, lambda s: s.log()),
        ('relu', cls.relu, lambda s: s.relu()),
        ('exp', cls.exp, lambda s: (s * 0.1).exp()),
    ]
E   AttributeError: 'Tensor' object has no attribute 'log'
E   Falsifying example: test_one_args(
E       data=data(...), fn=('log', log, lambda s: s.log()), backend='fast',
E   )
E   Draw 1: Tensor([0.])

minitorch/testing.py:198: AttributeError
___________________________ test_one_args[fast-fn10] ___________________________

fn = ('relu', <function MathTestVariable.relu at 0x74e0cfa24dc0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c2170>)
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)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

s = Tensor([0.])

>       ('relu', cls.relu, lambda s: s.relu()),
        ('exp', cls.exp, lambda s: (s * 0.1).exp()),
    ]
E   AttributeError: 'Tensor' object has no attribute 'relu'
E   Falsifying example: test_one_args(
E       data=data(...), fn=('relu', relu, lambda s: s.relu()), backend='fast',
E   )
E   Draw 1: Tensor([0.])

minitorch/testing.py:199: AttributeError
___________________________ test_one_args[fast-fn11] ___________________________

fn = ('exp', <function MathTestVariable.exp at 0x74e0cfa24e50>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c2200>)
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:200: in <lambda>
    ('exp', cls.exp, lambda s: (s * 0.1).exp()),
minitorch/tensor.py:103: in __mul__
    return Mul.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf252e90>, <minitorch.tensor_data.TensorData object at 0x74e0cf253ca0>))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf252e90>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf253ca0>

    @staticmethod
    def forward(ctx: Context, t1, t2):
        ctx.save_for_backward(t1, t2)
>       return t1.backend.mul_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_args(
E           data=data(...), fn=('exp', exp, lambda s: (s * 0.1).exp()), backend='fast',
E       )
E       Draw 1: Tensor([0.])

minitorch/tensor_functions.py:89: AttributeError
___________________________ test_two_args[fast-fn0] ____________________________

fn = ('add2', <function MathTestVariable.add2 at 0x74e0cfa24ee0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c2290>)
backend = 'fast'

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

tests/test_tensor_general.py:71: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor_general.py:82: in test_two_args
    t3 = tensor_fn(t1, t2)
minitorch/testing.py:203: in <lambda>
    ('add2', cls.add2, lambda s1, s2: s1 + s2),
minitorch/tensor.py:97: in __add__
    return Add.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=())
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf542500>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf3dcca0>

    @staticmethod
    def forward(ctx: Context, t1, t2):
>       return t1.backend.add_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_two_args(
E           data=data(...), fn=('add2', add2, lambda s1, s2: s1 + s2), backend='fast',
E       )
E       Draw 1: [Tensor([0.]), Tensor([0.])]

minitorch/tensor_functions.py:79: AttributeError
___________________________ test_two_args[fast-fn1] ____________________________

fn = ('mul2', <function MathTestVariable.mul2 at 0x74e0cfa24f70>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c2320>)
backend = 'fast'

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

tests/test_tensor_general.py:71: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor_general.py:82: in test_two_args
    t3 = tensor_fn(t1, t2)
minitorch/testing.py:204: in <lambda>
    ('mul2', cls.mul2, lambda s1, s2: s1 * s2),
minitorch/tensor.py:103: in __mul__
    return Mul.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf2b4d00>, <minitorch.tensor_data.TensorData object at 0x74e0cf2b5210>))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf2b4d00>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf2b5210>

    @staticmethod
    def forward(ctx: Context, t1, t2):
        ctx.save_for_backward(t1, t2)
>       return t1.backend.mul_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_two_args(
E           data=data(...), fn=('mul2', mul2, lambda s1, s2: s1 * s2), backend='fast',
E       )
E       Draw 1: [Tensor([0.]), Tensor([0.])]

minitorch/tensor_functions.py:89: AttributeError
___________________________ test_two_args[fast-fn2] ____________________________

fn = ('div2', <function MathTestVariable.div2 at 0x74e0cfa25000>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c23b0>)
backend = 'fast'

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

tests/test_tensor_general.py:71: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor_general.py:82: in test_two_args
    t3 = tensor_fn(t1, t2)
minitorch/testing.py:205: in <lambda>
    ('div2', cls.div2, lambda s1, s2: s1 / s2),
minitorch/tensor.py:106: in __truediv__
    return Mul.apply(self, Inv.apply(self._ensure_tensor(b)))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf0cc310>,))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf0cc310>

    @staticmethod
    def forward(ctx: Context, t1):
        ctx.save_for_backward(t1)
>       return t1.backend.inv_map(t1)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_two_args(
E           data=data(...), fn=('div2', div2, lambda s1, s2: s1 / s2), backend='fast',
E       )
E       Draw 1: [Tensor([0.]), Tensor([0.])]

minitorch/tensor_functions.py:69: AttributeError
________________________ test_one_derivative[fast-fn0] _________________________

fn = ('neg', <function MathTestVariable.neg at 0x74e0cfa24820>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c1bd0>)
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_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:189: in <lambda>
    ('neg', cls.neg, lambda s: -s),
minitorch/tensor.py:125: in __neg__
    return Neg.apply(self)
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=())
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf3684c0>

    @staticmethod
    def forward(ctx: Context, t1):
>       return t1.backend.neg_map(t1)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_derivative(
E           data=data(...), fn=('neg', neg, lambda s: -s), backend='fast',
E       )
E       Draw 1: Tensor([0.])

minitorch/tensor_functions.py:59: AttributeError
________________________ test_one_derivative[fast-fn1] _________________________

fn = ('addConstant', <function MathTestVariable.addConstant at 0x74e0cfa248b0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c1c60>)
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_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:190: in <lambda>
    ('addConstant', cls.addConstant, lambda s: s + 5.0),
minitorch/tensor.py:97: in __add__
    return Add.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=())
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf501150>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf501ff0>

    @staticmethod
    def forward(ctx: Context, t1, t2):
>       return t1.backend.add_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_derivative(
E           data=data(...),
E           fn=('addConstant', addConstant, lambda s: s + 5.0),
E           backend='fast',
E       )
E       Draw 1: Tensor([0.])

minitorch/tensor_functions.py:79: AttributeError
________________________ test_one_derivative[fast-fn2] _________________________

fn = ('square', <function MathTestVariable.square at 0x74e0cfa24940>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c1cf0>)
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_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:191: in <lambda>
    ('square', cls.square, lambda s: s * s),
minitorch/tensor.py:103: in __mul__
    return Mul.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf369150>, <minitorch.tensor_data.TensorData object at 0x74e0cf369150>))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf369150>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf369150>

    @staticmethod
    def forward(ctx: Context, t1, t2):
        ctx.save_for_backward(t1, t2)
>       return t1.backend.mul_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_derivative(
E           data=data(...), fn=('square', square, lambda s: s * s), backend='fast',
E       )
E       Draw 1: Tensor([0.])

minitorch/tensor_functions.py:89: AttributeError
________________________ test_one_derivative[fast-fn3] _________________________

fn = ('cube', <function MathTestVariable.cube at 0x74e0cfa249d0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c1d80>)
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_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:192: in <lambda>
    ('cube', cls.cube, lambda s: s * s * s),
minitorch/tensor.py:103: in __mul__
    return Mul.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf252b30>, <minitorch.tensor_data.TensorData object at 0x74e0cf252b30>))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf252b30>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf252b30>

    @staticmethod
    def forward(ctx: Context, t1, t2):
        ctx.save_for_backward(t1, t2)
>       return t1.backend.mul_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_derivative(
E           data=data(...), fn=('cube', cube, lambda s: s * s * s), backend='fast',
E       )
E       Draw 1: Tensor([0.])

minitorch/tensor_functions.py:89: AttributeError
________________________ test_one_derivative[fast-fn4] _________________________

fn = ('subConstant', <function MathTestVariable.subConstant at 0x74e0cfa24a60>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c1e10>)
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_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:193: in <lambda>
    ('subConstant', cls.subConstant, lambda s: s - 5.0),
minitorch/tensor.py:100: in __sub__
    return Add.apply(self, -self._ensure_tensor(b))
minitorch/tensor.py:125: in __neg__
    return Neg.apply(self)
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=())
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf6ecd60>

    @staticmethod
    def forward(ctx: Context, t1):
>       return t1.backend.neg_map(t1)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_derivative(
E           data=data(...),
E           fn=('subConstant', subConstant, lambda s: s - 5.0),
E           backend='fast',
E       )
E       Draw 1: Tensor([0.])

minitorch/tensor_functions.py:59: AttributeError
________________________ test_one_derivative[fast-fn5] _________________________

fn = ('multConstant', <function MathTestVariable.multConstant at 0x74e0cfa24af0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c1ea0>)
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_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:194: in <lambda>
    ('multConstant', cls.multConstant, lambda s: s * 5.0),
minitorch/tensor.py:103: in __mul__
    return Mul.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf5a6fe0>, <minitorch.tensor_data.TensorData object at 0x74e0cf5a74f0>))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf5a6fe0>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf5a74f0>

    @staticmethod
    def forward(ctx: Context, t1, t2):
        ctx.save_for_backward(t1, t2)
>       return t1.backend.mul_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_derivative(
E           data=data(...),
E           fn=('multConstant', multConstant, lambda s: s * 5.0),
E           backend='fast',
E       )
E       Draw 1: Tensor([0.])

minitorch/tensor_functions.py:89: AttributeError
________________________ test_one_derivative[fast-fn6] _________________________

fn = ('div', <function MathTestVariable.div at 0x74e0cfa24b80>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c1f30>)
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_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:195: in <lambda>
    ('div', cls.div, lambda s: s / 2.0),
minitorch/tensor.py:106: in __truediv__
    return Mul.apply(self, Inv.apply(self._ensure_tensor(b)))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf1b9c00>,))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf1b9c00>

    @staticmethod
    def forward(ctx: Context, t1):
        ctx.save_for_backward(t1)
>       return t1.backend.inv_map(t1)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_derivative(
E           data=data(...), fn=('div', div, lambda s: s / 2.0), backend='fast',
E       )
E       Draw 1: Tensor([0.])

minitorch/tensor_functions.py:69: AttributeError
________________________ test_one_derivative[fast-fn7] _________________________

fn = ('inv', <function MathTestVariable.inv at 0x74e0cfa24c10>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c1fc0>)
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_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:196: in <lambda>
    ('inv', cls.inv, lambda s: minitorch.operators.inv(s + 1.0)),
minitorch/tensor.py:97: in __add__
    return Add.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=())
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf6828c0>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf680df0>

    @staticmethod
    def forward(ctx: Context, t1, t2):
>       return t1.backend.add_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_derivative(
E           data=data(...),
E           fn=('inv', inv, lambda s: minitorch.operators.inv(s + 1.0)),
E           backend='fast',
E       )
E       Draw 1: Tensor([0.])

minitorch/tensor_functions.py:79: AttributeError
________________________ test_one_derivative[fast-fn8] _________________________

fn = ('sig', <function MathTestVariable.sig at 0x74e0cfa24ca0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c2050>)
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_functions.py:334: in grad_check
    out_plus = fn(*tensors)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

s = Tensor([1.e-05])

>       ('sig', cls.sig, lambda s: s.sigmoid()),
        ('log', cls.log, lambda s: s.log()),
        ('relu', cls.relu, lambda s: s.relu()),
        ('exp', cls.exp, lambda s: (s * 0.1).exp()),
    ]
E   AttributeError: 'Tensor' object has no attribute 'sigmoid'
E   Falsifying example: test_one_derivative(
E       data=data(...), fn=('sig', sig, lambda s: s.sigmoid()), backend='fast',
E   )
E   Draw 1: Tensor([0.])

minitorch/testing.py:197: AttributeError
________________________ test_one_derivative[fast-fn9] _________________________

fn = ('log', <function MathTestVariable.log at 0x74e0cfa24d30>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c20e0>)
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_functions.py:334: in grad_check
    out_plus = fn(*tensors)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

s = Tensor([1.e-05])

>       ('log', cls.log, lambda s: s.log()),
        ('relu', cls.relu, lambda s: s.relu()),
        ('exp', cls.exp, lambda s: (s * 0.1).exp()),
    ]
E   AttributeError: 'Tensor' object has no attribute 'log'
E   Falsifying example: test_one_derivative(
E       data=data(...), fn=('log', log, lambda s: s.log()), backend='fast',
E   )
E   Draw 1: Tensor([0.])

minitorch/testing.py:198: AttributeError
________________________ test_one_derivative[fast-fn10] ________________________

fn = ('relu', <function MathTestVariable.relu at 0x74e0cfa24dc0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c2170>)
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_functions.py:334: in grad_check
    out_plus = fn(*tensors)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

s = Tensor([1.e-05])

>       ('relu', cls.relu, lambda s: s.relu()),
        ('exp', cls.exp, lambda s: (s * 0.1).exp()),
    ]
E   AttributeError: 'Tensor' object has no attribute 'relu'
E   Falsifying example: test_one_derivative(
E       data=data(...), fn=('relu', relu, lambda s: s.relu()), backend='fast',
E   )
E   Draw 1: Tensor([0.])

minitorch/testing.py:199: AttributeError
________________________ test_one_derivative[fast-fn11] ________________________

fn = ('exp', <function MathTestVariable.exp at 0x74e0cfa24e50>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c2200>)
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_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:200: in <lambda>
    ('exp', cls.exp, lambda s: (s * 0.1).exp()),
minitorch/tensor.py:103: in __mul__
    return Mul.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf0579d0>, <minitorch.tensor_data.TensorData object at 0x74e0cf055a50>))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf0579d0>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf055a50>

    @staticmethod
    def forward(ctx: Context, t1, t2):
        ctx.save_for_backward(t1, t2)
>       return t1.backend.mul_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_one_derivative(
E           data=data(...), fn=('exp', exp, lambda s: (s * 0.1).exp()), backend='fast',
E       )
E       Draw 1: Tensor([0.])

minitorch/tensor_functions.py:89: AttributeError
___________________________ test_two_grad[fast-fn0] ____________________________

fn = ('add2', <function MathTestVariable.add2 at 0x74e0cfa24ee0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c2290>)
backend = 'fast'

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

tests/test_tensor_general.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor_general.py:113: in test_two_grad
    grad_check(tensor_fn, t1, t2)
minitorch/tensor_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:203: in <lambda>
    ('add2', cls.add2, lambda s1, s2: s1 + s2),
minitorch/tensor.py:97: in __add__
    return Add.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=())
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf3c30a0>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf3c3130>

    @staticmethod
    def forward(ctx: Context, t1, t2):
>       return t1.backend.add_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_two_grad(
E           data=data(...), fn=('add2', add2, lambda s1, s2: s1 + s2), backend='fast',
E       )
E       Draw 1: [Tensor([0.]), Tensor([0.])]

minitorch/tensor_functions.py:79: AttributeError
___________________________ test_two_grad[fast-fn1] ____________________________

fn = ('mul2', <function MathTestVariable.mul2 at 0x74e0cfa24f70>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c2320>)
backend = 'fast'

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

tests/test_tensor_general.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor_general.py:113: in test_two_grad
    grad_check(tensor_fn, t1, t2)
minitorch/tensor_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:204: in <lambda>
    ('mul2', cls.mul2, lambda s1, s2: s1 * s2),
minitorch/tensor.py:103: in __mul__
    return Mul.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf6ec700>, <minitorch.tensor_data.TensorData object at 0x74e0cf4b0220>))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf6ec700>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf4b0220>

    @staticmethod
    def forward(ctx: Context, t1, t2):
        ctx.save_for_backward(t1, t2)
>       return t1.backend.mul_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_two_grad(
E           data=data(...), fn=('mul2', mul2, lambda s1, s2: s1 * s2), backend='fast',
E       )
E       Draw 1: [Tensor([0.]), Tensor([0.])]

minitorch/tensor_functions.py:89: AttributeError
___________________________ test_two_grad[fast-fn2] ____________________________

fn = ('div2', <function MathTestVariable.div2 at 0x74e0cfa25000>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c23b0>)
backend = 'fast'

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

tests/test_tensor_general.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor_general.py:113: in test_two_grad
    grad_check(tensor_fn, t1, t2)
minitorch/tensor_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:205: in <lambda>
    ('div2', cls.div2, lambda s1, s2: s1 / s2),
minitorch/tensor.py:106: in __truediv__
    return Mul.apply(self, Inv.apply(self._ensure_tensor(b)))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf2da020>,))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf2da020>

    @staticmethod
    def forward(ctx: Context, t1):
        ctx.save_for_backward(t1)
>       return t1.backend.inv_map(t1)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_two_grad(
E           data=data(...), fn=('div2', div2, lambda s1, s2: s1 / s2), backend='fast',
E       )
E       Draw 1: [Tensor([0.]), Tensor([0.])]

minitorch/tensor_functions.py:69: AttributeError
____________________________ test_reduce[fast-fn0] _____________________________

fn = ('sum', <function sum at 0x74e0fee676d0>, None), backend = 'fast'

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

tests/test_tensor_general.py:117: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor_general.py:128: in test_reduce
    grad_check(tensor_fn, t1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

fn = None, tensors = (Tensor([1.e-05]),)
Tensor = <class 'minitorch.tensor.Tensor'>, numerical_grads = [], i = 0

    def grad_check(fn, *tensors):
        """
        Check the gradient of a function by comparing numerical and autodiff gradients.
    
        Args:
            fn: function to check
            *tensors: input tensors
        """
        from .tensor import Tensor
    
        # Compute numerical gradients
        numerical_grads = []
        for i, t in enumerate(tensors):
            # Save original data
            original_data = t._tensor._storage.copy()
    
            grad = np.zeros_like(t._tensor._storage)
            for j in range(len(t._tensor._storage)):
                # f(x + eps)
                t._tensor._storage[j] = original_data[j] + 1e-5
>               out_plus = fn(*tensors)
E               TypeError: 'NoneType' object is not callable
E               Falsifying example: test_reduce(
E                   data=data(...), fn=('sum', sum, None), backend='fast',
E               )
E               Draw 1: Tensor([0.])

minitorch/tensor_functions.py:334: TypeError
______________________ test_two_grad_broadcast[fast-fn0] _______________________

fn = ('add2', <function MathTestVariable.add2 at 0x74e0cfa24ee0>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c2290>)
backend = 'fast'

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

tests/test_tensor_general.py:308: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor_general.py:320: in test_two_grad_broadcast
    grad_check(tensor_fn, t1, t2)
minitorch/tensor_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:203: in <lambda>
    ('add2', cls.add2, lambda s1, s2: s1 + s2),
minitorch/tensor.py:97: in __add__
    return Add.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=())
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf085960>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf3dc8e0>

    @staticmethod
    def forward(ctx: Context, t1, t2):
>       return t1.backend.add_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_two_grad_broadcast(
E           data=data(...), fn=('add2', add2, lambda s1, s2: s1 + s2), backend='fast',
E       )
E       Draw 1: [Tensor([0.]), Tensor([0.])]

minitorch/tensor_functions.py:79: AttributeError
______________________ test_two_grad_broadcast[fast-fn1] _______________________

fn = ('mul2', <function MathTestVariable.mul2 at 0x74e0cfa24f70>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c2320>)
backend = 'fast'

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

tests/test_tensor_general.py:308: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor_general.py:320: in test_two_grad_broadcast
    grad_check(tensor_fn, t1, t2)
minitorch/tensor_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:204: in <lambda>
    ('mul2', cls.mul2, lambda s1, s2: s1 * s2),
minitorch/tensor.py:103: in __mul__
    return Mul.apply(self, self._ensure_tensor(b))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf10f7c0>, <minitorch.tensor_data.TensorData object at 0x74e0cf030be0>))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf10f7c0>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf030be0>

    @staticmethod
    def forward(ctx: Context, t1, t2):
        ctx.save_for_backward(t1, t2)
>       return t1.backend.mul_zip(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_two_grad_broadcast(
E           data=data(...), fn=('mul2', mul2, lambda s1, s2: s1 * s2), backend='fast',
E       )
E       Draw 1: [Tensor([0.]), Tensor([0.])]

minitorch/tensor_functions.py:89: AttributeError
______________________ test_two_grad_broadcast[fast-fn2] _______________________

fn = ('div2', <function MathTestVariable.div2 at 0x74e0cfa25000>, <function MathTestVariable._comp_testing.<locals>.<lambda> at 0x74e0cf7c23b0>)
backend = 'fast'

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

tests/test_tensor_general.py:308: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor_general.py:320: in test_two_grad_broadcast
    grad_check(tensor_fn, t1, t2)
minitorch/tensor_functions.py:334: in grad_check
    out_plus = fn(*tensors)
minitorch/testing.py:205: in <lambda>
    ('div2', cls.div2, lambda s1, s2: s1 / s2),
minitorch/tensor.py:106: in __truediv__
    return Mul.apply(self, Inv.apply(self._ensure_tensor(b)))
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf393310>,))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf393310>

    @staticmethod
    def forward(ctx: Context, t1):
        ctx.save_for_backward(t1)
>       return t1.backend.inv_map(t1)
E       AttributeError: 'TensorData' object has no attribute 'backend'
E       Falsifying example: test_two_grad_broadcast(
E           data=data(...), fn=('div2', div2, lambda s1, s2: s1 / s2), backend='fast',
E       )
E       Draw 1: [Tensor([0.]), Tensor([0.])]

minitorch/tensor_functions.py:69: AttributeError
______________________________ test_permute[fast] ______________________________

backend = 'fast'

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

tests/test_tensor_general.py:328: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_tensor_general.py:338: in test_permute
    minitorch.grad_check(permute, t1)
minitorch/tensor_functions.py:334: in grad_check
    out_plus = fn(*tensors)
tests/test_tensor_general.py:336: in permute
    return a.permute(*permutation)
minitorch/tensor.py:147: in permute
    return Permute.apply(self, order)
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=((0,),))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf031420>, order = (0,)

    @staticmethod
    def forward(ctx: Context, t1, order):
        ctx.save_for_backward(order)
>       return Tensor.make(t1._tensor.permute(*order)._storage, t1._tensor.permute(*order).shape, backend=t1.backend)
E       NameError: name 'Tensor' is not defined
E       Falsifying example: test_permute(
E           data=data(...), backend='fast',
E       )
E       Draw 1: Tensor([0.])
E       Draw 2: [0]

minitorch/tensor_functions.py:197: NameError
___________________________________ test_mm2 ___________________________________

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

tests/test_tensor_general.py:343: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
minitorch/tensor_functions.py:268: in rand
    return Tensor.make(data, shape, backend=backend)
minitorch/tensor.py:174: in make
    tensor_data = TensorData(storage, shape, strides)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <minitorch.tensor_data.TensorData object at 0x74e0cf1b8640>
storage = array([[0.45122744, 0.3095336 , 0.53310145],
       [0.22661616, 0.19092543, 0.94521578]])
shape = (2, 3), strides = (3, 1)

    def __init__(self, storage: Union[Sequence[float], Storage], shape: UserShape, strides: Optional[UserStrides]=None):
        if isinstance(storage, np.ndarray):
            self._storage = storage
        else:
            self._storage = array(storage, dtype=float64)
        if strides is None:
            strides = strides_from_shape(shape)
        assert isinstance(strides, tuple), 'Strides must be tuple'
        assert isinstance(shape, tuple), 'Shape must be tuple'
        if len(strides) != len(shape):
            raise IndexingError(f'Len of strides {strides} must match {shape}.')
        self._strides = array(strides)
        self._shape = array(shape)
        self.strides = strides
        self.dims = len(strides)
        self.size = int(prod(shape))
        self.shape = shape
>       assert len(self._storage) == self.size
E       AssertionError

minitorch/tensor_data.py:156: 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:373: in test_bmm
    c = a @ b
minitorch/tensor.py:113: in __matmul__
    return MatMul.apply(self, b)
minitorch/tensor_functions.py:44: in apply
    result_data = cls.forward(ctx, *raw_inputs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

ctx = Context(no_grad=False, saved_values=(<minitorch.tensor_data.TensorData object at 0x74e0cf4f7f40>, <minitorch.tensor_data.TensorData object at 0x74e0cf4f6f80>))
t1 = <minitorch.tensor_data.TensorData object at 0x74e0cf4f7f40>
t2 = <minitorch.tensor_data.TensorData object at 0x74e0cf4f6f80>

    @staticmethod
    def forward(ctx: Context, t1, t2):
        ctx.save_for_backward(t1, t2)
>       return t1.backend.matrix_multiply(t1, t2)
E       AttributeError: 'TensorData' object has no attribute 'backend'
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: Tensor([[[0. 0.]
E         [0. 0.]]
E       
E        [[0. 0.]
E         [0. 0.]]])
E       Draw 6: Tensor([[[0. 0.]
E         [0. 0.]]])

minitorch/tensor_functions.py:229: AttributeError
--------------------------------- JSON report ----------------------------------
report saved to: report.json
=========================== short test summary info ============================
FAILED tests/test_autodiff.py::test_chain_rule1 - AttributeError: 'Scalar' ob...
FAILED tests/test_autodiff.py::test_chain_rule2 - AttributeError: 'Scalar' ob...
FAILED tests/test_autodiff.py::test_chain_rule3 - AttributeError: 'Scalar' ob...
FAILED tests/test_autodiff.py::test_chain_rule4 - AttributeError: 'Scalar' ob...
FAILED tests/test_conv.py::test_conv1d_simple - NameError: name 'Tensor' is n...
FAILED tests/test_conv.py::test_conv1d - AttributeError: 'NoneType' object ha...
FAILED tests/test_conv.py::test_conv1d_channel - AttributeError: 'NoneType' o...
FAILED tests/test_conv.py::test_conv - AttributeError: 'NoneType' object has ...
FAILED tests/test_conv.py::test_conv_batch - AttributeError: 'NoneType' objec...
FAILED tests/test_conv.py::test_conv_channel - AttributeError: 'NoneType' obj...
FAILED tests/test_conv.py::test_conv2 - AssertionError
FAILED tests/test_module.py::test_stacked_demo - TypeError: 'NoneType' object...
FAILED tests/test_module.py::test_module - assert not True
FAILED tests/test_module.py::test_stacked_module - assert not True
FAILED tests/test_module.py::test_parameter - assert False
FAILED tests/test_modules.py::test_linear - AttributeError: 'NoneType' object...
FAILED tests/test_modules.py::test_nn_size - TypeError: object of type 'NoneT...
FAILED tests/test_nn.py::test_avg - TypeError: 'NoneType' object is not subsc...
FAILED tests/test_nn.py::test_max - NotImplementedError: Need to implement fo...
FAILED tests/test_nn.py::test_max_pool - TypeError: 'NoneType' object is not ...
FAILED tests/test_nn.py::test_drop - AttributeError: 'NoneType' object has no...
FAILED tests/test_nn.py::test_softmax - AttributeError: 'NoneType' object has...
FAILED tests/test_nn.py::test_log_softmax - AttributeError: 'NoneType' object...
FAILED tests/test_operators.py::test_one_args[fn9] - ValueError: math domain ...
FAILED tests/test_scalar.py::test_one_args[fn7] - ZeroDivisionError: float di...
FAILED tests/test_scalar.py::test_one_args[fn9] - ValueError: math domain error
FAILED tests/test_scalar.py::test_one_args[fn11] - AssertionError: Failure x=...
FAILED tests/test_scalar.py::test_two_args[fn2] - ZeroDivisionError: float di...
FAILED tests/test_scalar.py::test_one_derivative[fn0] - TypeError: bad operan...
FAILED tests/test_scalar.py::test_one_derivative[fn1] - TypeError: bad operan...
FAILED tests/test_scalar.py::test_one_derivative[fn2] - TypeError: bad operan...
FAILED tests/test_scalar.py::test_one_derivative[fn3] - TypeError: bad operan...
FAILED tests/test_scalar.py::test_one_derivative[fn4] - TypeError: bad operan...
FAILED tests/test_scalar.py::test_one_derivative[fn5] - TypeError: bad operan...
FAILED tests/test_scalar.py::test_one_derivative[fn6] - TypeError: bad operan...
FAILED tests/test_scalar.py::test_one_derivative[fn7] - TypeError: bad operan...
FAILED tests/test_scalar.py::test_one_derivative[fn8] - TypeError: bad operan...
FAILED tests/test_scalar.py::test_one_derivative[fn9] - ValueError: math doma...
FAILED tests/test_scalar.py::test_one_derivative[fn10] - TypeError: bad opera...
FAILED tests/test_scalar.py::test_one_derivative[fn11] - TypeError: bad opera...
FAILED tests/test_scalar.py::test_two_derivative[fn0] - TypeError: bad operan...
FAILED tests/test_scalar.py::test_two_derivative[fn1] - TypeError: bad operan...
FAILED tests/test_scalar.py::test_two_derivative[fn2] - ZeroDivisionError: fl...
FAILED tests/test_tensor.py::test_create - AttributeError: 'TensorData' objec...
FAILED tests/test_tensor.py::test_one_args[fn0] - AttributeError: 'TensorData...
FAILED tests/test_tensor.py::test_one_args[fn1] - AttributeError: 'TensorData...
FAILED tests/test_tensor.py::test_one_args[fn2] - AttributeError: 'TensorData...
FAILED tests/test_tensor.py::test_one_args[fn3] - AttributeError: 'TensorData...
FAILED tests/test_tensor.py::test_one_args[fn4] - AttributeError: 'TensorData...
FAILED tests/test_tensor.py::test_one_args[fn5] - AttributeError: 'TensorData...
FAILED tests/test_tensor.py::test_one_args[fn6] - AttributeError: 'TensorData...
FAILED tests/test_tensor.py::test_one_args[fn7] - AttributeError: 'TensorData...
FAILED tests/test_tensor.py::test_one_args[fn8] - AttributeError: 'Tensor' ob...
FAILED tests/test_tensor.py::test_one_args[fn9] - AttributeError: 'Tensor' ob...
FAILED tests/test_tensor.py::test_one_args[fn10] - AttributeError: 'Tensor' o...
FAILED tests/test_tensor.py::test_one_args[fn11] - AttributeError: 'TensorDat...
FAILED tests/test_tensor.py::test_two_args[fn0] - AttributeError: 'TensorData...
FAILED tests/test_tensor.py::test_two_args[fn1] - AttributeError: 'TensorData...
FAILED tests/test_tensor.py::test_two_args[fn2] - AttributeError: 'TensorData...
FAILED tests/test_tensor.py::test_one_derivative[fn0] - AttributeError: 'Tens...
FAILED tests/test_tensor.py::test_one_derivative[fn1] - AttributeError: 'Tens...
FAILED tests/test_tensor.py::test_one_derivative[fn2] - AttributeError: 'Tens...
FAILED tests/test_tensor.py::test_one_derivative[fn3] - AttributeError: 'Tens...
FAILED tests/test_tensor.py::test_one_derivative[fn4] - AttributeError: 'Tens...
FAILED tests/test_tensor.py::test_one_derivative[fn5] - AttributeError: 'Tens...
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] - AttributeError: 'Tens...
FAILED tests/test_tensor.py::test_one_derivative[fn9] - AttributeError: 'Tens...
FAILED tests/test_tensor.py::test_one_derivative[fn10] - AttributeError: 'Ten...
FAILED tests/test_tensor.py::test_one_derivative[fn11] - AttributeError: 'Ten...
FAILED tests/test_tensor.py::test_permute - NameError: name 'Tensor' is not d...
FAILED tests/test_tensor.py::test_grad_size - AssertionError
FAILED tests/test_tensor.py::test_grad_reduce[fn0] - TypeError: 'NoneType' ob...
FAILED tests/test_tensor.py::test_two_grad[fn0] - AttributeError: 'TensorData...
FAILED tests/test_tensor.py::test_two_grad[fn1] - AttributeError: 'TensorData...
FAILED tests/test_tensor.py::test_two_grad[fn2] - AttributeError: 'TensorData...
FAILED tests/test_tensor.py::test_two_grad_broadcast[fn0] - AttributeError: '...
FAILED tests/test_tensor.py::test_two_grad_broadcast[fn1] - AttributeError: '...
FAILED tests/test_tensor.py::test_two_grad_broadcast[fn2] - AttributeError: '...
FAILED tests/test_tensor.py::test_fromlist - AssertionError
FAILED tests/test_tensor.py::test_view - AssertionError
FAILED tests/test_tensor.py::test_back_view - NameError: name 'Tensor' is not...
FAILED tests/test_tensor.py::test_fromnumpy - AssertionError
FAILED tests/test_tensor.py::test_reduce_forward_one_dim - AssertionError
FAILED tests/test_tensor.py::test_reduce_forward_one_dim_2 - AssertionError
FAILED tests/test_tensor.py::test_reduce_forward_all_dims - AssertionError
FAILED tests/test_tensor_data.py::test_layout - AttributeError: 'TensorData' ...
FAILED tests/test_tensor_data.py::test_enumeration - AttributeError: 'TensorD...
FAILED tests/test_tensor_data.py::test_index - AttributeError: 'TensorData' o...
FAILED tests/test_tensor_data.py::test_permute - AttributeError: 'TensorData'...
FAILED tests/test_tensor_data.py::test_string - AttributeError: 'TensorData' ...
FAILED tests/test_tensor_general.py::test_create[fast] - AttributeError: 'Ten...
FAILED tests/test_tensor_general.py::test_one_args[fast-fn0] - AttributeError...
FAILED tests/test_tensor_general.py::test_one_args[fast-fn1] - AttributeError...
FAILED tests/test_tensor_general.py::test_one_args[fast-fn2] - AttributeError...
FAILED tests/test_tensor_general.py::test_one_args[fast-fn3] - AttributeError...
FAILED tests/test_tensor_general.py::test_one_args[fast-fn4] - AttributeError...
FAILED tests/test_tensor_general.py::test_one_args[fast-fn5] - AttributeError...
FAILED tests/test_tensor_general.py::test_one_args[fast-fn6] - AttributeError...
FAILED tests/test_tensor_general.py::test_one_args[fast-fn7] - AttributeError...
FAILED tests/test_tensor_general.py::test_one_args[fast-fn8] - AttributeError...
FAILED tests/test_tensor_general.py::test_one_args[fast-fn9] - AttributeError...
FAILED tests/test_tensor_general.py::test_one_args[fast-fn10] - AttributeErro...
FAILED tests/test_tensor_general.py::test_one_args[fast-fn11] - AttributeErro...
FAILED tests/test_tensor_general.py::test_two_args[fast-fn0] - AttributeError...
FAILED tests/test_tensor_general.py::test_two_args[fast-fn1] - AttributeError...
FAILED tests/test_tensor_general.py::test_two_args[fast-fn2] - AttributeError...
FAILED tests/test_tensor_general.py::test_one_derivative[fast-fn0] - Attribut...
FAILED tests/test_tensor_general.py::test_one_derivative[fast-fn1] - Attribut...
FAILED tests/test_tensor_general.py::test_one_derivative[fast-fn2] - Attribut...
FAILED tests/test_tensor_general.py::test_one_derivative[fast-fn3] - Attribut...
FAILED tests/test_tensor_general.py::test_one_derivative[fast-fn4] - Attribut...
FAILED tests/test_tensor_general.py::test_one_derivative[fast-fn5] - Attribut...
FAILED tests/test_tensor_general.py::test_one_derivative[fast-fn6] - Attribut...
FAILED tests/test_tensor_general.py::test_one_derivative[fast-fn7] - Attribut...
FAILED tests/test_tensor_general.py::test_one_derivative[fast-fn8] - Attribut...
FAILED tests/test_tensor_general.py::test_one_derivative[fast-fn9] - Attribut...
FAILED tests/test_tensor_general.py::test_one_derivative[fast-fn10] - Attribu...
FAILED tests/test_tensor_general.py::test_one_derivative[fast-fn11] - Attribu...
FAILED tests/test_tensor_general.py::test_two_grad[fast-fn0] - AttributeError...
FAILED tests/test_tensor_general.py::test_two_grad[fast-fn1] - AttributeError...
FAILED tests/test_tensor_general.py::test_two_grad[fast-fn2] - AttributeError...
FAILED tests/test_tensor_general.py::test_reduce[fast-fn0] - TypeError: 'None...
FAILED tests/test_tensor_general.py::test_two_grad_broadcast[fast-fn0] - Attr...
FAILED tests/test_tensor_general.py::test_two_grad_broadcast[fast-fn1] - Attr...
FAILED tests/test_tensor_general.py::test_two_grad_broadcast[fast-fn2] - Attr...
FAILED tests/test_tensor_general.py::test_permute[fast] - NameError: name 'Te...
FAILED tests/test_tensor_general.py::test_mm2 - AssertionError
FAILED tests/test_tensor_general.py::test_bmm[fast] - AttributeError: 'Tensor...
================== 130 failed, 51 passed, 4 xfailed in 10.63s ==================