Skip to content
6 changes: 3 additions & 3 deletions lib/iris/analysis/_grid_angles.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def _angle(p, q, r):
if old_style:
mid_lons = np.deg2rad(q[0])

pr = _3d_xyz_from_latlon(r[0], r[1]) - _3d_xyz_from_latlon(p[0], p[1])
pr = _3d_xyz_from_latlon(r[0], r[1]) - _3d_xyz_from_latlon(p[0], p[1])
pr_norm = np.sqrt(np.sum(pr**2, axis=0))
pr_top = pr[1] * np.cos(mid_lons) - pr[0] * np.sin(mid_lons)

Expand Down Expand Up @@ -124,7 +124,7 @@ def _angle(p, q, r):
lmb_hatvec_y,
lmb_hatvec_z)])

pr = _3d_xyz_from_latlon(r[0], r[1]) - _3d_xyz_from_latlon(p[0], p[1])
pr = _3d_xyz_from_latlon(r[0], r[1]) - _3d_xyz_from_latlon(p[0], p[1])

# Dot products to form true-northward / true-eastward projections.
pr_cmpt_e = np.sum(pr * lmb_hatvec, axis=0)
Expand All @@ -141,7 +141,7 @@ def _angle(p, q, r):
rtol = 1.e-3
check = np.allclose(mag_rot, mag_orig, rtol=rtol)
if not check:
print (mag_rot, mag_orig)
print(mag_rot, mag_orig)
assert np.allclose(mag_rot, mag_orig, rtol=rtol)

return psi
Expand Down
2 changes: 1 addition & 1 deletion lib/iris/coords.py
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ def is_contiguous(self, rtol=1e-05, atol=1e-08):
rtol=rtol, atol=atol)
elif self.ndim == 2:
contiguous, _, _ = _discontiguity_in_2d_bounds(self.bounds,
abs_tol=atol)
abs_tol=atol)
else:
contiguous = False
return contiguous
Expand Down
2 changes: 1 addition & 1 deletion lib/iris/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ def _draw_2d_from_bounds(draw_method_name, cube, *args, **kwargs):
plot_defn = _get_plot_defn(cube, mode, ndims=2)

twodim_contig_atol = kwargs.pop('two_dim_coord_contiguity_atol',
1e-4)
1e-4)
for coord in plot_defn.coords:
if hasattr(coord, 'has_bounds'):
if coord.ndim == 2 and coord.has_bounds():
Expand Down
3 changes: 2 additions & 1 deletion lib/iris/tests/stock.py → lib/iris/tests/stock/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
from iris.coords import DimCoord, AuxCoord
import iris.tests as tests
from iris.coord_systems import GeogCS, RotatedGeogCS

from ._stock_2d_latlons import (sample_2d_latlons,
make_bounds_discontiguous_at_point)

def lat_lon_cube():
"""
Expand Down
Loading