Skip to content

Commit a923581

Browse files
fonnesbecktwiecki
authored andcommitted
Removed packaging dependency in data.py
1 parent 3ab4186 commit a923581

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pymc/data.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
from aesara.graph.basic import Apply
3232
from aesara.tensor.type import TensorType
3333
from aesara.tensor.var import TensorConstant, TensorVariable
34-
from packaging import version
3534

3635
import pymc as pm
3736

@@ -635,8 +634,8 @@ def Data(
635634
arr = pandas_to_array(value)
636635

637636
if mutable is None:
638-
current = version.Version(pm.__version__)
639-
mutable = current.major == 4 and current.minor < 1
637+
major, minor = [int(v) for v in pm.__version__.split(".")[:2]]
638+
mutable = major == 4 and minor < 1
640639
if mutable:
641640
warnings.warn(
642641
"The `mutable` kwarg was not specified. Currently it defaults to `pm.Data(mutable=True)`,"

0 commit comments

Comments
 (0)