patnr / HistoryMatching

Notebooks on production optimisation and history matching
MIT License
22 stars 13 forks source link

Call fields with correct args in main #5

Closed dafeda closed 3 years ago

dafeda commented 3 years ago

simulator.plotting.fields is called with wrong arguments in main of geostat.py and throws the following error:

Traceback (most recent call last):
  File "/Users/fedacuric/Dropbox/HistoryMatching/tools/geostat.py", line 90, in <module>
    plots.fields(plots.field, fields)
  File "/Users/fedacuric/Dropbox/HistoryMatching/simulator/plotting.py", line 156, in fields
    title = dash("Fields", kw("title"), title)
  File "/Users/fedacuric/Dropbox/HistoryMatching/simulator/plotting.py", line 153, in <lambda>
    kw = lambda k: pop_style_with_fallback(k, style, kwargs)
  File "/Users/fedacuric/Dropbox/HistoryMatching/simulator/plotting.py", line 73, in pop_style_with_fallback
    x = styles[style or "default"].get(key, x)
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

Running python -i tools/geostat.py works after fix and produces two figures.

patnr commented 3 years ago

Thanks!