diff --git a/src/boost_histogram/__init__.py b/src/boost_histogram/__init__.py index 145d12c0..093b0f92 100644 --- a/src/boost_histogram/__init__.py +++ b/src/boost_histogram/__init__.py @@ -32,16 +32,16 @@ "Histogram", "IndexingExpr", "Kind", - "axis", - "storage", + "__version__", "accumulators", - "numpy", + "axis", "loc", + "numpy", + "overflow", "rebin", + "storage", "sum", "underflow", - "overflow", - "__version__", ) diff --git a/src/boost_histogram/_internal/axis.py b/src/boost_histogram/_internal/axis.py index aa519c27..201bc68a 100644 --- a/src/boost_histogram/_internal/axis.py +++ b/src/boost_histogram/_internal/axis.py @@ -38,7 +38,7 @@ def _opts(**kwargs: bool) -> set[str]: # Contains common methods and properties to all axes @set_module("boost_histogram.axis") class Axis: - __slots__ = ("_ax", "__dict__") + __slots__ = ("__dict__", "_ax") _family: object def __init_subclass__(cls, *, family: object) -> None: diff --git a/src/boost_histogram/_internal/hist.py b/src/boost_histogram/_internal/hist.py index 9dc5b906..799060b2 100644 --- a/src/boost_histogram/_internal/hist.py +++ b/src/boost_histogram/_internal/hist.py @@ -136,9 +136,9 @@ def _expand_ellipsis(indexes: Iterable[Any], rank: int) -> list[Any]: class Histogram: # Note this is a __slots__ __dict__ class! __slots__ = ( + "__dict__", "_hist", "axes", - "__dict__", ) # .metadata and ._variance_known are part of the dict diff --git a/src/boost_histogram/_internal/typing.py b/src/boost_histogram/_internal/typing.py index d44268af..817bfcd7 100644 --- a/src/boost_histogram/_internal/typing.py +++ b/src/boost_histogram/_internal/typing.py @@ -20,12 +20,12 @@ __all__ = ( - "CppHistogram", - "AxisLike", "ArrayLike", - "Ufunc", + "AxisLike", + "CppHistogram", "StdIndex", "StrIndex", + "Ufunc", ) diff --git a/src/boost_histogram/accumulators.py b/src/boost_histogram/accumulators.py index 548a1e8e..c3294587 100644 --- a/src/boost_histogram/accumulators.py +++ b/src/boost_histogram/accumulators.py @@ -8,7 +8,7 @@ ) from ._internal.typing import Accumulator -__all__ = ("Sum", "Mean", "WeightedSum", "WeightedMean", "Accumulator") +__all__ = ("Accumulator", "Mean", "Sum", "WeightedMean", "WeightedSum") for cls in (Sum, Mean, WeightedSum, WeightedMean): cls.__module__ = "boost_histogram.accumulators" diff --git a/src/boost_histogram/axis/__init__.py b/src/boost_histogram/axis/__init__.py index 78dfee34..454e8966 100644 --- a/src/boost_histogram/axis/__init__.py +++ b/src/boost_histogram/axis/__init__.py @@ -14,15 +14,15 @@ from . import transform __all__ = ( - "Regular", - "Variable", - "Integer", + "ArrayTuple", + "AxesTuple", + "Axis", + "Boolean", "IntCategory", + "Integer", + "Regular", "StrCategory", - "Boolean", - "Axis", "Traits", + "Variable", "transform", - "ArrayTuple", - "AxesTuple", ) diff --git a/src/boost_histogram/axis/transform.py b/src/boost_histogram/axis/transform.py index 3c80ec02..733d268b 100644 --- a/src/boost_histogram/axis/transform.py +++ b/src/boost_histogram/axis/transform.py @@ -7,7 +7,7 @@ _internal_conversion, ) -__all__ = ("AxisTransform", "Pow", "Function", "sqrt", "log") +__all__ = ("AxisTransform", "Function", "Pow", "log", "sqrt") sqrt = Function("_sqrt_fn", "_sq_fn", convert=_internal_conversion, name="sqrt") log = Function("_log_fn", "_exp_fn", convert=_internal_conversion, name="log") diff --git a/src/boost_histogram/storage.py b/src/boost_histogram/storage.py index 8061099f..b450f5d2 100644 --- a/src/boost_histogram/storage.py +++ b/src/boost_histogram/storage.py @@ -12,12 +12,12 @@ ) __all__ = ( - "Storage", - "Int64", - "Double", "AtomicInt64", + "Double", + "Int64", + "Mean", + "Storage", "Unlimited", "Weight", - "Mean", "WeightedMean", ) diff --git a/src/boost_histogram/tag.py b/src/boost_histogram/tag.py index fa4154e1..5b54c990 100644 --- a/src/boost_histogram/tag.py +++ b/src/boost_histogram/tag.py @@ -11,7 +11,7 @@ from ._internal.typing import AxisLike -__all__ = ("Slicer", "Locator", "at", "loc", "overflow", "underflow", "rebin", "sum") +__all__ = ("Locator", "Slicer", "at", "loc", "overflow", "rebin", "sum", "underflow") class Slicer: