Skip to content

Commit

Permalink
Use try statement in datashader import
Browse files Browse the repository at this point in the history
  • Loading branch information
fanshi118 authored and brandonwillard committed Jan 21, 2022
1 parent a90b139 commit 087c03a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pymc3_hmm/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from typing import Any, Callable, Dict, List, Optional, Sequence, Text, Tuple, Union

import datashader as ds
import datashader.transfer_functions as tf
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
Expand All @@ -21,6 +19,12 @@
from theano.tensor.extra_ops import broadcast_to as at_broadcast_to
from theano.tensor.var import TensorVariable

try: # pragma: no cover
import datashader as ds
import datashader.transfer_functions as tf
except ImportError: # pragma: no cover
pass


vsearchsorted = np.vectorize(np.searchsorted, otypes=[int], signature="(n),()->()")

Expand Down

0 comments on commit 087c03a

Please sign in to comment.