Skip to content

Commit 6548e0e

Browse files
Fix typos in docs (#6957)
* Fix typo in comparisions * Fix two consecutive sentences ending in colon * Split into two sentences
1 parent 336512d commit 6548e0e

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

docs/source/use_with_jax.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ If your dataset consists of N-dimensional arrays, you will see that by default t
100100
{'data': [Array([1, 2], dtype=int32), Array([3], dtype=int32)]}
101101
```
102102

103-
However this logic often requires slow shape comparisions and data copies, to avoid this you must explicitly use the [`Array`] feature type and specify the shape of your tensors:
103+
However this logic often requires slow shape comparisons and data copies.
104+
To avoid this, you must explicitly use the [`Array`] feature type and specify the shape of your tensors:
104105

105106
```py
106107
>>> from datasets import Dataset, Features, Array2D

docs/source/use_with_pytorch.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ If your dataset consists of N-dimensional arrays, you will see that by default t
6161
{'data': [tensor([1, 2]), tensor([3])]}
6262
```
6363

64-
However this logic often requires slow shape comparisions and data copies, to avoid this you must explicitly use the [`Array`] feature type and specify the shape of your tensors:
64+
However this logic often requires slow shape comparisons and data copies.
65+
To avoid this, you must explicitly use the [`Array`] feature type and specify the shape of your tensors:
6566

6667
```py
6768
>>> from datasets import Dataset, Features, Array2D

docs/source/use_with_tensorflow.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ array([[1, 2],
4242
## N-dimensional arrays
4343

4444
If your dataset consists of N-dimensional arrays, you will see that by default they are considered as the same tensor if the shape is fixed:
45-
Otherwise, a TensorFlow formatted dataset outputs a `RaggedTensor` instead of a single tensor:
4645

4746
```py
4847
>>> from datasets import Dataset
@@ -55,6 +54,8 @@ Otherwise, a TensorFlow formatted dataset outputs a `RaggedTensor` instead of a
5554
[3, 4]])>}
5655
```
5756

57+
Otherwise, a TensorFlow formatted dataset outputs a `RaggedTensor` instead of a single tensor:
58+
5859
```py
5960
>>> from datasets import Dataset
6061
>>> data = [[[1, 2],[3]],[[4, 5, 6],[7, 8]]] # varying shape
@@ -64,7 +65,8 @@ Otherwise, a TensorFlow formatted dataset outputs a `RaggedTensor` instead of a
6465
{'data': <tf.RaggedTensor [[1, 2], [3]]>}
6566
```
6667

67-
However this logic often requires slow shape comparisions and data copies, to avoid this you must explicitly use the [`Array`] feature type and specify the shape of your tensors:
68+
However this logic often requires slow shape comparisons and data copies.
69+
To avoid this, you must explicitly use the [`Array`] feature type and specify the shape of your tensors:
6870

6971
```py
7072
>>> from datasets import Dataset, Features, Array2D

0 commit comments

Comments
 (0)