Skip to content

Commit

Permalink
More nitpicky updates
Browse files Browse the repository at this point in the history
  • Loading branch information
zbruick committed Sep 6, 2019
1 parent f690968 commit e5d9712
Show file tree
Hide file tree
Showing 14 changed files with 132 additions and 131 deletions.
9 changes: 5 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,20 @@

nitpicky = True
nitpick_ignore = [('py:class', 'M'), ('py:class', 'N'), ('py:class', 'optional'),
('py:class', 'array_like'), ('py:class', 'array-like'),
('py:class', 'ndarray'), ('py:class', 'sequence of arrays'),
('py:class', 'array-like'), ('py:obj', 'pyproj'),
('py:class', 'sequence of arrays'), ('py:obj', 'pyproj.Geod'),
('py:class', 'sequence of floats'), ('py:class', 'sequence'),
('py:class', 'array-like of strings'), ('py:class', 'K'), ('py:class', '2'),
('py:class', 'P'), ('py:class', 'D'), ('py:class', 'file-like object'),
('py:class', 'compatible'), ('py:class', 'callable'),
('py:data', 'wx_symbol_font'), ('py:class', 'default: None'),
('py:class', 'default: All'), ('py:class:', "default: 'change'"),
('py:class', 'default: All'), ('py:class:', 'default: change'),
('py:class', 'array_like of strings'), ('py:class', 'pint.Unit'),
('py:mod', 'metpy.plots.wx_symbols'), ('py:class', 'Datetime instance'),
('py:class', 'namedtuple'), ('py:class', 'list of tuples'),
('py:class', 'Mapper'), ('py:class', 'All'), ('py:class', 'points'),
('py:obj', '__all__'), ('py:class', 'sequence of ints')]
('py:obj', '__all__'), ('py:class', 'sequence of ints'),
('py:obj', 'cartopy.crs')]

# Tweak how docs are formatted
napoleon_use_rtype = False
Expand Down
4 changes: 2 additions & 2 deletions metpy/calc/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ def coriolis_parameter(latitude):
Parameters
----------
latitude : array_like
latitude : array-like
Latitude at each point
Returns
Expand Down Expand Up @@ -666,7 +666,7 @@ def sigma_to_pressure(sigma, psfc, ptop):
Parameters
----------
sigma : ndarray
sigma : numpy.ndarray
The sigma levels to be converted to pressure levels.
psfc : `pint.Quantity`
Expand Down
18 changes: 9 additions & 9 deletions metpy/calc/kinematics.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,14 +298,14 @@ def advection(scalar, wind, deltas):
Parameters
----------
scalar : ndarray
scalar : numpy.ndarray
Array (with N-dimensions) with the quantity to be advected.
wind : sequence of arrays
Length M sequence of N-dimensional arrays. Represents the flow,
with a component of the wind in each dimension. For example, for
horizontal advection, this could be a list: [u, v], where u and v
are each a 2-dimensional array.
deltas : sequence of floats or ndarray
deltas : sequence of floats or numpy.ndarray
A (length M) sequence containing the grid spacing(s) in each dimension. If using
arrays, in each array there should be one item less than the size of `scalar` along the
applicable axis.
Expand Down Expand Up @@ -418,7 +418,7 @@ def geostrophic_wind(heights, f, dx, dy):
heights : (M, N) `pint.Quantity`
The height field, with either leading dimensions of (x, y) or trailing dimensions
of (y, x), depending on the value of ``dim_order``.
f : array_like
f : array-like
The coriolis parameter. This can be a scalar to be applied
everywhere or an array of values.
dx : `pint.Quantity`
Expand Down Expand Up @@ -456,9 +456,9 @@ def ageostrophic_wind(heights, f, dx, dy, u, v, dim_order='yx'):
Parameters
----------
heights : (M, N) ndarray
heights : (M, N) numpy.ndarray
The height or geopotential field.
f : array_like
f : array-like
The coriolis parameter. This can be a scalar to be applied
everywhere or an array of values.
dx : `pint.Quantity`
Expand Down Expand Up @@ -616,7 +616,7 @@ def absolute_vorticity(u, v, dx, dy, lats, dim_order='yx'):
dy : `pint.Quantity`
The grid spacing(s) in the y-direction. If an array, there should be one item less than
the size of `u` along the applicable axis.
lats : (M, N) ndarray
lats : (M, N) numpy.ndarray
latitudes of the wind data in radians or with appropriate unit information attached
Returns
Expand Down Expand Up @@ -664,7 +664,7 @@ def potential_vorticity_baroclinic(potential_temperature, pressure, u, v, dx, dy
dy : `pint.Quantity`
The grid spacing(s) in the y-direction. If an array, there should be one item less than
the size of `u` along the applicable axis.
lats : (M, N) ndarray
lats : (M, N) numpy.ndarray
latitudes of the wind data in radians or with appropriate unit information attached
Returns
Expand Down Expand Up @@ -737,7 +737,7 @@ def potential_vorticity_barotropic(heights, u, v, dx, dy, lats, dim_order='yx'):
dy : `pint.Quantity`
The grid spacing(s) in the y-direction. If an array, there should be one item less than
the size of `u` along the applicable axis.
lats : (M, N) ndarray
lats : (M, N) numpy.ndarray
latitudes of the wind data in radians or with appropriate unit information attached
Returns
Expand Down Expand Up @@ -791,7 +791,7 @@ def inertial_advective_wind(u, v, u_geostrophic, v_geostrophic, dx, dy, lats):
dy : `pint.Quantity`
The grid spacing(s) in the y-direction. If an array, there should be one item less than
the size of `u` along the applicable axis.
lats : (M, N) ndarray
lats : (M, N) numpy.ndarray
latitudes of the wind data in radians or with appropriate unit information attached
Returns
Expand Down
10 changes: 5 additions & 5 deletions metpy/calc/thermo.py
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@ def mixing_ratio_from_relative_humidity(relative_humidity, temperature, pressure
Parameters
----------
relative_humidity: array_like
relative_humidity: array-like
The relative humidity expressed as a unitless ratio in the range [0, 1]. Can also pass
a percentage if proper units are attached.
temperature: `pint.Quantity`
Expand Down Expand Up @@ -1559,13 +1559,13 @@ def isentropic_interpolation(theta_levels, pressure, temperature, *args, **kwarg
Parameters
----------
theta_levels : array_like
theta_levels : array-like
One-dimensional array of desired theta surfaces
pressure : array_like
pressure : array-like
One-dimensional array of pressure levels
temperature : array_like
temperature : array-like
Array of temperature
args : array_like, optional
args : array-like, optional
Any additional variables will be interpolated to each isentropic level.
Returns
Expand Down
6 changes: 3 additions & 3 deletions metpy/calc/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -802,12 +802,12 @@ def lat_lon_grid_deltas(longitude, latitude, **kwargs):
Parameters
----------
longitude : array_like
longitude : array-like
array of longitudes defining the grid
latitude : array_like
latitude : array-like
array of latitudes defining the grid
kwargs
Other keyword arguments to pass to :class:`~pyproj.Geod`
Other keyword arguments to pass to `~pyproj.Geod`
Returns
-------
Expand Down
26 changes: 13 additions & 13 deletions metpy/calc/turbulence.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ def get_perturbation(ts, axis=-1):
Parameters
----------
ts : array_like
ts : array-like
The time series from which you wish to find the perturbation
time series (perturbation from the mean).
Returns
-------
array_like
array-like
The perturbation time series.
Other Parameters
Expand Down Expand Up @@ -56,11 +56,11 @@ def tke(u, v, w, perturbation=False, axis=-1):
Parameters
----------
u : array_like
u : array-like
The wind component along the x-axis
v : array_like
v : array-like
The wind component along the y-axis
w : array_like
w : array-like
The wind component along the z-axis
perturbation : bool, optional
True if the `u`, `v`, and `w` components of wind speed
Expand All @@ -70,7 +70,7 @@ def tke(u, v, w, perturbation=False, axis=-1):
Returns
-------
array_like
array-like
The corresponding turbulence kinetic energy value
Other Parameters
Expand Down Expand Up @@ -122,10 +122,10 @@ def kinematic_flux(vel, b, perturbation=False, axis=-1):
Parameters
----------
vel : array_like
vel : array-like
A component of velocity
b : array_like
b : array-like
May be a component of velocity or a scalar variable (e.g. Temperature)
perturbation : bool, optional
Expand All @@ -134,7 +134,7 @@ def kinematic_flux(vel, b, perturbation=False, axis=-1):
Returns
-------
array_like
array-like
The corresponding kinematic flux
Other Parameters
Expand Down Expand Up @@ -190,11 +190,11 @@ def friction_velocity(u, w, v=None, perturbation=False, axis=-1):
Parameters
----------
u : array_like
u : array-like
The wind component along the x-axis
w : array_like
w : array-like
The wind component along the z-axis
v : array_like, optional
v : array-like, optional
The wind component along the y-axis.
perturbation : bool, optional
Expand All @@ -205,7 +205,7 @@ def friction_velocity(u, w, v=None, perturbation=False, axis=-1):
Returns
-------
array_like
array-like
The corresponding friction velocity
Other Parameters
Expand Down
54 changes: 27 additions & 27 deletions metpy/interpolate/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ def generate_grid(horiz_dim, bbox):
Returns
-------
grid_x: (X, Y) ndarray
grid_x: (X, Y) numpy.ndarray
X dimension meshgrid defined by given bounding box
grid_y: (X, Y) ndarray
grid_y: (X, Y) numpy.ndarray
Y dimension meshgrid defined by given bounding box
"""
Expand All @@ -58,7 +58,7 @@ def generate_grid_coords(gx, gy):
Returns
-------
(X, Y) ndarray
(X, Y) numpy.ndarray
List of coordinates in meshgrid
"""
Expand Down Expand Up @@ -95,9 +95,9 @@ def get_xy_steps(bbox, h_dim):
Returns
-------
x_steps, (X, ) ndarray
x_steps, (X, ) numpy.ndarray
Number of grids in x dimension.
y_steps: (Y, ) ndarray
y_steps: (Y, ) numpy.ndarray
Number of grids in y dimension.
"""
Expand Down Expand Up @@ -143,21 +143,21 @@ def natural_neighbor_to_grid(xp, yp, variable, grid_x, grid_y):
Parameters
----------
xp: (N, ) ndarray
xp: (N, ) numpy.ndarray
x-coordinates of observations
yp: (N, ) ndarray
yp: (N, ) numpy.ndarray
y-coordinates of observations
variable: (N, ) ndarray
variable: (N, ) numpy.ndarray
observation values associated with (xp, yp) pairs.
IE, variable[i] is a unique observation at (xp[i], yp[i])
grid_x: (M, 2) ndarray
grid_x: (M, 2) numpy.ndarray
Meshgrid associated with x dimension
grid_y: (M, 2) ndarray
grid_y: (M, 2) numpy.ndarray
Meshgrid associated with y dimension
Returns
-------
img: (M, N) ndarray
img: (M, N) numpy.ndarray
Interpolated values on a 2-dimensional grid
See Also
Expand Down Expand Up @@ -196,16 +196,16 @@ def inverse_distance_to_grid(xp, yp, variable, grid_x, grid_y, r, gamma=None, ka
Parameters
----------
xp: (N, ) ndarray
xp: (N, ) numpy.ndarray
x-coordinates of observations.
yp: (N, ) ndarray
yp: (N, ) numpy.ndarray
y-coordinates of observations.
variable: (N, ) ndarray
variable: (N, ) numpy.ndarray
observation values associated with (xp, yp) pairs.
IE, variable[i] is a unique observation at (xp[i], yp[i]).
grid_x: (M, 2) ndarray
grid_x: (M, 2) numpy.ndarray
Meshgrid associated with x dimension.
grid_y: (M, 2) ndarray
grid_y: (M, 2) numpy.ndarray
Meshgrid associated with y dimension.
r: float
Radius from grid center, within which observations
Expand All @@ -223,7 +223,7 @@ def inverse_distance_to_grid(xp, yp, variable, grid_x, grid_y, r, gamma=None, ka
Returns
-------
img: (M, N) ndarray
img: (M, N) numpy.ndarray
Interpolated values on a 2-dimensional grid
See Also
Expand Down Expand Up @@ -265,11 +265,11 @@ def interpolate_to_grid(x, y, z, interp_type='linear', hres=50000,
Parameters
----------
x: array_like
x: array-like
x coordinate, can have units of linear distance or degrees
y: array_like
y: array-like
y coordinate, can have units of linear distance or degrees
z: array_like
z: array-like
observation value
interp_type: str
What type of interpolation to use. Available options include:
Expand Down Expand Up @@ -304,11 +304,11 @@ def interpolate_to_grid(x, y, z, interp_type='linear', hres=50000,
Returns
-------
grid_x: (N, 2) ndarray
grid_x: (N, 2) numpy.ndarray
Meshgrid for the resulting interpolation in the x dimension
grid_y: (N, 2) ndarray
Meshgrid for the resulting interpolation in the y dimension ndarray
img: (M, N) ndarray
grid_y: (N, 2) numpy.ndarray
Meshgrid for the resulting interpolation in the y dimension numpy.ndarray
img: (M, N) numpy.ndarray
2-dimensional array representing the interpolated values for each grid.
Notes
Expand Down Expand Up @@ -351,10 +351,10 @@ def interpolate_to_isosurface(level_var, interp_var, level, **kwargs):
Parameters
----------
level_var: array_like (P, M, N)
level_var: array-like (P, M, N)
Level values in 3D grid on common vertical coordinate (e.g., PV values on
isobaric levels). Assumes height dimension is highest to lowest in atmosphere.
interp_var: array_like (P, M, N)
interp_var: array-like (P, M, N)
Variable on 3D grid with same vertical coordinate as level_var to interpolate to
given level (e.g., potential temperature on isobaric levels)
level: int or float
Expand All @@ -368,7 +368,7 @@ def interpolate_to_isosurface(level_var, interp_var, level, **kwargs):
Returns
-------
interp_level: (M, N) ndarray
interp_level: (M, N) numpy.ndarray
The interpolated variable (e.g., potential temperature) on the desired level (e.g.,
2 PVU surface)
Expand Down
Loading

0 comments on commit e5d9712

Please sign in to comment.