From 896a0035af80ac0df9b295c14f4e483f895a8c2d Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Fri, 30 Jul 2021 15:09:24 -0500 Subject: [PATCH] minor --- modules/icing/pirep_goes.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py index 507e0bb5..406e0317 100644 --- a/modules/icing/pirep_goes.py +++ b/modules/icing/pirep_goes.py @@ -533,13 +533,14 @@ def process(ice_dct, no_ice_dct, neg_ice_dct): ice_keys_2 = np.array(ice_keys_2) ice_tidx_2 = np.array(ice_tidx_2) print('2: ', ice_keys_2.shape[0]) - # np.random.seed(42) - # ridxs = np.random.permutation(np.arange(ice_keys_2.shape[0])) - # ice_keys_2 = ice_keys_2[ridxs] - # ice_tidx_2 = ice_tidx_2[ridxs] - # ice_keys_2 = ice_keys_2[::2] - # ice_tidx_2 = ice_tidx_2[::2] - # print('2: reduced: ', ice_tidx_2.shape) + np.random.seed(42) + ridxs = np.random.permutation(np.arange(ice_keys_2.shape[0])) + ice_keys_2 = ice_keys_2[ridxs] + ice_tidx_2 = ice_tidx_2[ridxs] + num = int(ice_keys_2.shape[0] * 0.7) + ice_keys_2 = ice_keys_2[0:num] + ice_tidx_2 = ice_tidx_2[0:num] + print('2: reduced: ', ice_tidx_2.shape) ice_keys_1 = np.array(ice_keys_1) ice_tidx_1 = np.array(ice_tidx_1) -- GitLab