pypest / pyemu

python modules for model-independent uncertainty analyses, data-worth analyses, and interfacing with PEST(++)
BSD 3-Clause "New" or "Revised" License
174 stars 95 forks source link

ParameterEnsemble from_mixed_draws throws error when there are fixed params and fill=True #442

Closed hwreeves-USGS closed 1 year ago

hwreeves-USGS commented 1 year ago

I get an error from ParameterEnsemble.from_mixed_draws() when I have fixed parameters in my pst.parameter_data dataframe and fill is set to True.

-> 1229 df.loc[pe.index, pe.columns] = pe

Type Error : argument of type 'ParameterEnsemble' is not iterable

If I set fill=False, then I don't get the error but the fixed parameters are not in the ensemble, I can add them back in so that all the parameters are in the ensemble that I want pestpp-ies to use by making a list of the par names-

for k in list(fixed_dict.keys()): p_ensemble.loc[:,k] = pst.parameter_data.loc[k, 'parval1']

wkitlasten commented 1 year ago

What is df?

1229 df.loc[pe.index, pe.columns] = pe

On Sat, 8 Jul 2023 at 6:10 AM, Howard W. Reeves @.***> wrote:

I get an error from ParameterEnsemble.from_mixed_draws() when I have fixed parameters in my pst.parameter_data dataframe and fill is set to True.

-> 1229 df.loc[pe.index, pe.columns] = pe

Type Error : argument of type 'ParameterEnsemble' is not iterable

If I set fill=False, then I don't get the error but the fixed parameters are not in the ensemble, I can add them back in so that all the parameters are in the ensemble that I want pestpp-ies to use by making a list of the par names-

for k in list(fixed_dict.keys()): p_ensemble.loc[:,k] = pst.parameter_data.loc[k, 'parval1']

— Reply to this email directly, view it on GitHub https://github.com/pypest/pyemu/issues/442, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSJXRG4PVBXS5ZMY7BQ3STXPBGJTANCNFSM6AAAAAA2CD7I3A . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- "Perfect spheres are pointless."

jtwhite79 commented 1 year ago

Hey Howard - I think we have a test covering this condition:

https://github.com/pypest/pyemu/blob/9e0a5c130e8702dcba10fad3fb0236dcc8cd4ee5/autotest/en_tests.py#L699

and I think there were some recent patches for this problem. Are you using the latest develop branch?

briochh commented 1 year ago

Hi @hwreeves-USGS, Have you managed to reproduce this error running the latest develop branch? Closing for now, but reopen is issue is still there...