diff --git a/docs/src/further_topics/metadata.rst b/docs/src/further_topics/metadata.rst index 6d32b10b7a..f66f253a90 100644 --- a/docs/src/further_topics/metadata.rst +++ b/docs/src/further_topics/metadata.rst @@ -403,10 +403,10 @@ instances. Normally, this would cause issues. For example, >>> simply = {"one": np.int32(1), "two": np.array([1.0, 2.0])} >>> simply - {'one': 1, 'two': array([1., 2.])} + {'one': np.int32(1), 'two': array([1., 2.])} >>> fruity = {"one": np.int32(1), "two": np.array([1.0, 2.0])} >>> fruity - {'one': 1, 'two': array([1., 2.])} + {'one': np.int32(1), 'two': array([1., 2.])} >>> simply == fruity Traceback (most recent call last): ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() @@ -418,9 +418,9 @@ However, metadata class equality is rich enough to handle this eventuality, >>> metadata1 = cube.metadata._replace(attributes=simply) >>> metadata2 = cube.metadata._replace(attributes=fruity) >>> 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=()),)) + CubeMetadata(standard_name='air_temperature', long_name=None, var_name='air_temperature', units=Unit('K'), attributes={'one': np.int32(1), 'two': array([1., 2.])}, cell_methods=(CellMethod(method='mean', coord_names=('time',), intervals=('6 hour',), comments=()),)) >>> metadata2 - 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=()),)) + CubeMetadata(standard_name='air_temperature', long_name=None, var_name='air_temperature', units=Unit('K'), attributes={'one': np.int32(1), 'two': array([1., 2.])}, cell_methods=(CellMethod(method='mean', coord_names=('time',), intervals=('6 hour',), comments=()),)) .. doctest:: richer-metadata @@ -430,10 +430,10 @@ However, metadata class equality is rich enough to handle this eventuality, .. doctest:: richer-metadata >>> 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=()),)) + CubeMetadata(standard_name='air_temperature', long_name=None, var_name='air_temperature', units=Unit('K'), attributes={'one': np.int32(1), 'two': array([1., 2.])}, cell_methods=(CellMethod(method='mean', coord_names=('time',), intervals=('6 hour',), comments=()),)) >>> 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=()),)) + CubeMetadata(standard_name='air_temperature', long_name=None, var_name='air_temperature', units=Unit('K'), attributes={'one': np.int32(1), 'two': array([1000., 2000.])}, cell_methods=(CellMethod(method='mean', coord_names=('time',), intervals=('6 hour',), comments=()),)) >>> metadata1 == metadata2 False diff --git a/docs/src/further_topics/ugrid/operations.rst b/docs/src/further_topics/ugrid/operations.rst index 97dfaaa5b1..14e746352f 100644 --- a/docs/src/further_topics/ugrid/operations.rst +++ b/docs/src/further_topics/ugrid/operations.rst @@ -500,7 +500,7 @@ GeoVista :external+geovista:doc:`generated/gallery/index`. Attributes: NCO 'netCDF Operators version 4.7.5 (Homepage = http://nco.sf.net, Code = h ...' history 'Mon Apr 12 01:44:41 2021: ncap2 -s synthetic=float(synthetic) mesh_C4_synthetic.nc ...' - nco_openmp_thread_number 1 + nco_openmp_thread_number np.int32(1) # Convert our mesh+data to a PolyData object. >>> face_polydata = cube_to_polydata(sample_mesh_cube) @@ -600,7 +600,7 @@ below: Attributes: NCO 'netCDF Operators version 4.7.5 (Homepage = http://nco.sf.net, Code = h ...' history 'Mon Apr 12 01:44:41 2021: ncap2 -s synthetic=float(synthetic) mesh_C4_synthetic.nc ...' - nco_openmp_thread_number 1 + nco_openmp_thread_number np.int32(1) >>> regional_cube = extract_unstructured_region( ... cube=sample_mesh_cube, @@ -619,7 +619,7 @@ below: Attributes: NCO 'netCDF Operators version 4.7.5 (Homepage = http://nco.sf.net, Code = h ...' history 'Mon Apr 12 01:44:41 2021: ncap2 -s synthetic=float(synthetic) mesh_C4_synthetic.nc ...' - nco_openmp_thread_number 1 + nco_openmp_thread_number np.int32(1) Regridding diff --git a/docs/src/whatsnew/latest.rst b/docs/src/whatsnew/latest.rst index 58e3f5f956..1ef00079e3 100644 --- a/docs/src/whatsnew/latest.rst +++ b/docs/src/whatsnew/latest.rst @@ -24,7 +24,8 @@ This document explains the changes made to Iris for this release 📢 Announcements ================ -#. N/A +#. Iris is now compliant with NumPy v2. This may affect your scripts. + :ref:`See the full What's New entry for more details `. ✨ Features @@ -92,7 +93,15 @@ This document explains the changes made to Iris for this release 🔗 Dependencies =============== -#. N/A +.. _numpy2: + +#. `@trexfeathers`_ adapted the Iris codebase to work with NumPy v2. The + `NumPy v2 full release notes`_ have the exhaustive details. Notable + changes that may affect your Iris scripts are below. (:pull:`6035`) + + * `NumPy v2 changed data type promotion`_ + + * `NumPy v2 changed scalar printing`_ 📚 Documentation @@ -122,3 +131,6 @@ This document explains the changes made to Iris for this release Whatsnew resources in alphabetical order: .. _cartopy#2390: https://github.com/SciTools/cartopy/issues/2390 +.. _NumPy v2 changed data type promotion: https://numpy.org/doc/stable/numpy_2_0_migration_guide.html#changes-to-numpy-data-type-promotion +.. _NumPy v2 changed scalar printing: https://numpy.org/doc/stable/release/2.0.0-notes.html#representation-of-numpy-scalars-changed +.. _NumPy v2 full release notes: https://numpy.org/doc/stable/release/2.0.0-notes.html diff --git a/lib/iris/_representation/cube_summary.py b/lib/iris/_representation/cube_summary.py index a28bfc549a..20d93f1acf 100644 --- a/lib/iris/_representation/cube_summary.py +++ b/lib/iris/_representation/cube_summary.py @@ -47,6 +47,8 @@ def __init__(self, cube, name_padding=35): def string_repr(text, quote_strings=False, clip_strings=False): """Produce a one-line printable form of a text string.""" + # Convert any np.str_ instances to plain strings. + text = str(text) force_quoted = re.findall("[\n\t]", text) or quote_strings if force_quoted: # Replace the string with its repr (including quotes). diff --git a/lib/iris/analysis/_regrid.py b/lib/iris/analysis/_regrid.py index 431871de2c..0f375e69f4 100644 --- a/lib/iris/analysis/_regrid.py +++ b/lib/iris/analysis/_regrid.py @@ -156,22 +156,30 @@ def _src_align_and_flatten(coord): # # Wrap modular values (e.g. longitudes) if required. - modulus = sx.units.modulus + _modulus = sx.units.modulus + # Convert to NumPy scalar to enable cast checking. + modulus = np.min_scalar_type(_modulus).type(_modulus) + + def _cast_sx_points(sx_points_: np.ndarray): + """Ensure modulus arithmetic will not raise a TypeError.""" + if not np.can_cast(modulus, sx_points_.dtype): + new_type = np.promote_types(sx_points_.dtype, modulus.dtype) + result = sx_points_.astype(new_type, casting="safe") + else: + result = sx_points_ + return result + if modulus is not None: # Match the source cube x coordinate range to the target grid # cube x coordinate range. min_sx, min_tx = np.min(sx.points), np.min(tx.points) if min_sx < 0 and min_tx >= 0: indices = np.where(sx_points < 0) - # Ensure += doesn't raise a TypeError - if not np.can_cast(modulus, sx_points.dtype): - sx_points = sx_points.astype(type(modulus), casting="safe") + sx_points = _cast_sx_points(sx_points) sx_points[indices] += modulus elif min_sx >= 0 and min_tx < 0: indices = np.where(sx_points > (modulus / 2)) - # Ensure -= doesn't raise a TypeError - if not np.can_cast(modulus, sx_points.dtype): - sx_points = sx_points.astype(type(modulus), casting="safe") + sx_points = _cast_sx_points(sx_points) sx_points[indices] -= modulus # Create target grid cube x and y cell boundaries. diff --git a/lib/iris/analysis/maths.py b/lib/iris/analysis/maths.py index bd20b26019..62adf7b638 100644 --- a/lib/iris/analysis/maths.py +++ b/lib/iris/analysis/maths.py @@ -867,7 +867,7 @@ def _binary_op_common( if iris._lazy_data.is_lazy_data(other): rhs = other else: - rhs = np.asanyarray(other) + rhs = np.asanyarray(other, dtype=new_dtype) def unary_func(lhs): data = operation_function(lhs, rhs) diff --git a/lib/iris/common/resolve.py b/lib/iris/common/resolve.py index 87ad05791b..c4bc18309b 100644 --- a/lib/iris/common/resolve.py +++ b/lib/iris/common/resolve.py @@ -2358,16 +2358,16 @@ def cube(self, data, in_place=False): >>> resolver.map_rhs_to_lhs True >>> cube1.data.sum() - 124652160.0 + np.float32(124652160.0) >>> zeros.shape (240, 37, 49) >>> zeros.sum() - 0.0 + np.float32(0.0) >>> result = resolver.cube(zeros, in_place=True) >>> result is cube1 True >>> cube1.data.sum() - 0.0 + np.float32(0.0) """ from iris.cube import Cube diff --git a/lib/iris/coords.py b/lib/iris/coords.py index 8afe9dad41..06a271cbba 100644 --- a/lib/iris/coords.py +++ b/lib/iris/coords.py @@ -2431,9 +2431,9 @@ def nearest_neighbour_index(self, point): >>> cube = iris.load_cube(iris.sample_data_path('ostia_monthly.nc')) >>> cube.coord('latitude').nearest_neighbour_index(0) - 9 + np.int64(9) >>> cube.coord('longitude').nearest_neighbour_index(10) - 12 + np.int64(12) .. note:: If the coordinate contains bounds, these will be used to determine the nearest neighbour instead of the point values. diff --git a/lib/iris/fileformats/_ff.py b/lib/iris/fileformats/_ff.py index 35b4f65bb7..b6b45b8b3c 100644 --- a/lib/iris/fileformats/_ff.py +++ b/lib/iris/fileformats/_ff.py @@ -5,6 +5,7 @@ """Provides UK Met Office Fields File (FF) format specific capabilities.""" import os +from typing import Any import warnings import numpy as np @@ -370,9 +371,22 @@ def __init__(self, filename, word_depth=DEFAULT_FF_WORD_DEPTH): setattr(self, elem, res) def __str__(self): + def _str_tuple(to_print: Any): + """Print NumPy scalars within tuples as numbers, not np objects. + + E.g. ``lookup_table`` is a tuple of NumPy scalars. + NumPy v2 by default prints ``np.int32(1)`` instead of ``1`` when + printing an iterable of scalars. + """ + if isinstance(to_print, tuple): + result = "(" + ", ".join([str(i) for i in to_print]) + ")" + else: + result = str(to_print) + return result + attributes = [] for name, _ in FF_HEADER: - attributes.append(" {}: {}".format(name, getattr(self, name))) + attributes.append(f" {name}: {_str_tuple(getattr(self, name))}") return "FF Header:\n" + "\n".join(attributes) def __repr__(self): diff --git a/lib/iris/fileformats/netcdf/saver.py b/lib/iris/fileformats/netcdf/saver.py index cfc69143ae..8aa551be57 100644 --- a/lib/iris/fileformats/netcdf/saver.py +++ b/lib/iris/fileformats/netcdf/saver.py @@ -1387,9 +1387,13 @@ def _ensure_valid_dtype(self, values, src_name, src_object): val_min, val_max = (values.min(), values.max()) if is_lazy_data(values): val_min, val_max = _co_realise_lazy_arrays([val_min, val_max]) + # NumPy will inherit values.dtype even if the scalar numbers work + # with a smaller type. + min_dtype = np.promote_types( + *[np.min_scalar_type(m) for m in (val_min, val_max)] + ) # Cast to an integer type supported by netCDF3. - can_cast = all([np.can_cast(m, np.int32) for m in (val_min, val_max)]) - if not can_cast: + if not np.can_cast(min_dtype, np.int32): msg = ( "The data type of {} {!r} is not supported by {} and" " its values cannot be safely cast to a supported" diff --git a/lib/iris/fileformats/nimrod_load_rules.py b/lib/iris/fileformats/nimrod_load_rules.py index 2c0b4334db..4b3987003a 100644 --- a/lib/iris/fileformats/nimrod_load_rules.py +++ b/lib/iris/fileformats/nimrod_load_rules.py @@ -126,10 +126,11 @@ def units(cube, field): "n/a": "1", } + dtype_original = cube.dtype field_units = remove_unprintable_chars(field.units) if field_units == "m/2-25k": # Handle strange visibility units - cube.data = (cube.data.astype(np.float32) + 25000.0) * 2 + cube.data = (cube.data + 25000.0) * 2 field_units = "m" if "*" in field_units: # Split into unit string and integer @@ -137,31 +138,29 @@ def units(cube, field): if "^" in unit_list[1]: # Split out magnitude unit_sublist = unit_list[1].split("^") - cube.data = cube.data.astype(np.float32) / float(unit_sublist[0]) ** float( - unit_sublist[1] - ) + cube.data = cube.data / float(unit_sublist[0]) ** float(unit_sublist[1]) else: - cube.data = cube.data.astype(np.float32) / float(unit_list[1]) + cube.data = cube.data / float(unit_list[1]) field_units = unit_list[0] if "ug/m3E1" in field_units: # Split into unit string and integer unit_list = field_units.split("E") - cube.data = cube.data.astype(np.float32) / 10.0 + cube.data = cube.data / 10.0 field_units = unit_list[0] if field_units == "%": # Convert any percentages into fraction field_units = "1" - cube.data = cube.data.astype(np.float32) / 100.0 + cube.data = cube.data / 100.0 if field_units == "oktas": field_units = "1" - cube.data = cube.data.astype(np.float32) / 8.0 + cube.data = cube.data / 8.0 if field_units == "dBZ": # cf_units doesn't recognise decibels (dBZ), but does know BZ field_units = "BZ" - cube.data = cube.data.astype(np.float32) / 10.0 + cube.data = cube.data / 10.0 if field_units == "g/Kg": field_units = "kg/kg" - cube.data = cube.data.astype(np.float32) / 1000.0 + cube.data = cube.data / 1000.0 if not field_units: if field.field_code == 8: # Relative Humidity data are unitless, but not "unknown" @@ -175,6 +174,14 @@ def units(cube, field): # Deal with the case where the units are of the form '/unit' eg # '/second' in the Nimrod file. This converts to the form unit^-1 field_units = field_units[1:] + "^-1" + + if cube.dtype != dtype_original: + # Original development logic: if any arithmetic takes place, ensure + # the data type is float32 (starts as an int). Unknown why. + # Automatic casting is returning inconsistent types when masks are + # involved, so the new logic is to do the casting as the final step. + cube.data = cube.data.astype(np.float32) + try: cube.units = field_units except ValueError: diff --git a/lib/iris/fileformats/pp.py b/lib/iris/fileformats/pp.py index c2660d022c..ce92d4456e 100644 --- a/lib/iris/fileformats/pp.py +++ b/lib/iris/fileformats/pp.py @@ -11,6 +11,7 @@ import os import re import struct +from typing import Any import warnings import cf_units @@ -950,6 +951,21 @@ def t2(self): def __repr__(self): """Return a string representation of the PP field.""" + + def _str_tuple(to_print: Any): + """Print NumPy scalars within tuples as numbers, not np objects. + + E.g. ``lbuser`` is a tuple of NumPy scalars. + + NumPy v2 by default prints ``np.int32(1)`` instead of ``1`` when + printing an iterable of scalars. + """ + if isinstance(to_print, tuple): + result = "(" + ", ".join([str(i) for i in to_print]) + ")" + else: + result = str(to_print) + return result + # Define an ordering on the basic header names attribute_priority_lookup = {name: loc[0] for name, loc in self.HEADER_DEFN} @@ -975,9 +991,8 @@ def __repr__(self): ), ) - return ( - "PP Field" + "".join(["\n %s: %s" % (k, v) for k, v in attributes]) + "\n" - ) + contents = "".join([f"\n {k}: {_str_tuple(v)}" for k, v in attributes]) + return f"PP Field{contents}\n" @property def stash(self): @@ -1178,7 +1193,7 @@ def save(self, file_handle): data.dtype = data.dtype.newbyteorder(">") # Create the arrays which will hold the header information - lb = np.empty(shape=NUM_LONG_HEADERS, dtype=np.dtype(">u%d" % PP_WORD_DEPTH)) + lb = np.empty(shape=NUM_LONG_HEADERS, dtype=np.dtype(">i%d" % PP_WORD_DEPTH)) b = np.empty(shape=NUM_FLOAT_HEADERS, dtype=np.dtype(">f%d" % PP_WORD_DEPTH)) # Fill in the header elements from the PPField diff --git a/lib/iris/pandas.py b/lib/iris/pandas.py index dd0f9fec89..78669eceb3 100644 --- a/lib/iris/pandas.py +++ b/lib/iris/pandas.py @@ -173,7 +173,7 @@ def as_cube( # 1.6 doesn't. Since we don't care about preserving the order we can # just force it back to C-order.) order = "C" if copy else "A" - data = np.array(pandas_array, copy=copy, order=order) + data = np.array(pandas_array.values, copy=copy, order=order) cube = Cube(np.ma.masked_invalid(data, copy=False)) _add_iris_coord(cube, "index", pandas_array.index, 0, calendars.get(0, None)) if pandas_array.ndim == 2: @@ -308,7 +308,7 @@ def as_cubes( Pandas uses ``NaN`` rather than masking data. Converted :class:`~iris.cube.Cube` can be masked in downstream user code : - >>> my_series = Series([300, np.NaN, 302], name="air_temperature") + >>> my_series = Series([300, np.nan, 302], name="air_temperature") >>> converted_cube = as_cubes(my_series)[0] >>> print(converted_cube.data) [300. nan 302.] diff --git a/lib/iris/tests/experimental/regrid/test_regrid_area_weighted_rectilinear_src_and_grid.py b/lib/iris/tests/experimental/regrid/test_regrid_area_weighted_rectilinear_src_and_grid.py index 68fa47f25c..0727b3c36e 100644 --- a/lib/iris/tests/experimental/regrid/test_regrid_area_weighted_rectilinear_src_and_grid.py +++ b/lib/iris/tests/experimental/regrid/test_regrid_area_weighted_rectilinear_src_and_grid.py @@ -319,7 +319,7 @@ def test_regrid_reorder_axis(self): dest = _resampled_grid(self.realistic_cube[0, 0, :3, :2], 3, 3) res = regrid_area_weighted(src, dest) self.assertArrayShapeStats(src, (4, 3, 2), 288.08868, 0.008262919) - self.assertArrayShapeStats(res, (4, 9, 6), 288.08865, 0.00826281) + self.assertArrayShapeStats(res, (4, 9, 6), 288.0886, 0.008271061) # Reshape src so that the coords are ordered [x, z, y], # the mean and std statistics should be the same data = np.moveaxis(src.data.copy(), 2, 0) @@ -329,7 +329,7 @@ def test_regrid_reorder_axis(self): src.add_dim_coord(lon, 0) res = regrid_area_weighted(src, dest) self.assertArrayShapeStats(src, (2, 4, 3), 288.08868, 0.008262919) - self.assertArrayShapeStats(res, (6, 4, 9), 288.08865, 0.00826281) + self.assertArrayShapeStats(res, (6, 4, 9), 288.0886, 0.008271061) # Reshape src so that the coords are ordered [y, x, z], # the mean and std statistics should be the same data = np.moveaxis(src.data.copy(), 2, 0) @@ -340,7 +340,7 @@ def test_regrid_reorder_axis(self): dest = _resampled_grid(self.realistic_cube[0, 0, :3, :2], 3, 3) res = regrid_area_weighted(src, dest) self.assertArrayShapeStats(src, (3, 2, 4), 288.08868, 0.008262919) - self.assertArrayShapeStats(res, (9, 6, 4), 288.08865, 0.00826281) + self.assertArrayShapeStats(res, (9, 6, 4), 288.0886, 0.008271061) def test_regrid_lon_to_half_res(self): src = self.simple_cube diff --git a/lib/iris/tests/integration/fast_load/test_fast_load.py b/lib/iris/tests/integration/fast_load/test_fast_load.py index 41893ac948..239af35925 100644 --- a/lib/iris/tests/integration/fast_load/test_fast_load.py +++ b/lib/iris/tests/integration/fast_load/test_fast_load.py @@ -375,7 +375,7 @@ def callback(cube, collation, filename): # This is actually a NumPy int32, so honour that here. expected[0].attributes["LBVC"] = np.int32(8) else: - expected[0].attributes["A_LBVC"] = [8, 8] + expected[0].attributes["A_LBVC"] = [np.int32(8)] * 2 self.assertEqual(results, expected) diff --git a/lib/iris/tests/results/experimental/regrid/regrid_area_weighted_rectilinear_src_and_grid/const_lat_cross_section.cml b/lib/iris/tests/results/experimental/regrid/regrid_area_weighted_rectilinear_src_and_grid/const_lat_cross_section.cml index a0ed65bd29..9cfffb1342 100644 --- a/lib/iris/tests/results/experimental/regrid/regrid_area_weighted_rectilinear_src_and_grid/const_lat_cross_section.cml +++ b/lib/iris/tests/results/experimental/regrid/regrid_area_weighted_rectilinear_src_and_grid/const_lat_cross_section.cml @@ -6,54 +6,54 @@ - + [408.6315 , 447.17175], + [389.76822, 428.3958 ], + [363.19095, 401.94156]]]" id="9041e969" points="[[372.6527 , 377.71793, 374.74316, ..., + 323.53378, 304.47693, 277.62692], + [388.6133 , 393.66876, 390.69974, ..., + 339.5887 , 320.56845, 293.77 ], + [410.95926, 416.00113, 413.04007, ..., + 362.0666 , 343.0975 , 316.37115], + [439.6917 , 444.7161 , 441.76532, ..., + 390.96838, 372.065 , 345.4312 ], + [474.81216, 479.81528, 476.87698, ..., + 426.2954 , 407.4722 , 380.95132]]" shape="(5, 18)" standard_name="altitude" units="Unit('m')" value_type="float32"> @@ -68,29 +68,28 @@ - + @@ -122,11 +121,11 @@ 0.98717135]" shape="(5,)" units="Unit('1')" value_type="float32"/> - + diff --git a/lib/iris/tests/results/experimental/regrid/regrid_area_weighted_rectilinear_src_and_grid/const_lat_cross_section.data.0.json b/lib/iris/tests/results/experimental/regrid/regrid_area_weighted_rectilinear_src_and_grid/const_lat_cross_section.data.0.json index 0c2b277ef0..138bdc6711 100644 --- a/lib/iris/tests/results/experimental/regrid/regrid_area_weighted_rectilinear_src_and_grid/const_lat_cross_section.data.0.json +++ b/lib/iris/tests/results/experimental/regrid/regrid_area_weighted_rectilinear_src_and_grid/const_lat_cross_section.data.0.json @@ -1 +1 @@ -{"std": 0.04919414967298508, "min": 287.8340148925781, "max": 288.0903625488281, "shape": [5, 18], "masked": false, "mean": 288.0065002441406} \ No newline at end of file +{"std": 0.04917990416288376, "min": 287.8338317871094, "max": 288.0901794433594, "shape": [5, 18], "masked": false, "mean": 288.00640869140625} \ No newline at end of file diff --git a/lib/iris/tests/results/experimental/regrid/regrid_area_weighted_rectilinear_src_and_grid/const_lon_cross_section.cml b/lib/iris/tests/results/experimental/regrid/regrid_area_weighted_rectilinear_src_and_grid/const_lon_cross_section.cml index efe8c37e2c..41cec442aa 100644 --- a/lib/iris/tests/results/experimental/regrid/regrid_area_weighted_rectilinear_src_and_grid/const_lon_cross_section.cml +++ b/lib/iris/tests/results/experimental/regrid/regrid_area_weighted_rectilinear_src_and_grid/const_lon_cross_section.cml @@ -7,58 +7,58 @@ + [473.80203, 512.0405 ]]]" id="9041e969" points="[[389.81168, 380.65045, 338.00278, 295.5282 , + 278.92233, 280.889 , 327.14603, 342.9571 , + 368.6561 , 404.0448 , 416.55072, 389.3731 ], + [405.73932, 396.59567, 354.0299 , 311.6369 , + 295.06293, 297.02582, 343.194 , 358.9747 , + 384.62436, 419.9451 , 432.427 , 405.30157], + [428.03918, 418.92017, 376.4689 , 334.19 , + 317.6606 , 319.61823, 365.66217, 381.40042, + 406.98105, 442.20676, 454.65506, 427.6026 ], + [456.71246, 447.62503, 405.32083, 363.18835, + 346.71622, 348.66705, 394.5515 , 410.23526, + 435.72726, 470.83096, 483.23618, 456.2774 ], + [491.76077, 482.71185, 440.587 , 398.63315, + 382.23087, 384.17343, 429.86337, 445.4806 , + 470.86453, 505.8194 , 518.172 , 491.32755]]" shape="(5, 12)" standard_name="altitude" units="Unit('m')" value_type="float32"> @@ -68,8 +68,8 @@ - + -0.1185 , -0.11700001, -0.1155 , + -0.11400001, -0.11250001, -0.11100001]" shape="(12,)" standard_name="grid_latitude" units="Unit('degrees')" value_type="float32"> @@ -119,9 +119,9 @@ 0.98717135]" shape="(5,)" units="Unit('1')" value_type="float32"/> - + diff --git a/lib/iris/tests/results/experimental/regrid/regrid_area_weighted_rectilinear_src_and_grid/hybridheight.cml b/lib/iris/tests/results/experimental/regrid/regrid_area_weighted_rectilinear_src_and_grid/hybridheight.cml index efe348ffcb..f6bf6f86c2 100644 --- a/lib/iris/tests/results/experimental/regrid/regrid_area_weighted_rectilinear_src_and_grid/hybridheight.cml +++ b/lib/iris/tests/results/experimental/regrid/regrid_area_weighted_rectilinear_src_and_grid/hybridheight.cml @@ -6,327 +6,327 @@ - + [600.6252 , 589.63086, 574.741 , ..., + 351.04297, 348.4652 , 337.71198], + [584.26105, 574.0093 , 563.243 , ..., + 335.1148 , 333.11978, 329.5481 ], + [562.93256, 552.1968 , 545.87976, ..., + 329.34094, 327.58188, 325.25644]]]" shape="(5, 16, 21)" standard_name="altitude" units="Unit('m')" value_type="float32"> @@ -336,58 +336,57 @@ - + -0.1175625 , -0.1164375 , -0.11531251, + -0.11418751, -0.11306251, -0.11193752, + -0.11081252]" shape="(16,)" standard_name="grid_latitude" units="Unit('degrees')" value_type="float32"> - + @@ -419,19 +418,19 @@ 0.98717135]" shape="(5,)" units="Unit('1')" value_type="float32"/> - + [495.3127 , 484.17548, 469.0922 , ..., + 242.48706, 239.87582, 228.98285], + [478.73593, 468.3509 , 457.44473, ..., + 226.35193, 224.33096, 220.71288], + [457.13025, 446.25494, 439.85583, ..., + 220.50302, 218.7211 , 216.36543]]" shape="(16, 21)" standard_name="surface_altitude" units="Unit('m')" value_type="float32"/> diff --git a/lib/iris/tests/results/experimental/regrid/regrid_area_weighted_rectilinear_src_and_grid/hybridheight.data.0.json b/lib/iris/tests/results/experimental/regrid/regrid_area_weighted_rectilinear_src_and_grid/hybridheight.data.0.json index bdc0cad306..31ad377de6 100644 --- a/lib/iris/tests/results/experimental/regrid/regrid_area_weighted_rectilinear_src_and_grid/hybridheight.data.0.json +++ b/lib/iris/tests/results/experimental/regrid/regrid_area_weighted_rectilinear_src_and_grid/hybridheight.data.0.json @@ -1 +1 @@ -{"std": 0.10611984878778458, "min": 287.595703125, "max": 288.1650695800781, "shape": [2, 5, 16, 21], "masked": false, "mean": 287.91802978515625} \ No newline at end of file +{"std": 0.10612151026725769, "min": 287.5958251953125, "max": 288.1652526855469, "shape": [2, 5, 16, 21], "masked": false, "mean": 287.91802978515625} \ No newline at end of file diff --git a/lib/iris/tests/results/integration/netcdf/general/TestPackedData/multi_packed_multi_dtype.cdl b/lib/iris/tests/results/integration/netcdf/general/TestPackedData/multi_packed_multi_dtype.cdl index 37dafe4745..8a8f481492 100644 --- a/lib/iris/tests/results/integration/netcdf/general/TestPackedData/multi_packed_multi_dtype.cdl +++ b/lib/iris/tests/results/integration/netcdf/general/TestPackedData/multi_packed_multi_dtype.cdl @@ -5,8 +5,8 @@ dimensions: time = 360 ; variables: short air_temperature(time, latitude, longitude) ; - air_temperature:scale_factor = 0.0024257504786326 ; - air_temperature:add_offset = 261.648002426021 ; + air_temperature:scale_factor = 0.00242575f ; + air_temperature:add_offset = 261.648f ; air_temperature:standard_name = "air_temperature" ; air_temperature:units = "K" ; air_temperature:um_stash_source = "m01s03i236" ; @@ -53,7 +53,7 @@ variables: precipitation_flux:grid_mapping = "latitude_longitude" ; precipitation_flux:coordinates = "forecast_period forecast_reference_time" ; ushort air_temperature_0(time, latitude, longitude) ; - air_temperature_0:scale_factor = 0.0020141666756075 ; + air_temperature_0:scale_factor = 0.002014167f ; air_temperature_0:add_offset = 176.7872f ; air_temperature_0:standard_name = "air_temperature" ; air_temperature_0:units = "K" ; diff --git a/lib/iris/tests/results/integration/netcdf/general/TestPackedData/multi_packed_single_dtype.cdl b/lib/iris/tests/results/integration/netcdf/general/TestPackedData/multi_packed_single_dtype.cdl index a3c90bf1f8..3f2c909ce8 100644 --- a/lib/iris/tests/results/integration/netcdf/general/TestPackedData/multi_packed_single_dtype.cdl +++ b/lib/iris/tests/results/integration/netcdf/general/TestPackedData/multi_packed_single_dtype.cdl @@ -5,8 +5,8 @@ dimensions: time = 360 ; variables: short air_temperature(time, latitude, longitude) ; - air_temperature:scale_factor = 0.0024257504786326 ; - air_temperature:add_offset = 261.648002426021 ; + air_temperature:scale_factor = 0.00242575f ; + air_temperature:add_offset = 261.648f ; air_temperature:standard_name = "air_temperature" ; air_temperature:units = "K" ; air_temperature:um_stash_source = "m01s03i236" ; @@ -46,8 +46,8 @@ variables: height:standard_name = "height" ; height:positive = "up" ; short precipitation_flux(time, latitude, longitude) ; - precipitation_flux:scale_factor = 2.9897383798121e-08 ; - precipitation_flux:add_offset = 0.000979677472296829 ; + precipitation_flux:scale_factor = 2.989738e-08f ; + precipitation_flux:add_offset = 0.0009796774f ; precipitation_flux:standard_name = "precipitation_flux" ; precipitation_flux:units = "kg m-2 s-1" ; precipitation_flux:um_stash_source = "m01s05i216" ; @@ -55,8 +55,8 @@ variables: precipitation_flux:grid_mapping = "latitude_longitude" ; precipitation_flux:coordinates = "forecast_period forecast_reference_time" ; short air_temperature_0(time, latitude, longitude) ; - air_temperature_0:scale_factor = 0.0020141666756075 ; - air_temperature_0:add_offset = 242.787445071619 ; + air_temperature_0:scale_factor = 0.002014167f ; + air_temperature_0:add_offset = 242.7874f ; air_temperature_0:standard_name = "air_temperature" ; air_temperature_0:units = "K" ; air_temperature_0:um_stash_source = "m01s03i236" ; diff --git a/lib/iris/tests/results/integration/netcdf/general/TestPackedData/single_packed_manual.cdl b/lib/iris/tests/results/integration/netcdf/general/TestPackedData/single_packed_manual.cdl index fece18b1f3..83e7329575 100644 --- a/lib/iris/tests/results/integration/netcdf/general/TestPackedData/single_packed_manual.cdl +++ b/lib/iris/tests/results/integration/netcdf/general/TestPackedData/single_packed_manual.cdl @@ -4,8 +4,8 @@ dimensions: longitude = 96 ; variables: short air_temperature(latitude, longitude) ; - air_temperature:scale_factor = 0.00119806791576066 ; - air_temperature:add_offset = 267.40062344802 ; + air_temperature:scale_factor = 0.001198068f ; + air_temperature:add_offset = 267.4006f ; air_temperature:standard_name = "air_temperature" ; air_temperature:units = "K" ; air_temperature:um_stash_source = "m01s03i236" ; diff --git a/lib/iris/tests/results/integration/netcdf/general/TestPackedData/single_packed_signed.cdl b/lib/iris/tests/results/integration/netcdf/general/TestPackedData/single_packed_signed.cdl index fece18b1f3..83e7329575 100644 --- a/lib/iris/tests/results/integration/netcdf/general/TestPackedData/single_packed_signed.cdl +++ b/lib/iris/tests/results/integration/netcdf/general/TestPackedData/single_packed_signed.cdl @@ -4,8 +4,8 @@ dimensions: longitude = 96 ; variables: short air_temperature(latitude, longitude) ; - air_temperature:scale_factor = 0.00119806791576066 ; - air_temperature:add_offset = 267.40062344802 ; + air_temperature:scale_factor = 0.001198068f ; + air_temperature:add_offset = 267.4006f ; air_temperature:standard_name = "air_temperature" ; air_temperature:units = "K" ; air_temperature:um_stash_source = "m01s03i236" ; diff --git a/lib/iris/tests/results/integration/netcdf/general/TestPackedData/single_packed_unsigned.cdl b/lib/iris/tests/results/integration/netcdf/general/TestPackedData/single_packed_unsigned.cdl index c85ba6aadd..7b9114309e 100644 --- a/lib/iris/tests/results/integration/netcdf/general/TestPackedData/single_packed_unsigned.cdl +++ b/lib/iris/tests/results/integration/netcdf/general/TestPackedData/single_packed_unsigned.cdl @@ -4,7 +4,7 @@ dimensions: longitude = 96 ; variables: ubyte air_temperature(latitude, longitude) ; - air_temperature:scale_factor = 0.30790345435049 ; + air_temperature:scale_factor = 0.3079035f ; air_temperature:add_offset = 228.1423f ; air_temperature:standard_name = "air_temperature" ; air_temperature:units = "K" ; diff --git a/lib/iris/tests/results/nimrod/u1096_ng_ek00_convection_2km.cml b/lib/iris/tests/results/nimrod/u1096_ng_ek00_convection_2km.cml index 4e3a95118e..cc657e4c97 100644 --- a/lib/iris/tests/results/nimrod/u1096_ng_ek00_convection_2km.cml +++ b/lib/iris/tests/results/nimrod/u1096_ng_ek00_convection_2km.cml @@ -212,7 +212,7 @@ - + diff --git a/lib/iris/tests/results/nimrod/u1096_ng_ek00_relhumidity3d0060_2km.cml b/lib/iris/tests/results/nimrod/u1096_ng_ek00_relhumidity3d0060_2km.cml index 4cfec2d195..9c3cc9f181 100644 --- a/lib/iris/tests/results/nimrod/u1096_ng_ek00_relhumidity3d0060_2km.cml +++ b/lib/iris/tests/results/nimrod/u1096_ng_ek00_relhumidity3d0060_2km.cml @@ -62,6 +62,6 @@ - + diff --git a/lib/iris/tests/unit/fileformats/pp/test_PPField.py b/lib/iris/tests/unit/fileformats/pp/test_PPField.py index f3aed0bea2..e3d782b156 100644 --- a/lib/iris/tests/unit/fileformats/pp/test_PPField.py +++ b/lib/iris/tests/unit/fileformats/pp/test_PPField.py @@ -98,8 +98,8 @@ def field_checksum(data): def test_masked_mdi_value_warning(self): # Check that an unmasked MDI value raises a warning. field = DummyPPField()._ready_for_save() - field.bmdi = -123.4 # Make float32 data, as float64 default produces an extra warning. + field.bmdi = np.float32(-123.4) field.data = np.ma.masked_array([1.0, field.bmdi, 3.0], dtype=np.float32) msg = "PPField data contains unmasked points" with self.assertWarnsRegex(IrisMaskValueMatchWarning, msg): diff --git a/lib/iris/tests/unit/fileformats/pp_load_rules/test__all_other_rules.py b/lib/iris/tests/unit/fileformats/pp_load_rules/test__all_other_rules.py index aa6b79e9a0..e2c71790b4 100644 --- a/lib/iris/tests/unit/fileformats/pp_load_rules/test__all_other_rules.py +++ b/lib/iris/tests/unit/fileformats/pp_load_rules/test__all_other_rules.py @@ -113,6 +113,9 @@ def test_multiple_unordered_lbprocs(self): x_bounds=None, _x_coord_name=lambda: "longitude", _y_coord_name=lambda: "latitude", + # Not under test but needed for the Mock to play nicely. + bzy=1, + bdy=1, ) res = _all_other_rules(field)[CELL_METHODS_INDEX] expected = [ @@ -133,6 +136,9 @@ def test_multiple_unordered_rotated_lbprocs(self): x_bounds=None, _x_coord_name=lambda: "grid_longitude", _y_coord_name=lambda: "grid_latitude", + # Not under test but needed for the Mock to play nicely. + bzy=1, + bdy=1, ) res = _all_other_rules(field)[CELL_METHODS_INDEX] expected = [ diff --git a/lib/iris/util.py b/lib/iris/util.py index 5781ed8f62..a808087fd8 100644 --- a/lib/iris/util.py +++ b/lib/iris/util.py @@ -1415,10 +1415,16 @@ def regular_points(zeroth, step, count): This function does maintain laziness when called; it doesn't realise data. See more at :doc:`/userguide/real_and_lazy_data`. """ - points = (zeroth + step) + step * np.arange(count, dtype=np.float32) + + def make_steps(dtype: np.dtype): + start = np.add(zeroth, step, dtype=dtype) + steps = np.multiply(step, np.arange(count), dtype=dtype) + return np.add(start, steps, dtype=dtype) + + points = make_steps(np.float32) _, regular = iris.util.points_step(points) if not regular: - points = (zeroth + step) + step * np.arange(count, dtype=np.float64) + points = make_steps(np.float64) return points diff --git a/requirements/locks/py310-linux-64.lock b/requirements/locks/py310-linux-64.lock index 73e2e273e6..b4f151992d 100644 --- a/requirements/locks/py310-linux-64.lock +++ b/requirements/locks/py310-linux-64.lock @@ -1,6 +1,6 @@ # Generated by conda-lock. # platform: linux-64 -# input_hash: 3e3bd8153f31ba49acb3a091afacec60a3c911324b1e6220edc7a30465a9801c +# input_hash: 372c3b278b46d5c658024f7b6b47d7b92266bb7ca5a25b0eb4f67e055b8a02a7 @EXPLICIT https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2#d7c89558ba9fa0495403155b64376d81 https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2024.8.30-hbcca054_0.conda#c27d1c142233b5bc9ca570c6e2e0c244 @@ -264,7 +264,7 @@ https://conda.anaconda.org/conda-forge/linux-64/libnetcdf-4.9.2-nompi_h2564987_1 https://conda.anaconda.org/conda-forge/linux-64/libopenvino-2024.4.0-hac27bb2_2.conda#ba5ac0bb9ec5aec38dec37c230b12d64 https://conda.anaconda.org/conda-forge/linux-64/libpq-17.0-h04577a9_4.conda#392cae2a58fbcb9db8c2147c6d6d1620 https://conda.anaconda.org/conda-forge/linux-64/multidict-6.1.0-py310h89163eb_1.conda#4e13be3228db4b8e1349483e821b6046 -https://conda.anaconda.org/conda-forge/linux-64/numpy-1.26.4-py310hb13e2d6_0.conda#6593de64c935768b6bad3e19b3e978be +https://conda.anaconda.org/conda-forge/linux-64/numpy-2.1.2-py310hd6e36ab_0.conda#d64ac80cd7861e079770982204d4673b https://conda.anaconda.org/conda-forge/linux-64/pango-1.54.0-h4c5309f_1.conda#7df02e445367703cd87a574046e3a6f0 https://conda.anaconda.org/conda-forge/noarch/pbr-6.1.0-pyhd8ed1ab_0.conda#5a166b998fd17cdaaaadaccdd71a363f https://conda.anaconda.org/conda-forge/linux-64/pyproj-3.7.0-py310h2e9f774_0.conda#42a3ea3c283d930ae6d156b97ffe4740 @@ -294,7 +294,7 @@ https://conda.anaconda.org/conda-forge/linux-64/libopenvino-pytorch-frontend-202 https://conda.anaconda.org/conda-forge/linux-64/libopenvino-tensorflow-frontend-2024.4.0-h6481b9d_2.conda#12bf831b85f17368bc71a26ac93a8493 https://conda.anaconda.org/conda-forge/linux-64/libopenvino-tensorflow-lite-frontend-2024.4.0-h5888daf_2.conda#d48c774c40ea2047adbff043e9076e7a https://conda.anaconda.org/conda-forge/linux-64/librsvg-2.58.4-hc0ffecb_0.conda#83f045969988f5c7a65f3950b95a8b35 -https://conda.anaconda.org/conda-forge/linux-64/mo_pack-0.3.0-py310h2372a71_1.conda#dfcf64f67961eb9686676f96fdb4b4d1 +https://conda.anaconda.org/conda-forge/linux-64/mo_pack-0.3.1-py310ha75aee5_1.conda#48781b625a5c7701e04d222752cb2f62 https://conda.anaconda.org/conda-forge/linux-64/netcdf-fortran-4.6.1-nompi_ha5d1325_107.conda#5bd5042289ef82196bae48948314cdf9 https://conda.anaconda.org/conda-forge/linux-64/pandas-2.2.3-py310h5eaa309_1.conda#e67778e1cac3bca3b3300f6164f7ffb9 https://conda.anaconda.org/conda-forge/linux-64/pykdtree-1.3.13-py310hf462985_1.conda#4f1c137b6ea5e8c7ce95c28b053843cc @@ -338,3 +338,4 @@ https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-htmlhelp-2.1.0-pyhd8 https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-qthelp-2.0.0-pyhd8ed1ab_0.conda#d6e5ea5fe00164ac6c2dcc5d76a42192 https://conda.anaconda.org/conda-forge/noarch/sphinx-8.1.3-pyhd8ed1ab_0.conda#05706dd5a145a9c91861495cd435409a https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-serializinghtml-1.1.10-pyhd8ed1ab_0.conda#e507335cb4ca9cff4c3d0fa9cdab255e + diff --git a/requirements/locks/py311-linux-64.lock b/requirements/locks/py311-linux-64.lock index 19ec4987a3..d200ab99f7 100644 --- a/requirements/locks/py311-linux-64.lock +++ b/requirements/locks/py311-linux-64.lock @@ -1,6 +1,6 @@ # Generated by conda-lock. # platform: linux-64 -# input_hash: e68e373299c536a8997c49d7cb8229a534432506a0eaf024bfef438b0ab54687 +# input_hash: 58de0176aff465b8a68544e32553b8c5648f581ece5d2c4df0d333dd456ea851 @EXPLICIT https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2#d7c89558ba9fa0495403155b64376d81 https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2024.8.30-hbcca054_0.conda#c27d1c142233b5bc9ca570c6e2e0c244 @@ -265,7 +265,7 @@ https://conda.anaconda.org/conda-forge/linux-64/libass-0.17.3-h1dc1e6a_0.conda#2 https://conda.anaconda.org/conda-forge/linux-64/libnetcdf-4.9.2-nompi_h2564987_115.conda#c5ce70b76c77a6c9a3107be8d8e8ab0b https://conda.anaconda.org/conda-forge/linux-64/libopenvino-2024.4.0-hac27bb2_2.conda#ba5ac0bb9ec5aec38dec37c230b12d64 https://conda.anaconda.org/conda-forge/linux-64/libpq-17.0-h04577a9_4.conda#392cae2a58fbcb9db8c2147c6d6d1620 -https://conda.anaconda.org/conda-forge/linux-64/numpy-1.26.4-py311h64a7726_0.conda#a502d7aad449a1206efb366d6a12c52d +https://conda.anaconda.org/conda-forge/linux-64/numpy-2.1.2-py311h71ddf71_0.conda#4e72b55892331ada8fbcf5954df582f2 https://conda.anaconda.org/conda-forge/linux-64/pango-1.54.0-h4c5309f_1.conda#7df02e445367703cd87a574046e3a6f0 https://conda.anaconda.org/conda-forge/noarch/pbr-6.1.0-pyhd8ed1ab_0.conda#5a166b998fd17cdaaaadaccdd71a363f https://conda.anaconda.org/conda-forge/linux-64/pyproj-3.7.0-py311h0f98d5a_0.conda#22531205a97c116251713008d65dfefd @@ -295,7 +295,7 @@ https://conda.anaconda.org/conda-forge/linux-64/libopenvino-pytorch-frontend-202 https://conda.anaconda.org/conda-forge/linux-64/libopenvino-tensorflow-frontend-2024.4.0-h6481b9d_2.conda#12bf831b85f17368bc71a26ac93a8493 https://conda.anaconda.org/conda-forge/linux-64/libopenvino-tensorflow-lite-frontend-2024.4.0-h5888daf_2.conda#d48c774c40ea2047adbff043e9076e7a https://conda.anaconda.org/conda-forge/linux-64/librsvg-2.58.4-hc0ffecb_0.conda#83f045969988f5c7a65f3950b95a8b35 -https://conda.anaconda.org/conda-forge/linux-64/mo_pack-0.3.0-py311h459d7ec_1.conda#45b8d355bbcdd27588c2d266bcfdff84 +https://conda.anaconda.org/conda-forge/linux-64/mo_pack-0.3.1-py311h9ecbd09_1.conda#28d6b63784b350a2906dc264ad8c7f2a https://conda.anaconda.org/conda-forge/linux-64/netcdf-fortran-4.6.1-nompi_ha5d1325_107.conda#5bd5042289ef82196bae48948314cdf9 https://conda.anaconda.org/conda-forge/linux-64/pandas-2.2.3-py311h7db5c69_1.conda#643f8cb35133eb1be4919fb953f0a25f https://conda.anaconda.org/conda-forge/linux-64/pykdtree-1.3.13-py311h9f3472d_1.conda#87b04d34d110ea5ff945f1949b7436be @@ -337,3 +337,4 @@ https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-htmlhelp-2.1.0-pyhd8 https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-qthelp-2.0.0-pyhd8ed1ab_0.conda#d6e5ea5fe00164ac6c2dcc5d76a42192 https://conda.anaconda.org/conda-forge/noarch/sphinx-8.1.3-pyhd8ed1ab_0.conda#05706dd5a145a9c91861495cd435409a https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-serializinghtml-1.1.10-pyhd8ed1ab_0.conda#e507335cb4ca9cff4c3d0fa9cdab255e + diff --git a/requirements/locks/py312-linux-64.lock b/requirements/locks/py312-linux-64.lock index 601150eee0..850c2b5400 100644 --- a/requirements/locks/py312-linux-64.lock +++ b/requirements/locks/py312-linux-64.lock @@ -1,6 +1,6 @@ # Generated by conda-lock. # platform: linux-64 -# input_hash: 4eba699f3c5f298065afd64af4809179572760cd1b8b113d667a48127c1771e8 +# input_hash: c193458a42ce9c0214cd77bd4813343270edb438eceaf46d40cf7ea29a433b56 @EXPLICIT https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2#d7c89558ba9fa0495403155b64376d81 https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2024.8.30-hbcca054_0.conda#c27d1c142233b5bc9ca570c6e2e0c244 @@ -265,7 +265,7 @@ https://conda.anaconda.org/conda-forge/linux-64/libass-0.17.3-h1dc1e6a_0.conda#2 https://conda.anaconda.org/conda-forge/linux-64/libnetcdf-4.9.2-nompi_h2564987_115.conda#c5ce70b76c77a6c9a3107be8d8e8ab0b https://conda.anaconda.org/conda-forge/linux-64/libopenvino-2024.4.0-hac27bb2_2.conda#ba5ac0bb9ec5aec38dec37c230b12d64 https://conda.anaconda.org/conda-forge/linux-64/libpq-17.0-h04577a9_4.conda#392cae2a58fbcb9db8c2147c6d6d1620 -https://conda.anaconda.org/conda-forge/linux-64/numpy-1.26.4-py312heda63a1_0.conda#d8285bea2a350f63fab23bf460221f3f +https://conda.anaconda.org/conda-forge/linux-64/numpy-2.1.2-py312h58c1407_0.conda#b7e9a46277a1ee0afc6311e7760df0c3 https://conda.anaconda.org/conda-forge/linux-64/pango-1.54.0-h4c5309f_1.conda#7df02e445367703cd87a574046e3a6f0 https://conda.anaconda.org/conda-forge/noarch/pbr-6.1.0-pyhd8ed1ab_0.conda#5a166b998fd17cdaaaadaccdd71a363f https://conda.anaconda.org/conda-forge/linux-64/pyproj-3.7.0-py312he630544_0.conda#427799f15b36751761941f4cbd7d780f @@ -295,7 +295,7 @@ https://conda.anaconda.org/conda-forge/linux-64/libopenvino-pytorch-frontend-202 https://conda.anaconda.org/conda-forge/linux-64/libopenvino-tensorflow-frontend-2024.4.0-h6481b9d_2.conda#12bf831b85f17368bc71a26ac93a8493 https://conda.anaconda.org/conda-forge/linux-64/libopenvino-tensorflow-lite-frontend-2024.4.0-h5888daf_2.conda#d48c774c40ea2047adbff043e9076e7a https://conda.anaconda.org/conda-forge/linux-64/librsvg-2.58.4-hc0ffecb_0.conda#83f045969988f5c7a65f3950b95a8b35 -https://conda.anaconda.org/conda-forge/linux-64/mo_pack-0.3.0-py312h98912ed_1.conda#d5273d1e67b7b3a871a0a711c6532a2f +https://conda.anaconda.org/conda-forge/linux-64/mo_pack-0.3.1-py312h66e93f0_1.conda#5fef67f50126f40f5966a9451661280d https://conda.anaconda.org/conda-forge/linux-64/netcdf-fortran-4.6.1-nompi_ha5d1325_107.conda#5bd5042289ef82196bae48948314cdf9 https://conda.anaconda.org/conda-forge/linux-64/pandas-2.2.3-py312hf9745cd_1.conda#8bce4f6caaf8c5448c7ac86d87e26b4b https://conda.anaconda.org/conda-forge/linux-64/pykdtree-1.3.13-py312hc0a28a1_1.conda#b4fa8eafe923ac2733001fef8531026f @@ -337,3 +337,4 @@ https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-htmlhelp-2.1.0-pyhd8 https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-qthelp-2.0.0-pyhd8ed1ab_0.conda#d6e5ea5fe00164ac6c2dcc5d76a42192 https://conda.anaconda.org/conda-forge/noarch/sphinx-8.1.3-pyhd8ed1ab_0.conda#05706dd5a145a9c91861495cd435409a https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-serializinghtml-1.1.10-pyhd8ed1ab_0.conda#e507335cb4ca9cff4c3d0fa9cdab255e + diff --git a/requirements/py310.yml b/requirements/py310.yml index e9246a990e..f7285938f6 100644 --- a/requirements/py310.yml +++ b/requirements/py310.yml @@ -18,7 +18,7 @@ dependencies: - libnetcdf !=4.9.1 - matplotlib-base >=3.5, !=3.9.1 - netcdf4 - - numpy >=1.24, !=1.24.3, <2 + - numpy >=1.24, !=1.24.3 - python-xxhash - pyproj - scipy diff --git a/requirements/py311.yml b/requirements/py311.yml index dad2080efa..e6f5e62a2b 100644 --- a/requirements/py311.yml +++ b/requirements/py311.yml @@ -18,7 +18,7 @@ dependencies: - libnetcdf !=4.9.1 - matplotlib-base >=3.5, !=3.9.1 - netcdf4 - - numpy >=1.24, !=1.24.3, <2 + - numpy >=1.24, !=1.24.3 - python-xxhash - pyproj - scipy diff --git a/requirements/py312.yml b/requirements/py312.yml index 6e1d4be351..b16f25b501 100644 --- a/requirements/py312.yml +++ b/requirements/py312.yml @@ -18,7 +18,7 @@ dependencies: - libnetcdf !=4.9.1 - matplotlib-base >=3.5, !=3.9.1 - netcdf4 - - numpy >=1.24, !=1.24.3, <2 + - numpy >=1.24, !=1.24.3 - python-xxhash - pyproj - scipy diff --git a/requirements/pypi-core.txt b/requirements/pypi-core.txt index 36baaec1b9..208ef7f413 100644 --- a/requirements/pypi-core.txt +++ b/requirements/pypi-core.txt @@ -5,7 +5,7 @@ dask[array]>=2022.9.0,!=2024.8.0 # libnetcdf!=4.9.1 (not available on PyPI) matplotlib>=3.5 netcdf4 -numpy>=1.24,!=1.24.3,<2 +numpy>=1.24,!=1.24.3 pyproj scipy shapely!=1.8.3