Skip to content

Commit

Permalink
examples: use dictionary comprehension
Browse files Browse the repository at this point in the history
  • Loading branch information
ofmla committed Aug 3, 2022
1 parent cf27ab3 commit bfe49d0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions examples/seismic/tti/tti_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ def run(shape=(50, 50, 50), spacing=(20.0, 20.0, 20.0), tn=250.0,
theta=theta, phi=phi)
# With new physical parameters as Constants
d = {'vp': vp, 'epsilon': epsilon, 'delta': delta, 'theta': theta, 'phi': phi}
for k, v in d.items():
d[k] = Constant(name=k, value=v, dtype=np.float32)
d = {k: Constant(name=k, value=v, dtype=np.float32) for k, v in d.items()}
solver.forward(save=save, **d)

if not full_run:
Expand Down

0 comments on commit bfe49d0

Please sign in to comment.