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 trying to filter data by limiting to properties where an associated standard deviation is present (which is a separate column in the pandas dataframe) I get the following error:
TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
Not really sure what this means, but it is an issue worth looking into (I think) for the purposes of the OpenFF project.
The text was updated successfully, but these errors were encountered:
It likely means you're calling numpy.isnan() on a column that contains string values, rather than numerical values. See example below:
import pandas as pd
import numpy as np
x = pd.DataFrame([dict(A=1, B=2), dict(A="3", B=4)])
np.isnan(x.A)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-5-62fa1d22f6fa> in <module>()
----> 1 np.isnan(x.A)
TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
np.isnan(x.B)
Out[6]:
0 False
1 False
Name: B, dtype: bool
That was indeed the case Kyle. It's odd, but some of the columns with no values fill as the string 'nan' rather than the actual data type 'NaN'. Thanks for the input!
When trying to filter data by limiting to properties where an associated standard deviation is present (which is a separate column in the pandas dataframe) I get the following error:
TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
Not really sure what this means, but it is an issue worth looking into (I think) for the purposes of the OpenFF project.
The text was updated successfully, but these errors were encountered: