Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benchmarks/benchmarks/experimental/ugrid/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def time_create(self, *params):

class Connectivity(UGridCommon):
def setup(self, n_faces):
self.array = np.zeros([n_faces, 3], dtype=np.int)
self.array = np.zeros([n_faces, 3], dtype=int)
super().setup(n_faces)

def create(self):
Expand Down
6 changes: 3 additions & 3 deletions docs/src/further_topics/metadata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,10 @@ instances. Normally, this would cause issues. For example,

.. doctest:: richer-metadata

>>> simply = {"one": np.int(1), "two": np.array([1.0, 2.0])}
>>> simply = {"one": np.int32(1), "two": np.array([1.0, 2.0])}
>>> simply
{'one': 1, 'two': array([1., 2.])}
>>> fruity = {"one": np.int(1), "two": np.array([1.0, 2.0])}
>>> fruity = {"one": np.int32(1), "two": np.array([1.0, 2.0])}
>>> fruity
{'one': 1, 'two': array([1., 2.])}
>>> simply == fruity
Expand All @@ -419,7 +419,7 @@ However, metadata class equality is rich enough to handle this eventuality,

>>> metadata1
CubeMetadata(standard_name='air_temperature', long_name=None, var_name='air_temperature', units=Unit('K'), attributes={'one': 1, 'two': array([1., 2.])}, cell_methods=(CellMethod(method='mean', coord_names=('time',), intervals=('6 hour',), comments=()),))
>>> metadata2 = cube.metadata._replace(attributes={"one": np.int(1), "two": np.array([1000.0, 2000.0])})
>>> metadata2 = cube.metadata._replace(attributes={"one": np.int32(1), "two": np.array([1000.0, 2000.0])})
>>> metadata2
CubeMetadata(standard_name='air_temperature', long_name=None, var_name='air_temperature', units=Unit('K'), attributes={'one': 1, 'two': array([1000., 2000.])}, cell_methods=(CellMethod(method='mean', coord_names=('time',), intervals=('6 hour',), comments=()),))
>>> metadata1 == metadata2
Expand Down
9 changes: 8 additions & 1 deletion lib/iris/tests/integration/plot/test_plot_2d_coords.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,17 @@ def simple_cube_w_2d_coords():
class Test(tests.GraphicsTest):
def test_2d_coord_bounds_platecarree(self):
# To avoid a problem with Cartopy smearing the data where the
# longitude wraps, we set the central_longitude
# longitude wraps, we set the central_longitude.
# SciTools/cartopy#1421
cube = simple_cube_w_2d_coords()[0, 0]
ax = plt.axes(projection=ccrs.PlateCarree(central_longitude=180))
qplt.pcolormesh(cube)

# Cartopy can't reliably set y-limits with curvilinear plotting.
# SciTools/cartopy#2121
y_lims = [m(cube.coord("latitude").points) for m in (np.min, np.max)]
ax.set_ylim(*y_lims)

ax.coastlines(resolution="110m", color="red")
self.check_graphic()

Expand Down
2 changes: 1 addition & 1 deletion lib/iris/tests/unit/analysis/maths/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def test_partial_mask_second_lazy_not_in_place(self):

def test_in_place_introduces_mask(self):
# If second cube is masked, result should also be masked.
data1 = np.arange(4, dtype=np.float)
data1 = np.arange(4, dtype=float)
data2 = ma.array([2.0, 2.0, 2.0, 2.0], mask=[1, 1, 0, 0])
cube1 = Cube(data1)
cube2 = Cube(data2)
Expand Down
107 changes: 56 additions & 51 deletions requirements/ci/nox.lock/py310-linux-64.lock

Large diffs are not rendered by default.

107 changes: 56 additions & 51 deletions requirements/ci/nox.lock/py38-linux-64.lock

Large diffs are not rendered by default.

107 changes: 56 additions & 51 deletions requirements/ci/nox.lock/py39-linux-64.lock

Large diffs are not rendered by default.