Skip to content

Commit

Permalink
Added comments for the deprecated function 'delim_whitespace'.
Browse files Browse the repository at this point in the history
  • Loading branch information
airvzxf committed Apr 19, 2024
1 parent 44287de commit 945d86c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tardis/io/model/readers/artis.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ def read_artis_density(fname):
usecols=(0, 1, 2, 4, 5, 6, 7),
dtype={item: np.float64 for item in artis_model_columns},
names=artis_model_columns,
# The argument `delim_whitespace` was changed to `sep`
# because the first one is deprecated since version 2.2.0.
# The regular expression means: the separation is one or
# more spaces together (simple space, tabs, new lines).
sep=r"\s+",
).to_records(index=False)

Expand Down
4 changes: 4 additions & 0 deletions tardis/io/model/readers/blondin_toymodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ def read_blondin_toymodel(fname):
]

raw_blondin_csv = pd.read_csv(
# The argument `delim_whitespace` was changed to `sep`
# because the first one is deprecated since version 2.2.0.
# The regular expression means: the separation is one or
# more spaces together (simple space, tabs, new lines).
fname, sep=r"\s+", comment="#", header=None, names=columns
)
raw_blondin_csv.set_index("idx", inplace=True)
Expand Down
4 changes: 4 additions & 0 deletions tardis/io/model/readers/stella.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ def read_stella_model(fname):
# and the actual data
data = pd.read_csv(
fname,
# The argument `delim_whitespace` was changed to `sep`
# because the first one is deprecated since version 2.2.0.
# The regular expression means: the separation is one or
# more spaces together (simple space, tabs, new lines).
sep=r"\s+",
skiprows=DATA_START_ROW + 1,
header=None,
Expand Down
4 changes: 4 additions & 0 deletions tardis/util/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
ATOMIC_SYMBOLS_DATA = (
pd.read_csv(
get_internal_data_path("atomic_symbols.dat"),
# The argument `delim_whitespace` was changed to `sep`
# because the first one is deprecated since version 2.2.0.
# The regular expression means: the separation is one or
# more spaces together (simple space, tabs, new lines).
sep=r"\s+",
names=["atomic_number", "symbol"],
)
Expand Down

0 comments on commit 945d86c

Please sign in to comment.