Skip to content

Commit

Permalink
builtins: remove small clutter
Browse files Browse the repository at this point in the history
  • Loading branch information
mloubout committed Sep 12, 2024
1 parent 20313d8 commit 7c7994c
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions devito/builtins/initializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,7 @@ def define(self, dimensions):
def create_gaussian_weights(sigma, lw):
weights = [w/w.sum() for w in (np.exp(-0.5/s**2*(np.linspace(-l, l, 2*l+1))**2)
for s, l in zip(sigma, lw))]
processed = []
for (w, l) in zip(weights, lw):
temp = list(w)
while len(temp) < 2*l+1:
temp.insert(0, 0)
temp.append(0)
processed.append(np.array(temp))
return as_tuple(processed)
return as_tuple(np.array(w) for w in weights)

def fset(f, g):
indices = [slice(l, -l, 1) for _, l in zip(g.dimensions, lw)]
Expand Down

0 comments on commit 7c7994c

Please sign in to comment.