dedef45bef6085fad0f42b17e432a9e673107f25,core/eolearn/core/utilities.py,,deep_eq,#Any#Any#,29
Before Change
// pylint: disable=too-many-return-statements
if isinstance(fst_obj, (np.ndarray, np.memmap)) and \
isinstance(snd_obj, (np.ndarray, np.memmap)):
return np.array_equal(fst_obj, snd_obj)
if not isinstance(fst_obj, type(snd_obj)):
return False
After Change
:return: `True` if objects are deeply equal, `False` otherwise
// pylint: disable=too-many-return-statements
if isinstance(fst_obj, (np.ndarray, np.memmap)):
if not isinstance(snd_obj, (np.ndarray, np.memmap)):
return False
if fst_obj.dtype != snd_obj.dtype:
return False
fst_nan_mask = np.isnan(fst_obj)
snd_nan_mask = np.isnan(snd_obj)
return np.array_equal(fst_obj[~fst_nan_mask], snd_obj[~snd_nan_mask]) and \
np.array_equal(fst_nan_mask, snd_nan_mask)
if not isinstance(fst_obj, type(snd_obj)):
return False
if isinstance(fst_obj, (list, tuple)):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: sentinel-hub/eo-learn
Commit Name: dedef45bef6085fad0f42b17e432a9e673107f25
Time: 2018-08-02
Author: matej.aleksandrov@sinergise.com
File Name: core/eolearn/core/utilities.py
Class Name:
Method Name: deep_eq
Project Name: sentinel-hub/eo-learn
Commit Name: 7b8bc30bf90b47ade91e0931b0a5a15bee0157d9
Time: 2018-07-31
Author: matej.aleksandrov@sinergise.com
File Name: core/eolearn/core/utilities.py
Class Name:
Method Name: deep_eq
Project Name: sentinel-hub/eo-learn
Commit Name: 502d7b4705040a21be3b4da40f33437c1fb2c0e7
Time: 2020-01-03
Author: matej.aleksandrov@sinergise.com
File Name: core/eolearn/core/utilities.py
Class Name:
Method Name: deep_eq