Skip to content

Commit

Permalink
Add cache support for single numpy dtype like np.int32 (#4667)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro authored Apr 19, 2023
1 parent 2ded375 commit f737839
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion panel/io/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ def _io_hash(obj):
"numpy.ufunc" : lambda obj: obj.__name__.encode(),
# Functions
inspect.isbuiltin : lambda obj: obj.__name__.encode(),
inspect.ismodule : lambda obj: obj.__name__
inspect.ismodule : lambda obj: obj.__name__,
lambda x: hasattr(x, "tobytes") and x.shape == (): lambda x: x.tobytes(), # Single numpy dtype like: np.int32
}

for name in _FFI_TYPE_NAMES:
Expand Down

0 comments on commit f737839

Please sign in to comment.