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
When plotting with display.plot() we have the option to set add_nan=True to disconnect line segments. The disconnecting is done by inserting a np.nan value. For data that is not a float or double the script is throwing "ValueError: cannot convert float NaN to integer" exception. I believe Python is trying to downconvert the inserted value. Since the display object contains the Dataset it can be hard to fix this issue on the user end without changing the Dataset. We need to check the data type of the data before inserting and up convert the numpy array before inserting NaN if necessary. This will preserve the data type of the DataArray in the Dataset.
The text was updated successfully, but these errors were encountered:
When plotting with display.plot() we have the option to set add_nan=True to disconnect line segments. The disconnecting is done by inserting a np.nan value. For data that is not a float or double the script is throwing "ValueError: cannot convert float NaN to integer" exception. I believe Python is trying to downconvert the inserted value. Since the display object contains the Dataset it can be hard to fix this issue on the user end without changing the Dataset. We need to check the data type of the data before inserting and up convert the numpy array before inserting NaN if necessary. This will preserve the data type of the DataArray in the Dataset.
The text was updated successfully, but these errors were encountered: