Skip to content

Commit

Permalink
Change numpy.int to Python int in random_oil_spills
Browse files Browse the repository at this point in the history
Switched from using numpy.int() to Python's inbuilt int() to typecast the
time_period total seconds in the random_oil_spills module. This change is
necessary due to the deprecation of numpy.int in NumPy=1.20.

re: issue #39
  • Loading branch information
douglatornell committed Aug 30, 2023
1 parent c8fdf9c commit d36cad5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion moad_tools/midoss/random_oil_spills.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def get_date(start_date, end_date, vte_probability, random_generator):
# Now that month is selected, we need to choose day, year, and time.
# We weight these all the same.
time_period = end_date - start_date
time_period_inhours = numpy.int(time_period.total_seconds() / 3600)
time_period_inhours = int(time_period.total_seconds() / 3600)
date_arr = [
start_date + timedelta(hours=i) for i in range(0, time_period_inhours + 1)
]
Expand Down

0 comments on commit d36cad5

Please sign in to comment.