-
Notifications
You must be signed in to change notification settings - Fork 4
if-statement in build_empty_mw_link_record_array() might cause silent error #6
Copy link
Copy link
Open
Labels
Description
There is a if-statement in the following lines of code which seems unnecessary and which might cause a silent error (in line 294) when a oid_dict key is TX_level or RX_level.
Lines 286 to 296 in 1714b8c
| for oid_name in oid_dict: | |
| if (oid_name != 'RX_level' and oid_name != 'TX_level'): | |
| dtype_list.append((oid_name, np.float64)) | |
| mw_link_record = np.empty((1, ), dtype=dtype_list) | |
| # Set all numeric entries to NaN | |
| mw_link_record['RTT'] = np.NaN | |
| for oid in oid_dict: | |
| mw_link_record[oid] = np.NaN | |
| return mw_link_record | |
Provided that this if-statement is not required it should be removed.
Reactions are currently unavailable