From 6a38241946b3df70d3f9ea42dc341902e89ea0dc Mon Sep 17 00:00:00 2001 From: Garrett Smith Date: Sun, 18 Aug 2019 10:21:40 -0500 Subject: [PATCH] Fix spelling of numeric type test --- tensorboardX/summary.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tensorboardX/summary.py b/tensorboardX/summary.py index e4dedbc2..7904d0db 100644 --- a/tensorboardX/summary.py +++ b/tensorboardX/summary.py @@ -103,8 +103,8 @@ def hparams(hparam_dict=None, metric_dict=None): ssi.hparams[k].bool_value = v continue - if not isinstance(v, int) or not isinstance(v, float): - v = make_np(v)[0] + if isinstance(v, (int, float)): + v = make_np(v)[0] ssi.hparams[k].number_value = v content = HParamsPluginData(session_start_info=ssi, version=PLUGIN_DATA_VERSION)