Skip to content

Commit a133f08

Browse files
authored
feat: provide AxesTuple in public location (#419)
1 parent 66aa5e2 commit a133f08

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/boost_histogram/_internal/axistuple.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
from __future__ import absolute_import, division, print_function
33

44
from .axis import Axis
5+
from .utils import set_module
56

67
import numpy as np
78

89
del absolute_import, division, print_function
910

1011

12+
@set_module("boost_histogram.axis")
1113
class ArrayTuple(tuple):
1214
__slots__ = ()
1315

@@ -29,6 +31,7 @@ def broadcast(self):
2931
return self.__class__(np.broadcast_arrays(*self))
3032

3133

34+
@set_module("boost_histogram.axis")
3235
class AxesTuple(tuple):
3336
__slots__ = ()
3437
_MGRIDOPTS = {"sparse": True, "indexing": "ij"}

src/boost_histogram/axis/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
StrCategory,
1111
Boolean,
1212
)
13+
from .._internal.axistuple import ArrayTuple, AxesTuple
1314
from .._core.axis import options
1415
from . import transform
1516

@@ -25,4 +26,6 @@
2526
"Axis",
2627
"options",
2728
"transform",
29+
"ArrayTuple",
30+
"AxesTuple",
2831
)

0 commit comments

Comments
 (0)