Skip to content

Instantly share code, notes, and snippets.

View prisae's full-sized avatar
🐧

Dieter Werthmüller prisae

🐧
View GitHub Profile
@prisae
prisae / emg3d_ff_update_to_v1.py
Last active April 12, 2021 19:00
Update older emg3d file formats to v1.
import copy
import emg3d
def get_model(inp, grid):
"""Model needs new a grid instead of vnC."""
inp = {k: v for k, v in inp.items() if k != 'vnC'}
inp['grid'] = grid if isinstance(grid, dict) else grid.to_dict()
return emg3d.Model.from_dict(inp)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.