mirror of
https://github.com/vale981/hopsflow
synced 2025-03-05 08:51:37 -05:00
support bfkey
This commit is contained in:
parent
779a09c609
commit
38a0b63c61
1 changed files with 3 additions and 0 deletions
|
@ -193,6 +193,9 @@ def custom_json(obj: Any) -> str:
|
|||
if np.isscalar(obj):
|
||||
return str(obj)
|
||||
|
||||
if hasattr(obj, "__bfkey__"):
|
||||
return f"<{type(obj)} ({obj.__bfkey__()})>"
|
||||
|
||||
return f"<{type(obj)} (not-hashed)>"
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue