Skip to content

Commit

Permalink
Merge pull request pygridgen#55 from kthyng/patch-1
Browse files Browse the repository at this point in the history
Small tweak
  • Loading branch information
phobson authored Sep 30, 2020
2 parents 6dd1fd3 + ca0d3ac commit bacbd39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pygridgen/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -1014,8 +1014,8 @@ def from_spec(cls, attributes):
def rho_to_vert(xr, yr, pm, pn, ang): # pragma: no cover
""" Possibly converts centroids to nodes """
Mp, Lp = xr.shape
x = empty((Mp + 1, Lp + 1), dtype='d')
y = empty((Mp + 1, Lp + 1), dtype='d')
x = numpy.empty((Mp + 1, Lp + 1), dtype='d')
y = numpy.empty((Mp + 1, Lp + 1), dtype='d')
x[1:-1, 1:-1] = 0.25 * (xr[1:, 1:] + xr[1:, :-1] + xr[:-1, 1:] + xr[:-1, :-1])
y[1:-1, 1:-1] = 0.25 * (yr[1:, 1:] + yr[1:, :-1] + yr[:-1, 1:] + yr[:-1, :-1])

Expand Down

0 comments on commit bacbd39

Please sign in to comment.