You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have two objects I want to compare with each other. In order to do so I use your package deepdiff. So imagine you have object A and object B. In order to check, if both objects are equal, I did the following:
Doing this in case of a list of strings in _dict_, I get the following error:
File "C:...\lib\site-packages\numpy\testing_private\utils.py", line 1039, in compare z = abs(x - y)
TypeError: unsupported operand type(s) for -: 'str' and 'str'.
A quickfix that worked for me in self._diff_numy_array:
If you agree on that quickfix, I can do a PR, if you want to.
To Reproduce
a = np.array(['a', 'b'], dtype=object)
b = np.array(['a', 'b'], dtype=object)
DeepDiff(a, b, significant_digits=6)
Expected behavior
I would expect that passing a dictionary where significant_digits apply to only few entries, in case of the other entries it is just skipped.
OS, DeepDiff version and Python version (please complete the following information):
OS: Windows
Version: 10 Enterprise
Python Version: 3.8.5
DeepDiff Version: 6.1.0
Additional context
The numpy version I use is 1.22.4
The text was updated successfully, but these errors were encountered:
Hi @SimonRubenDrauz
Thank you for reporting this issue and providing the solution too. Sorry it took more than a year to take a look at this ticket.
I copy pasted your solution and pushed it to the dev branch. I will keep you posted once it is released.
Describe the bug
I have two objects I want to compare with each other. In order to do so I use your package deepdiff. So imagine you have object A and object B. In order to check, if both objects are equal, I did the following:
Doing this in case of a list of strings in _dict_, I get the following error:
A quickfix that worked for me in self._diff_numy_array:

If you agree on that quickfix, I can do a PR, if you want to.
To Reproduce
Expected behavior
I would expect that passing a dictionary where significant_digits apply to only few entries, in case of the other entries it is just skipped.
OS, DeepDiff version and Python version (please complete the following information):
Additional context
The numpy version I use is 1.22.4
The text was updated successfully, but these errors were encountered: