Line 45 in math_interface.py creates list of tensors as follows:
x_var = [minitorch.tensor(x, requires_grad=True) for x in xs]
This leads to an error when x is not a list or tuple.
This error can be corrected in tensor_functions.py by adding the following code in def tensor(): before processing ls
if not isinstance(ls, (list, tuple)):
ls = [ls]