本文整理汇总了Python中numpy.ma.MaskType方法的典型用法代码示例。如果您正苦于以下问题:Python ma.MaskType方法的具体用法?Python ma.MaskType怎么用?Python ma.MaskType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类numpy.ma
的用法示例。
在下文中一共展示了ma.MaskType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_mem_masked_where
# 需要导入模块: from numpy import ma [as 别名]
# 或者: from numpy.ma import MaskType [as 别名]
def test_mem_masked_where(self):
# Ticket #62
from numpy.ma import masked_where, MaskType
a = np.zeros((1, 1))
b = np.zeros(a.shape, MaskType)
c = masked_where(b, a)
a-c
示例2: test_mem_masked_where
# 需要导入模块: from numpy import ma [as 别名]
# 或者: from numpy.ma import MaskType [as 别名]
def test_mem_masked_where(self,level=rlevel):
# Ticket #62
from numpy.ma import masked_where, MaskType
a = np.zeros((1, 1))
b = np.zeros(a.shape, MaskType)
c = masked_where(b, a)
a-c
示例3: test_mem_masked_where
# 需要导入模块: from numpy import ma [as 别名]
# 或者: from numpy.ma import MaskType [as 别名]
def test_mem_masked_where(self,level=rlevel):
"""Ticket #62"""
from numpy.ma import masked_where, MaskType
a = np.zeros((1, 1))
b = np.zeros(a.shape, MaskType)
c = masked_where(b, a)
a-c