Commit 7146187b authored by payno's avatar payno
Browse files

[utils][_insert_frame_data] fix virtual dataset creation. Cannot use...

[utils][_insert_frame_data] fix virtual dataset creation. Cannot use SapceID.shape but should use bounds
parent 1f20f46c
Pipeline #37496 passed with stages
in 4 minutes
......@@ -461,8 +461,12 @@ def _insert_frame_data(data, file_path, data_path, where, logger=None):
if os.path.dirname(vds_file) not in ("", None):
os.chdir(os.path.dirname(vds_file))
with HDF5File(vs_info.file_name, mode="r") as vs_node:
vs_shape = vs_node[vs_info.dset_name].shape
length = vs_shape[0]
vs_shape = list(vs_info.vspace.shape)
select_bounds = vs_info.vspace.get_select_bounds()
left_bound = select_bounds[0]
right_bound = select_bounds[1]
length = right_bound[0] - left_bound[0] + 1
vs_shape[0] = length
return (
length,
h5py.VirtualSource(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment