本文整理汇总了Python中iris.coords.AuxCoord.core_bounds方法的典型用法代码示例。如果您正苦于以下问题:Python AuxCoord.core_bounds方法的具体用法?Python AuxCoord.core_bounds怎么用?Python AuxCoord.core_bounds使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类iris.coords.AuxCoord
的用法示例。
在下文中一共展示了AuxCoord.core_bounds方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_lazy_complex
# 需要导入模块: from iris.coords import AuxCoord [as 别名]
# 或者: from iris.coords.AuxCoord import core_bounds [as 别名]
def test_lazy_complex(self):
raw_points = np.arange(12).reshape(4, 3)
points = as_lazy_data(raw_points, raw_points.shape)
raw_bounds = np.arange(24).reshape(4, 3, 2)
bounds = as_lazy_data(raw_bounds, raw_bounds.shape)
coord = AuxCoord(points, bounds=bounds)
self.assertTrue(is_lazy_data(coord.core_bounds()))
result = AuxCoordFactory._nd_bounds(coord, (3, 2), 5)
# Check we haven't triggered the loading of the coordinate values.
self.assertTrue(is_lazy_data(coord.core_bounds()))
self.assertTrue(is_lazy_data(result))
expected = raw_bounds.transpose((1, 0, 2)).reshape(1, 1, 3, 4, 1, 2)
self.assertArrayEqual(result, expected)
示例2: test_set_lazy_bounds
# 需要导入模块: from iris.coords import AuxCoord [as 别名]
# 或者: from iris.coords.AuxCoord import core_bounds [as 别名]
def test_set_lazy_bounds(self):
# Setting new lazy bounds.
coord = AuxCoord(self.pts_real, bounds=self.bds_real)
new_bounds = self.bds_lazy + 102.3
coord.bounds = new_bounds
result = coord.core_bounds()
self.assertEqualLazyArraysAndDtypes(result, new_bounds)
示例3: test_set_points_with_lazy_bounds
# 需要导入模块: from iris.coords import AuxCoord [as 别名]
# 或者: from iris.coords.AuxCoord import core_bounds [as 别名]
def test_set_points_with_lazy_bounds(self):
# Setting points does not touch lazy bounds.
coord = AuxCoord(self.pts_real, bounds=self.bds_lazy)
new_pts = self.pts_real + 102.3
coord.points = new_pts
result = coord.core_bounds()
self.assertEqualLazyArraysAndDtypes(result, self.bds_lazy)
示例4: test_real_points_with_real_bounds
# 需要导入模块: from iris.coords import AuxCoord [as 别名]
# 或者: from iris.coords.AuxCoord import core_bounds [as 别名]
def test_real_points_with_real_bounds(self):
# Getting real points does not change real bounds.
coord = AuxCoord(self.pts_real, bounds=self.bds_real)
coord.points
result = coord.core_bounds()
self.assertArraysShareData(
result, self.bds_real,
'Bounds do not share data with the provided array.')
示例5: test_set_real_bounds
# 需要导入模块: from iris.coords import AuxCoord [as 别名]
# 或者: from iris.coords.AuxCoord import core_bounds [as 别名]
def test_set_real_bounds(self):
# Setting new real bounds does not make a copy.
coord = AuxCoord(self.pts_real, bounds=self.bds_real)
new_bounds = self.bds_real + 102.3
coord.bounds = new_bounds
result = coord.core_bounds()
self.assertArraysShareData(
result, new_bounds,
'Bounds do not share data with the assigned array.')
示例6: test_lazy_points_with_real_bounds
# 需要导入模块: from iris.coords import AuxCoord [as 别名]
# 或者: from iris.coords.AuxCoord import core_bounds [as 别名]
def test_lazy_points_with_real_bounds(self):
# Getting lazy points does not affect real bounds.
coord = AuxCoord(self.pts_lazy, bounds=self.bds_real)
coord.points
result = coord.core_bounds()
self.assertEqualRealArraysAndDtypes(result, self.bds_real)
示例7: test_lazy_bounds_realise
# 需要导入模块: from iris.coords import AuxCoord [as 别名]
# 或者: from iris.coords.AuxCoord import core_bounds [as 别名]
def test_lazy_bounds_realise(self):
coord = AuxCoord(self.pts_real, bounds=self.bds_lazy)
real_bounds = coord.bounds
result = coord.core_bounds()
self.assertEqualRealArraysAndDtypes(result, real_bounds)
示例8: test_lazy_bounds
# 需要导入模块: from iris.coords import AuxCoord [as 别名]
# 或者: from iris.coords.AuxCoord import core_bounds [as 别名]
def test_lazy_bounds(self):
coord = AuxCoord(self.pts_real, bounds=self.bds_lazy)
result = coord.core_bounds()
self.assertEqualLazyArraysAndDtypes(result, self.bds_lazy)
示例9: test_real_bounds
# 需要导入模块: from iris.coords import AuxCoord [as 别名]
# 或者: from iris.coords.AuxCoord import core_bounds [as 别名]
def test_real_bounds(self):
coord = AuxCoord(self.pts_real, bounds=self.bds_real)
result = coord.core_bounds()
self.assertArraysShareData(
result, self.bds_real,
'core_bounds() do not share data with the internal array.')
示例10: test_no_bounds
# 需要导入模块: from iris.coords import AuxCoord [as 别名]
# 或者: from iris.coords.AuxCoord import core_bounds [as 别名]
def test_no_bounds(self):
coord = AuxCoord(self.pts_real)
result = coord.core_bounds()
self.assertIsNone(result)
示例11: test_lazy_bounds_realise
# 需要导入模块: from iris.coords import AuxCoord [as 别名]
# 或者: from iris.coords.AuxCoord import core_bounds [as 别名]
def test_lazy_bounds_realise(self):
coord = AuxCoord(self.pts_real, bounds=self.bds_lazy)
real_bounds = coord.bounds
result = coord.core_bounds()
self.assertIs(result, real_bounds)