本文整理汇总了Python中thunder.rdds.fileio.imagesloader.ImagesLoader.cache方法的典型用法代码示例。如果您正苦于以下问题:Python ImagesLoader.cache方法的具体用法?Python ImagesLoader.cache怎么用?Python ImagesLoader.cache使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类thunder.rdds.fileio.imagesloader.ImagesLoader
的用法示例。
在下文中一共展示了ImagesLoader.cache方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_toSeriesBySlices
# 需要导入模块: from thunder.rdds.fileio.imagesloader import ImagesLoader [as 别名]
# 或者: from thunder.rdds.fileio.imagesloader.ImagesLoader import cache [as 别名]
def test_toSeriesBySlices(self):
narys = 3
arys, sh, sz = _generateTestArrays(narys)
imageData = ImagesLoader(self.sc).fromArrays(arys)
imageData.cache()
testParams = [
(1, 1, 1),
(1, 1, 2),
(1, 1, 3),
(1, 2, 1),
(1, 2, 2),
(1, 2, 3),
(1, 3, 1),
(1, 3, 2),
(1, 3, 3),
(2, 1, 1),
(2, 1, 2),
(2, 1, 3),
(2, 2, 1),
(2, 2, 2),
(2, 2, 3),
(2, 3, 1),
(2, 3, 2),
(2, 3, 3),
]
for bpd in testParams:
series = imageData.toBlocks(bpd, units="s").toSeries().collect()
self.evaluateSeries(arys, series, sz)
示例2: test_toSeriesBySlices
# 需要导入模块: from thunder.rdds.fileio.imagesloader import ImagesLoader [as 别名]
# 或者: from thunder.rdds.fileio.imagesloader.ImagesLoader import cache [as 别名]
def test_toSeriesBySlices(self):
narys = 3
arys, sh, sz = _generate_test_arrays(narys)
imagedata = ImagesLoader(self.sc).fromArrays(arys)
imagedata.cache()
test_params = [
(1, 1, 1), (1, 1, 2), (1, 1, 3), (1, 2, 1), (1, 2, 2), (1, 2, 3),
(1, 3, 1), (1, 3, 2), (1, 3, 3),
(2, 1, 1), (2, 1, 2), (2, 1, 3), (2, 2, 1), (2, 2, 2), (2, 2, 3),
(2, 3, 1), (2, 3, 2), (2, 3, 3)]
for bpd in test_params:
series = imagedata.toSeries(splitsPerDim=bpd).collect()
self.evaluate_series(arys, series, sz)