Serialization error when plotting timedeltas values

When trying to plot timedelta values on the y-axis, I am running into the following serialization error:

File “/Users/jmartini/.virtualenvs/test/lib/python3.7/site-packages/_plotly_utils/”, line 116, in default
return _json.JSONEncoder.default(self, obj)
File “/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/”, line 179, in default
raise TypeError(f’Object of type {} ’
TypeError: Object of type timedelta is not JSON serializable

Here is some simple code that reproduces the error:
import dash
import dash_core_components as dcc
import dash_html_components as html
import plotly.graph_objs as go
import numpy as np
import datetime

x_date = [np.datetime64(datetime.datetime.utcnow()), 
    np.datetime64(datetime.datetime.utcnow()) - np.datetime64('1', 'D')]

y_times = [datetime.timedelta(hours=1), datetime.timedelta(hours=2)]

external_stylesheets = ['']
app = dash.Dash(__name__, external_stylesheets=external_stylesheets)

app.layout = html.Div(children=[
    html.H1(children='PR Open Time'),

            'data': [go.Scatter(
                mode='  markers')

What is the correct way to plot timedelta objects using dash?

Thank you!