Open NixonZ opened 2 years ago
When >100 data points are used, the variable df_x is a dictionary with 2 keys, df_x['x'] and df_x['probs'] https://github.com/tjefferies/pymetalog/blob/0cd332b132eb3c9117a827088f7082e346cb77d8/pymetalog/support.py#L52-L55
df_x
df_x['x']
df_x['probs']
Whereas, when using direct cdf data (with 'probs' argument) or using <100 data points, it is a pandas data frame, https://github.com/tjefferies/pymetalog/blob/0cd332b132eb3c9117a827088f7082e346cb77d8/pymetalog/metalog.py#L216-L222
'probs'
https://github.com/tjefferies/pymetalog/blob/0cd332b132eb3c9117a827088f7082e346cb77d8/pymetalog/support.py#L26-L31
Changing #L 52 from, https://github.com/tjefferies/pymetalog/blob/0cd332b132eb3c9117a827088f7082e346cb77d8/pymetalog/support.py#L52 to df_x = pd.Dataframe()
df_x = pd.Dataframe()
should solve the error.
This works, but now data with 99 samples results in a completely different plot than data with 101 samples. There's something else that isn't right.
When >100 data points are used, the variable
df_x
is a dictionary with 2 keys,df_x['x']
anddf_x['probs']
https://github.com/tjefferies/pymetalog/blob/0cd332b132eb3c9117a827088f7082e346cb77d8/pymetalog/support.py#L52-L55Whereas, when using direct cdf data (with
'probs'
argument) or using <100 data points, it is a pandas data frame, https://github.com/tjefferies/pymetalog/blob/0cd332b132eb3c9117a827088f7082e346cb77d8/pymetalog/metalog.py#L216-L222https://github.com/tjefferies/pymetalog/blob/0cd332b132eb3c9117a827088f7082e346cb77d8/pymetalog/support.py#L26-L31
Changing #L 52 from, https://github.com/tjefferies/pymetalog/blob/0cd332b132eb3c9117a827088f7082e346cb77d8/pymetalog/support.py#L52 to
df_x = pd.Dataframe()
should solve the error.