File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -286,13 +286,9 @@ def _get_measurements(
286286 for col in [petab .OBSERVABLE_PARAMETERS , petab .NOISE_PARAMETERS ]:
287287 n_pars [col ] = 0
288288 if col in self ._petab_problem .measurement_df :
289- if np . issubdtype (
290- self ._petab_problem .measurement_df [col ].dtype , np . number
289+ if pd . api . types . is_string_dtype (
290+ self ._petab_problem .measurement_df [col ].dtype
291291 ):
292- n_pars [col ] = 1 - int (
293- self ._petab_problem .measurement_df [col ].isna ().all ()
294- )
295- else :
296292 n_pars [col ] = (
297293 self ._petab_problem .measurement_df [col ]
298294 .str .split (petab .C .PARAMETER_SEPARATOR )
@@ -303,6 +299,10 @@ def _get_measurements(
303299 )
304300 .max ()
305301 )
302+ else :
303+ n_pars [col ] = 1 - int (
304+ self ._petab_problem .measurement_df [col ].isna ().all ()
305+ )
306306
307307 for _ , simulation_condition in simulation_conditions .iterrows ():
308308 query = " & " .join (
You can’t perform that action at this time.
0 commit comments