You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried running the code on MIMIC-IV and the preprocessing code gave me the following error:
File "Wild-Time/wildtime/data/mimic.py", line 272, in preprocess_MIMIC
temp_datasets[eachyear]['code'] = np.array(temp_datasets[eachyear]['code'])
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (76175, 2) + inhomogeneous part.
Could you double check this issue? Thanks in advance!
-K
The text was updated successfully, but these errors were encountered:
Hi, got the same issue.
I changed "temp_datasets[eachyear]['code'] = np.array(temp_datasets[eachyear]['code'])" to "temp_datasets[eachyear]['code'] =np.asarray(temp_datasets[eachyear]['code'],dtype="object")" and it worked for me.
Hope it helps :)
Thanks. I actually figured out a simpler solution but forgot to update the issue. Downgrading numpy to v1.19.5 (just like in the requirements.txt file) solved the problem. 🥲
The suggestion by @ZinebAg to change the line to temp_datasets[eachyear]['code'] =np.asarray(temp_datasets[eachyear]['code'],dtype="object") worked for me as well.
I tried running the code on MIMIC-IV and the preprocessing code gave me the following error:
Could you double check this issue? Thanks in advance!
-K
The text was updated successfully, but these errors were encountered: