pypest / pyemu

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

error from pyemu.en.ParameterEnsemble.from_mixed_draws #418

Closed RyanConway91 closed 1 year ago

RyanConway91 commented 1 year ago

I am getting

Cell In[3], line 1
    dists = pyemu.en.ParameterEnsemble.from_mixed_draws(pst, how_dict, default='gaussian',

  File ~\AppData\Local\miniforge3\envs\gwmodel_2023\Lib\site-packages\pyemu\en.py:1229 in from_mixed_draws
    df.loc[pe.index, pe.columns] = pe

  File ~\AppData\Local\miniforge3\envs\gwmodel_2023\Lib\site-packages\pandas\core\indexing.py:818 in __setitem__
    iloc._setitem_with_indexer(indexer, value, self.name)

  File ~\AppData\Local\miniforge3\envs\gwmodel_2023\Lib\site-packages\pandas\core\indexing.py:1795 in _setitem_with_indexer
    self._setitem_with_indexer_split_path(indexer, value, name)

  File ~\AppData\Local\miniforge3\envs\gwmodel_2023\Lib\site-packages\pandas\core\indexing.py:1831 in _setitem_with_indexer_split_path
    self._setitem_with_indexer_frame_value(indexer, value, name)

  File ~\AppData\Local\miniforge3\envs\gwmodel_2023\Lib\site-packages\pandas\core\indexing.py:1947 in _setitem_with_indexer_frame_value
    if item in value:

TypeError: argument of type 'ParameterEnsemble' is not iterable

with:

dists = pyemu.en.ParameterEnsemble.from_mixed_draws(pst, how_dict, default='gaussian', 
   num_reals=1000, cov=None, sigma_range=4, enforce_bounds=True, partial=False, fill=True)

how_dict does not include all the parameters (there are fixes and ties I want to enforce), but I don't think thats the issues

jtwhite79 commented 1 year ago

Hey Ryan - I can't reproduce this with the testing files that we use. Can you post the .pst file?

RyanConway91 commented 1 year ago

pst file below. Thanks! pcf

++panther_agent_freeze_on_fail(False)

jtwhite79 commented 1 year ago

@RyanConway91 this should be fixed on develop - let us know if not...