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