mindspore/docs/api/api_python/dataset/mindspore.dataset.zip.rst

20 lines
603 B
ReStructuredText
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.dataset.zip(datasets)
将多个dataset对象按列进行合并压缩。
参数:
datasets (tuple of class Dataset)输入元组格式的多个dataset对象。
datasets参数的长度必须大于1。
返回:
ZipDataset合并后的dataset对象。
异常:
ValueErrordatasets参数的长度为1。
TypeErrordatasets参数不是元组。
示例:
>>> # 创建一个将dataset_1和dataset_2合并后数据集dataset。
>>> dataset = ds.zip((dataset_1, dataset_2))