mirror of
https://github.com/vale981/hopsflow
synced 2025-03-05 16:51:39 -05:00
use type hints for single dispatch
This commit is contained in:
parent
9f686f7585
commit
79e18a01c1
1 changed files with 1 additions and 1 deletions
|
@ -292,7 +292,7 @@ def custom_json(obj: Any) -> str:
|
||||||
return f"<{type(obj)} (not-hashed)>"
|
return f"<{type(obj)} (not-hashed)>"
|
||||||
|
|
||||||
|
|
||||||
@custom_json.register(np.ndarray)
|
@custom_json
|
||||||
def _(arr: np.ndarray) -> str:
|
def _(arr: np.ndarray) -> str:
|
||||||
return np.array2string(arr, threshold=sys.maxsize)
|
return np.array2string(arr, threshold=sys.maxsize)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue