本文整理匯總了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)