From c4bcd66345bb58b6e30471f11aa0d2c04f03aa43 Mon Sep 17 00:00:00 2001 From: Peter Hawkins Date: Thu, 25 Jul 2024 04:16:04 -0700 Subject: [PATCH] No public description PiperOrigin-RevId: 655904046 --- vmoe/checkpoints/serialization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmoe/checkpoints/serialization.py b/vmoe/checkpoints/serialization.py index f5b6723..96a3218 100644 --- a/vmoe/checkpoints/serialization.py +++ b/vmoe/checkpoints/serialization.py @@ -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