Skip to content

Commit 4662fae

Browse files
committed
english corrections
1 parent 15a99ab commit 4662fae

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

deepdiff/serialization.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,8 @@ def _to_delta_dict(self, directed=True, report_repetition_required=True):
183183

184184
def pretty(self):
185185
"""
186-
The pretty human readable string output for the diff object.
187-
188-
This is regardless of what view was used to generate the diff.
186+
The pretty human readable string output for the diff object
187+
regardless of what view was used to generate the diff.
189188
190189
Example:
191190
>>> t1={1,2,4}

docs/deep_distance.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Deep Distance
88

99
Deep Distance is the distance between 2 objects. It is a floating point number between 0 and 1. Deep Distance in concept is inspired by `Levenshtein Edit Distance <https://en.wikipedia.org/wiki/Levenshtein_distance>`_.
1010

11-
At its core, the Deep Distance is the number of operations needed to convert one object to the other divided by the sum of the sizes of the 2 objects capped at 1. Note that unlike Levensthtein Distance, the Deep Distance it is the based on the number of operations and NOT the “minimum” number of operations to convert one object to the other. The number is highly dependent on the granularity of the diff results. And the granularity is controlled by the parameters passed to DeepDiff.
11+
At its core, the Deep Distance is the number of operations needed to convert one object to the other divided by the sum of the sizes of the 2 objects capped at 1. Note that unlike Levensthtein Distance, the Deep Distance is based on the number of operations and NOT the “minimum” number of operations to convert one object to the other. The number is highly dependent on the granularity of the diff results. And the granularity is controlled by the parameters passed to DeepDiff.
1212

1313
.. _get_deep_distance_label:
1414

docs/delta.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
Delta
44
=====
55

6-
DeepDiff Delta is a directed delta that when applied to t1 can yield t2 where delta is the difference of t1 and t2.
6+
DeepDiff Delta is a directed delta that when applied to t1 can yield t2 where delta is the difference between t1 and t2.
77
Delta objects are like git commits but for structured data.
8-
You can convert the diff results into Delta objects, store the deltas and later apply to other objects.
8+
You can convert the diff results into Delta objects, store the deltas, and later apply to other objects.
99

1010
.. note::
1111
If you plan to generate Delta objects from the DeepDiff result, and ignore_order=True, you need to also set the report_repetition=True.
@@ -188,7 +188,7 @@ For example:
188188
>>> delta
189189
<Delta: {'values_changed': {'root[0]': {'new_value': 3}, 'root[2][1]': {'new_value': 8}}}>
190190

191-
Note that we can apply delta to objects different than the original objects there were made from:
191+
Note that we can apply delta to objects different than the original objects they were made from:
192192

193193
>>> t3 = ["a", 2, [3, "b", "c"]]
194194
>>> t3 + delta

docs/optimizations.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ If you are diffing lists of python numbers, you could get performance improvemen
139139

140140
For example lets take a look at the performance of the benchmark_array_no_numpy vs. benchmark_numpy_array in the `DeepDiff-Benchmark repo <https://github.com/seperman/deepdiff-benchmark/blob/master/benchmark.py>`_.
141141

142-
In this specific test, we have 2 lists of numbers that have nothing in common: `mat1 <https://github.com/seperman/deepdiff-benchmark/blob/master/data/mat1.txt>`_ and `mat2 <https://github.com/seperman/deepdiff-benchmark/blob/master/data/mat2.txt>`_
142+
In this specific test, we have 2 lists of numbers that have nothing in common: `mat1 <https://github.com/seperman/deepdiff-benchmark/blob/master/data/mat1.txt>`_ and `mat2 <https://github.com/seperman/deepdiff-benchmark/blob/master/data/mat2.txt>`_ .
143143

144144
No Cache and No Numpy
145145
^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)