-
-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use np.dtype='bool'
at all?
#494
Comments
@doronbehar Thanks for reporting the bug. It is not supported because nobody until now has run into this issue and reported it. Which means boolean dtype is not very popular even if it is the simplest. |
OK I see, I thought that deepdiff decided by itself due to an unclear reason to restrict hashing to formats 'B', 'b' and 'c' :), that's why I phrased my question like that. And yes, I won't mind giving this a bit of effort. However I have no idea where that memoryview comes from.. I can create a PR that will simply skip memory view diff --git i/deepdiff/deephash.py w/deepdiff/deephash.py
index 32fee9c..1258713 100644
--- i/deepdiff/deephash.py
+++ w/deepdiff/deephash.py
@@ -500,6 +500,8 @@ class DeepHash(Base):
else:
result = not_hashed
try:
+ print("obj is", obj)
+ print("hashes are", self.hashes)
result, counts = self.hashes[obj]
except (TypeError, KeyError):
pass And ran the same reproducing snippet, and got:
|
@doronbehar Does this look relevant? https://stackoverflow.com/a/38837737/1497443 |
It came out to be simpler then I thought :) solution is in #496 |
Awesome work! |
Describe the bug
Gives me:
Why? Isn't a boolean datatype supposed to be the simplest dtype there is?
To Reproduce
Above.
Expected behavior
No error.
OS, DeepDiff version and Python version (please complete the following information):
nixos-unstable
The text was updated successfully, but these errors were encountered: