Skip to content

Commit

Permalink
output_dir to write_dir for consistency.
Browse files Browse the repository at this point in the history
  • Loading branch information
tompollard committed Jul 3, 2024
1 parent 048e0e5 commit a5d50c2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions wfdb/io/convert/csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def csv_to_wfdb(
header=True,
delimiter=",",
verbose=False,
output_dir=None,
write_dir=None,
):
"""
Read a WFDB header file and return either a `Record` object with the
Expand Down Expand Up @@ -236,7 +236,7 @@ def csv_to_wfdb(
verbose : bool, optional
Whether to print all the information read about the file (True) or
not (False).
output_dir : str, optional
write_dir : str, optional
The directory where the output files will be saved. If not provided,
the output files will be saved in the same directory as the input file.
Expand Down Expand Up @@ -325,11 +325,11 @@ def csv_to_wfdb(
print("Signal names: {}".format(sig_name))

# Determine the output directory
if output_dir:
if not os.path.exists(output_dir):
os.makedirs(output_dir)
if write_dir:
if not os.path.exists(write_dir):
os.makedirs(write_dir)
output_base = os.path.join(
output_dir, os.path.basename(file_name).replace(".csv", "")
write_dir, os.path.basename(file_name).replace(".csv", "")
)
else:
if os.sep in file_name:
Expand Down

0 comments on commit a5d50c2

Please sign in to comment.