File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -167,15 +167,18 @@ def binstats(
167167 )
168168 aliasdict .merge (kwargs )
169169 if statistic == "quantile" :
170- if isinstance (quantile_value , (int , float )):
171- if 0 <= quantile_value <= 100 :
172- aliasdict ["C" ] += f"{ quantile_value } "
173- else :
174- msg = "quantile_value must be a value between 0 and 100."
175- raise GMTInvalidInput (msg )
176- else :
177- msg = "quantile_value must be an 'int' or 'float'."
178- raise GMTInvalidInput (msg )
170+ if not isinstance (quantile_value , (int , float )):
171+ raise GMTTypeError (
172+ quantile_value ,
173+ reason = "quantile_value must be an 'int' or 'float'."
174+ )
175+ if not (0 <= quantile_value <= 100 ):
176+ raise GMTValueError (
177+ quantile_value ,
178+ description = "quantile_value" ,
179+ reason = "Must be a value between 0 and 100."
180+ )
181+ aliasdict ["C" ] += f"{ quantile_value } "
179182
180183 with Session () as lib :
181184 with (
You can’t perform that action at this time.
0 commit comments