Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
for _, row in df_for_time.iterrows():
observable_ix = observable_ids.index(
f'observable_{row.observableId}')
if observable_ix in time_ix_for_obs_ix:
time_ix_for_obs_ix[observable_ix] += 1
else:
time_ix_for_obs_ix[observable_ix] = time_ix_0
time_ix = time_ix_for_obs_ix[observable_ix]
# overrides
observable_overrides = \
petab.core.split_parameter_replacement_list(
row.observableParameters)
noise_overrides = \
petab.core.split_parameter_replacement_list(
row.noiseParameters)
# try to insert if hierarchical parameter
for override in observable_overrides + noise_overrides:
hierarchical_problem.insert_for_id(
override, condition_ix, time_ix, observable_ix)
print([(x.id, x.indices) for x in hierarchical_problem.xs])
time_ix_for_obs_ix = {}
for _, row in df_for_time.iterrows():
observable_ix = observable_ids.index(
f'observable_{row.observableId}')
if observable_ix in time_ix_for_obs_ix:
time_ix_for_obs_ix[observable_ix] += 1
else:
time_ix_for_obs_ix[observable_ix] = time_ix_0
time_ix = time_ix_for_obs_ix[observable_ix]
# overrides
observable_overrides = \
petab.core.split_parameter_replacement_list(
row.observableParameters)
noise_overrides = \
petab.core.split_parameter_replacement_list(
row.noiseParameters)
# try to insert if hierarchical parameter
for override in observable_overrides + noise_overrides:
hierarchical_problem.insert_for_id(
override, condition_ix, time_ix, observable_ix)
print([(x.id, x.indices) for x in hierarchical_problem.xs])