`Dataset.with_format` behaves inconsistently with documentation
MEMBER
Hi ! It seems the documentation was outdated in this paragraph

I fixed it here: https://github.com/huggingface/datasets/pull/6956
2024-06-04T16:40:40Z
https://github.com/huggingface/datasets/issues/6950#issuecomment-2147970100
https://api.github.com/repos/huggingface/datasets/issues/6950
IC_kwDODunzps6AB2w0
https://api.github.com/repos/huggingface/datasets/issues/comments/2147970100/reactions
2024-06-04T16:40:40Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2147970100
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
NONE
Fixed.
2024-06-25T08:05:49Z
https://github.com/huggingface/datasets/issues/6950#issuecomment-2188247495
https://api.github.com/repos/huggingface/datasets/issues/6950
IC_kwDODunzps6CbgHH
https://api.github.com/repos/huggingface/datasets/issues/comments/2188247495/reactions
2024-06-25T08:05:49Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2188247495
https://avatars.githubusercontent.com/u/42494185?v=4
https://api.github.com/users/iansheng/events{/privacy}
https://api.github.com/users/iansheng/followers
https://api.github.com/users/iansheng/following{/other_user}
https://api.github.com/users/iansheng/gists{/gist_id}
https://github.com/iansheng
iansheng
MDQ6VXNlcjQyNDk0MTg1
https://api.github.com/users/iansheng/orgs
https://api.github.com/users/iansheng/received_events
https://api.github.com/users/iansheng/repos
https://api.github.com/users/iansheng/starred{/owner}{/repo}
https://api.github.com/users/iansheng/subscriptions
User
https://api.github.com/users/iansheng
public
### Describe the bug

The actual behavior of the interface `Dataset.with_format` is inconsistent with the documentation.
https://huggingface.co/docs/datasets/use_with_pytorch#n-dimensional-arrays
https://huggingface.co/docs/datasets/v2.19.0/en/use_with_tensorflow#n-dimensional-arrays

> If your dataset consists of N-dimensional arrays, you will see that by default they are considered as nested lists.
> In particular, a PyTorch formatted dataset outputs nested lists instead of a single tensor.
> A TensorFlow formatted dataset outputs a RaggedTensor instead of a single tensor.

But I get a single tensor by default, which is  inconsistent with the description.

Actually the current behavior seems more reasonable to me. Therefore, the document needs to be modified.

### Steps to reproduce the bug

```python
>>> from datasets import Dataset
>>> data = [[[1, 2],[3, 4]],[[5, 6],[7, 8]]]
>>> ds = Dataset.from_dict({"data": data})
>>> ds = ds.with_format("torch")
>>> ds[0]
{'data': tensor([[1, 2],
        [3, 4]])}
>>> ds = ds.with_format("tf")
>>> ds[0]
{'data': <tf.Tensor: shape=(2, 2), dtype=int64, numpy=
array([[1, 2],
       [3, 4]])>}
```

### Expected behavior

```python
>>> from datasets import Dataset
>>> data = [[[1, 2],[3, 4]],[[5, 6],[7, 8]]]
>>> ds = Dataset.from_dict({"data": data})
>>> ds = ds.with_format("torch")
>>> ds[0]
{'data': [tensor([1, 2]), tensor([3, 4])]}
>>> ds = ds.with_format("tf")
>>> ds[0]
{'data': <tf.RaggedTensor [[1, 2], [3, 4]]>}
```

### Environment info

datasets==2.19.1
torch==2.1.0
tensorflow==2.13.1