Skip to content

Commit 6f0cbf6

Browse files
authored
Add result_name pin in custom and modify example (#2045)
* add pin in custom and modify example * correction * correction of example * rollback
1 parent 74c4691 commit 6f0cbf6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

examples/05-file-IO/02-hdf5_serialize_and_read.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,12 @@
115115
h5_stream_prov_op = dpf.operators.metadata.streams_provider()
116116
h5_stream_prov_op.inputs.data_sources.connect(h5_all_times_ds)
117117
res_deser_all_times_list = []
118-
h5_read_op = dpf.operators.serialization.hdf5dpf_custom_read()
119-
h5_read_op.inputs.streams.connect(h5_stream_prov_op.outputs)
118+
h5_read_op = dpf.operators.result.custom()
119+
h5_read_op.inputs.streams_container.connect(h5_stream_prov_op.outputs)
120120
h5_read_op.inputs.time_scoping.connect(dpf.Scoping(ids=list(range(1, 54)), location="time"))
121121
for i, res_name in enumerate(result_names_on_all_time_steps):
122122
h5_read_op.inputs.result_name.connect(res_name)
123-
res_deser = h5_read_op.outputs.field_or_fields_container_as_fields_container()
123+
res_deser = h5_read_op.outputs.fields_container()
124124
res_deser_all_times_list.append(res_deser)
125125

126126
###############################################################################
@@ -134,11 +134,11 @@
134134
h5_stream_prov_op_2 = dpf.operators.metadata.streams_provider()
135135
h5_stream_prov_op_2.inputs.data_sources.connect(h5_set_per_set_ds)
136136
res_deser_set_per_set_list = []
137-
h5_read_op_2 = dpf.operators.serialization.hdf5dpf_custom_read()
138-
h5_read_op_2.inputs.streams.connect(h5_stream_prov_op_2.outputs)
137+
h5_read_op_2 = dpf.operators.result.custom()
138+
h5_read_op_2.inputs.streams_container.connect(h5_stream_prov_op_2.outputs)
139139
for i, res_name in enumerate(result_names_time_per_time):
140140
h5_read_op_2.inputs.result_name.connect(res_name)
141-
res_deser = h5_read_op_2.outputs.field_or_fields_container_as_fields_container()
141+
res_deser = h5_read_op_2.outputs.fields_container()
142142
res_deser_set_per_set_list.append(res_deser)
143143

144144
###############################################################################

0 commit comments

Comments
 (0)