spatialdata.testing.assert_spatial_data_objects_are_identical#
- spatialdata.testing.assert_spatial_data_objects_are_identical(sdata0, sdata1, check_transformations=True)#
Compare two SpatialData objects and assert that they are identical.
- Parameters:
sdata0 (
SpatialData
) – The first SpatialData object.sdata1 (
SpatialData
) – The second SpatialData object.check_transformations (
bool
(default:True
)) – Whether to check if the transformations are identical, for each element.
- Return type:
None
- Returns:
: None
- Raises:
AssertionError – If the two SpatialData objects are not identical.
Notes
With the current implementation, the transformations Translate([1.0, 2.0], axes=(‘x’, ‘y’)) and Translate([2.0, 1.0], axes=(‘y’, ‘x’)) are considered different. A quick way to avoid an error in this case is to use the check_transformations=False parameter.