Skip to content

Commit bdecc36

Browse files
authored
Merge pull request #40 from MeteoSwiss-APN/issue_36
fix FutureWarning pd.concat with empty entries
2 parents 9b165d7 + c59673c commit bdecc36

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/pytrajplot/generate_pdf.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,8 @@ def generate_pdf(
525525
# initialise two empty panda series, which ultimately contain the longitude/latitude values of all trajectories
526526
# departing from current origin. --> to compute dynamic domain and check dateline crossing
527527
trajectory_longitude_expansion, trajectory_latitude_expansion = (
528-
pd.Series(),
529-
pd.Series(),
528+
pd.Series(dtype=float),
529+
pd.Series(dtype=float),
530530
)
531531

532532
row_index = 0 # index of the current trajectory; helper variable to compute the rows, that make up individual trajectories
@@ -675,8 +675,8 @@ def generate_pdf(
675675

676676
# reset the traj_expansion pandas series before next iteration
677677
trajectory_longitude_expansion, trajectory_latitude_expansion = (
678-
pd.Series(),
679-
pd.Series(),
678+
pd.Series(dtype=float),
679+
pd.Series(dtype=float),
680680
)
681681

682682
# analogous to case w/ side trajectories. compare there for reference.
@@ -799,7 +799,7 @@ def generate_pdf(
799799
)
800800
# reset the traj_expansion pandas series before next iteration
801801
trajectory_longitude_expansion, trajectory_latitude_expansion = (
802-
pd.Series(),
803-
pd.Series(),
802+
pd.Series(dtype=float),
803+
pd.Series(dtype=float),
804804
)
805805
return

0 commit comments

Comments
 (0)