NREL / disco

DISCO
BSD 3-Clause "New" or "Revised" License
10 stars 6 forks source link

Transformer output JSON files include NaN values #124

Open daniel-thom opened 2 years ago

daniel-thom commented 2 years ago

In the upgrade cost module many transformer values get initialized with np.nan. I don't think this is a good idea because many of these values end up getting serialized to JSON files. I don't think that NaN is valid JSON. I think you should use Python None which will get serialized to null. Alternatively, you could write a custom JSON encoder to translate them for you.