@@ -39,6 +39,7 @@ def load_csv_file(
39
39
file_path : str ,
40
40
keys : Tuple [str , ...],
41
41
alias_dict : Optional [Dict [str , str ]] = None ,
42
+ delimeter : str = "," ,
42
43
encoding : str = "utf-8" ,
43
44
) -> Dict [str , np .ndarray ]:
44
45
"""Load *.csv file and fetch data as given keys.
@@ -59,7 +60,7 @@ def load_csv_file(
59
60
try :
60
61
# read all data from csv file
61
62
with open (file_path , "r" , encoding = encoding ) as csv_file :
62
- reader = csv .DictReader (csv_file )
63
+ reader = csv .DictReader (csv_file , delimiter = delimeter )
63
64
raw_data = collections .defaultdict (list )
64
65
for _ , line_dict in enumerate (reader ):
65
66
for key , value in line_dict .items ():
@@ -121,7 +122,7 @@ def load_mat_file(
121
122
122
123
def load_vtk_file (
123
124
filename_without_timeid : str ,
124
- time_step : Union [ float , int ] ,
125
+ time_step : float ,
125
126
time_index : Tuple [int , ...],
126
127
input_keys : Tuple [str , ...],
127
128
label_keys : Optional [Tuple [str , ...]],
@@ -130,7 +131,7 @@ def load_vtk_file(
130
131
131
132
Args:
132
133
filename_without_timeid (str): File name without time id.
133
- time_step (Union[ float, Dict] ): Physical time step.
134
+ time_step (float): Physical time step.
134
135
time_index (Tuple[int, ...]): Physical time indexes.
135
136
input_keys (Tuple[str, ...]): Input coordinates name keys.
136
137
label_keys (Optional[Tuple[str, ...]]): Input label name keys.
0 commit comments