Skip to content

Commit

Permalink
Small tweak
Browse files Browse the repository at this point in the history
`empty` comes from numpy
  • Loading branch information
kthyng authored Aug 5, 2020
1 parent 6dd1fd3 commit ca0d3ac
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 ca0d3ac

Please sign in to comment.