Open thodson-usgs opened 1 year ago
A rating will often be initialized using a dataframe as in many of the examples
powerrating = PowerLawRating(q=df['q'], h=df['stage'], q_sigma=df['q_sigma'], segments=segments, prior={'distribution':'uniform'})
However, q, h, etc. are pd.Series and may not behave the same as when powerrating is initialized with arrays. As part of __init__ these should be coerced to a specific data type so that methods don't have to guess their data type.
q
h
pd.Series
powerrating
__init__
A rating will often be initialized using a dataframe as in many of the examples
However,
q
,h
, etc. arepd.Series
and may not behave the same as whenpowerrating
is initialized with arrays. As part of__init__
these should be coerced to a specific data type so that methods don't have to guess their data type.