Skip to content

Commit 7ebc88b

Browse files
committed
fix: python 2 support
1 parent 043e7e9 commit 7ebc88b

File tree

1 file changed

+7
-0
lines changed
  • src/boost_histogram/_internal

1 file changed

+7
-0
lines changed

src/boost_histogram/_internal/axis.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from .six import string_types
1111

1212
import copy
13+
1314
from typing import Dict, Any, TYPE_CHECKING
1415

1516
del absolute_import, division, print_function
@@ -53,6 +54,12 @@ def __copy__(self):
5354
other._ax = copy.copy(self._ax)
5455
return other
5556

57+
def __setstate__(self, state):
58+
self._ax = state["_ax"]
59+
60+
def __getstate__(self):
61+
return {"_ax": self._ax}
62+
5663
def __getattr__(self, item):
5764
if item == "_ax":
5865
return Axis.__dict__[item].__get__(self)

0 commit comments

Comments
 (0)