Skip to content

Commit

Permalink
MNT: Fix meteogram example for numpy 2
Browse files Browse the repository at this point in the history
No longer need the decode() call.
  • Loading branch information
dopplershift committed Aug 22, 2024
1 parent 2329aa4 commit 5b5617d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/meteogram_metpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def plot_pressure(self, p, plot_range=None):

# Parse dates from .csv file, knowing their format as a string and convert to datetime
def parse_date(date):
return dt.datetime.strptime(date.decode('ascii'), '%Y-%m-%d %H:%M:%S')
return dt.datetime.strptime(date, '%Y-%m-%d %H:%M:%S')


testdata = np.genfromtxt(get_test_data('timeseries.csv', False), names=True, dtype=None,
Expand Down

0 comments on commit 5b5617d

Please sign in to comment.