File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,8 @@ This document explains the changes made to Iris for this release
100
100
lazy data from file. This will also speed up coordinate comparison.
101
101
(:pull: `5610 `)
102
102
103
+ #. `@bouweandela `_ changed :func: `iris.coords.Coord.cell ` so it does not realize
104
+ all coordinate data and only loads a single cell instead. (:pull: `5693 `)
103
105
104
106
🔥 Deprecations
105
107
===============
Original file line number Diff line number Diff line change @@ -2092,7 +2092,7 @@ def cell(self, index):
2092
2092
"""
2093
2093
index = iris .util ._build_full_slice_given_keys (index , self .ndim )
2094
2094
2095
- point = tuple (np .array (self .points [index ], ndmin = 1 ).flatten ())
2095
+ point = tuple (np .array (self .core_points () [index ], ndmin = 1 ).flatten ())
2096
2096
if len (point ) != 1 :
2097
2097
raise IndexError (
2098
2098
"The index %s did not uniquely identify a single "
@@ -2101,7 +2101,7 @@ def cell(self, index):
2101
2101
2102
2102
bound = None
2103
2103
if self .has_bounds ():
2104
- bound = tuple (np .array (self .bounds [index ], ndmin = 1 ).flatten ())
2104
+ bound = tuple (np .array (self .core_bounds () [index ], ndmin = 1 ).flatten ())
2105
2105
2106
2106
if self .units .is_time_reference ():
2107
2107
point = self .units .num2date (point )
Original file line number Diff line number Diff line change @@ -240,9 +240,12 @@ def _mock_coord(self):
240
240
coord = mock .Mock (
241
241
spec = Coord ,
242
242
ndim = 1 ,
243
- points = np .array ([mock .sentinel .time ]),
244
- bounds = np .array ([[mock .sentinel .lower , mock .sentinel .upper ]]),
245
243
)
244
+ coord .core_points = lambda : np .array ([mock .sentinel .time ])
245
+ coord .core_bounds = lambda : np .array (
246
+ [[mock .sentinel .lower , mock .sentinel .upper ]]
247
+ )
248
+
246
249
return coord
247
250
248
251
def test_time_as_object (self ):
You can’t perform that action at this time.
0 commit comments