本文整理汇总了Python中numpy.lib._datasource.DataSource方法的典型用法代码示例。如果您正苦于以下问题:Python _datasource.DataSource方法的具体用法?Python _datasource.DataSource怎么用?Python _datasource.DataSource使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类numpy.lib._datasource
的用法示例。
在下文中一共展示了_datasource.DataSource方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setup
# 需要导入模块: from numpy.lib import _datasource [as 别名]
# 或者: from numpy.lib._datasource import DataSource [as 别名]
def setup(self):
self.tmpdir = mkdtemp()
self.ds = datasource.DataSource(self.tmpdir)
示例2: test_del_attr_handling
# 需要导入模块: from numpy.lib import _datasource [as 别名]
# 或者: from numpy.lib._datasource import DataSource [as 别名]
def test_del_attr_handling():
# DataSource __del__ can be called
# even if __init__ fails when the
# Exception object is caught by the
# caller as happens in refguide_check
# is_deprecated() function
ds = datasource.DataSource()
# simulate failed __init__ by removing key attribute
# produced within __init__ and expected by __del__
del ds._istmpdest
# should not raise an AttributeError if __del__
# gracefully handles failed __init__:
ds.__del__()
示例3: setUp
# 需要导入模块: from numpy.lib import _datasource [as 别名]
# 或者: from numpy.lib._datasource import DataSource [as 别名]
def setUp(self):
self.tmpdir = mkdtemp()
self.ds = datasource.DataSource(self.tmpdir)