From 19aaa1711b4a59adf525ea4a9548c67a3204ab21 Mon Sep 17 00:00:00 2001
From: David Akim <djakm100@gmail.com>
Date: Sat, 29 Jul 2023 11:06:24 +0000
Subject: [PATCH] Update file 2_norm_consts.ipynb

---
 2_norm_consts.ipynb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/2_norm_consts.ipynb b/2_norm_consts.ipynb
index 2fb0549..a689ae0 100644
--- a/2_norm_consts.ipynb
+++ b/2_norm_consts.ipynb
@@ -47,6 +47,7 @@
     "    y,m,d=f.split('_')\n",
     "    if int(y) in train and int(m) in months:\n",
     "      t_array = np.load(DATADIR+var+'/'+f)\n",
+    "      t_array[np.isnan(t_array)] = 0\n",
     "      tmp += list(t_array.flatten())\n",
     "  mean, std = np.mean(tmp), np.std(tmp)\n",
     "  print(f'Mean {mean}, std {std}')\n",
@@ -67,7 +68,8 @@
     "  for f in tqdm(files):\n",
     "    y,m,d=f.split('_')\n",
     "    if int(y) in train and int(m) in months:\n",
-    "      t_array = np.load(FIREDATADIR+var+'/'+f)      \n",
+    "      t_array = np.load(FIREDATADIR+var+'/'+f)\n",
+    "      t_array[np.isnan(t_array)] = 0      \n",
     "      tmp += list(t_array.flatten())\n",
     "  mean, std = np.mean(tmp), np.std(tmp)\n",
     "  print(f'Mean {mean}, std {std}')\n",
-- 
GitLab