Skip to content

Commit

Permalink
No public description
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 655904046
  • Loading branch information
hawkinsp authored and copybara-github committed Jul 25, 2024
1 parent 0cb1825 commit c4bcd66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vmoe/checkpoints/serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def _msgpack_ext_pack(x):
return msgpack.ExtType(_MsgpackExtType.index_info, _index_info_to_bytes(x))
if isinstance(x, (np.ndarray, jax.Array)):
return msgpack.ExtType(_MsgpackExtType.ndarray, _ndarray_to_bytes(x))
if np.issctype(type(x)):
if isinstance(x, np.generic):
return msgpack.ExtType(_MsgpackExtType.npscalar,
_ndarray_to_bytes(np.asarray(x)))
return x
Expand Down

0 comments on commit c4bcd66

Please sign in to comment.