本文整理汇总了Python中iris.coords.AuxCoord.bounds方法的典型用法代码示例。如果您正苦于以下问题:Python AuxCoord.bounds方法的具体用法?Python AuxCoord.bounds怎么用?Python AuxCoord.bounds使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类iris.coords.AuxCoord
的用法示例。
在下文中一共展示了AuxCoord.bounds方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_set_lazy_bounds
# 需要导入模块: from iris.coords import AuxCoord [as 别名]
# 或者: from iris.coords.AuxCoord import 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)
示例2: test_set_real_bounds
# 需要导入模块: from iris.coords import AuxCoord [as 别名]
# 或者: from iris.coords.AuxCoord import 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.')
示例3: test_set_bounds_with_lazy_points
# 需要导入模块: from iris.coords import AuxCoord [as 别名]
# 或者: from iris.coords.AuxCoord import bounds [as 别名]
def test_set_bounds_with_lazy_points(self):
# Setting bounds does not change lazy points.
coord = AuxCoord(self.pts_lazy, bounds=self.bds_real)
new_bounds = self.bds_real + 102.3
coord.bounds = new_bounds
self.assertTrue(coord.has_lazy_points())
示例4: test_fail_bad_shape
# 需要导入模块: from iris.coords import AuxCoord [as 别名]
# 或者: from iris.coords.AuxCoord import bounds [as 别名]
def test_fail_bad_shape(self):
# Setting real points requires matching shape.
coord = AuxCoord(self.pts_real, bounds=self.bds_real)
msg = 'must be compatible with points shape'
with self.assertRaisesRegexp(ValueError, msg):
coord.bounds = np.array([1.0, 2.0, 3.0])