@@ -118,21 +118,20 @@ There is also a utility function :func:`ncdata.utils.ncdata_copy` : This is
118118effectively the same thing as the NcData object :meth: `~ncdata.NcData.copy ` method.
119119
120120
121- Equality Checking
122- -----------------
123- We provide a simple, comprehensive ``== `` check for :mod: `~ncdata.NcDimension ` and
124- :mod: `~ncdata.NcAttribute ` objects, but not at present :mod: `~ncdata.NcVariable ` or
125- :mod: `~ncdata.NcData `.
126-
127- So, using ``== `` on :mod: `~ncdata.NcVariable ` or :mod: `~ncdata.NcData ` objects
128- will only do an identity check -- that is, it tests ``id(A) == id(B) ``, or ``A is B ``.
129-
130- However, these objects **can ** be properly compared with the dataset comparison
131- utilities, :func: `ncdata.utils.dataset_differences ` and
132- :func: `ncdata.utils.variable_differences `. By default, these operations are very
133- comprehensive and may be very costly for instance comparing large data arrays, but they
134- also allow more nuanced and controllable checking, e.g. to skip data array comparisons
135- or ignore variable ordering.
121+ Equality Testing
122+ ----------------
123+ We implement equality operations ``== `` / ``!= `` for all the core data objects.
124+
125+ However, simple equality testing on :class: `@ncdata.NcData ` and :class: `@ncdata.NcVariable `
126+ objects can be very costly if it requires comparing large data arrays.
127+
128+ If you need to avoid comparing large (and possibly lazy) arrays then you can use the
129+ :func: `ncdata.utils.dataset_differences ` and
130+ :func: `ncdata.utils.variable_differences ` utility functions.
131+ These functions also provide multiple options to enable more tolerant comparison,
132+ such as allowing variables to have a different ordering.
133+
134+ See: :ref: `utils_equality `
136135
137136.. _object_creation :
138137
@@ -187,8 +186,7 @@ The result is the same:
187186
188187.. doctest :: python
189188
190- >>> from ncdata.utils import dataset_differences
191- >>> print (dataset_differences(data1, data2))
192- []
189+ >>> data1 == data2
190+ True
193191
194192
0 commit comments