Skip to content

Commit

Permalink
Revert "Use %06T instead of %T, i.e. 6-digit padding"
Browse files Browse the repository at this point in the history
This reverts commit ea3fbee.
  • Loading branch information
franzpoeschel committed May 30, 2024
1 parent ea3fbee commit 845c021
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mala/common/physical_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ def write_to_openpmd_file(

if isinstance(path, str):
directory, file_name = os.path.split(path)
path = os.path.join(directory, file_name.replace("*", "%06T"))
path = os.path.join(directory, file_name.replace("*", "%T"))
file_ending = file_name.split(".")[-1]
if file_name == file_ending:
path += ".h5"
Expand Down
6 changes: 3 additions & 3 deletions mala/datahandling/data_shuffler.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ def __shuffle_numpy(

# Do the actual shuffling.
target_name_openpmd = os.path.join(target_save_path,
save_name.replace("*", "%06T"))
save_name.replace("*", "%T"))
descriptor_name_openpmd = os.path.join(descriptor_save_path,
save_name.replace("*", "%06T"))
save_name.replace("*", "%T"))
for i in range(0, number_of_new_snapshots):
new_descriptors = np.zeros(
(int(np.prod(shuffle_dimensions)), self.input_dimension),
Expand Down Expand Up @@ -364,7 +364,7 @@ def from_chunk_i(i, n, dset, slice_dimension=0):

# Do the actual shuffling.
name_prefix = os.path.join(
dot.save_path, save_name.replace("*", "%06T")
dot.save_path, save_name.replace("*", "%T")
)
for i in range(my_items_start, my_items_end):
# We check above that in the non-numpy case, OpenPMD will work.
Expand Down

0 comments on commit 845c021

Please sign in to comment.