Create a tensor from a nested Python list using the framework’s tensor constructor.
Input: A nested list data representing a 2D matrix.
data
Output: A 2D tensor with the same values.
API Reference:
torch.tensor(data)
jnp.array(data)