Reprs in Jupyter#
Hist has custom reprs when displaying in a Jupyter.
[1]:
import numpy as np
from hist import Hist
[2]:
Hist.new.Reg(50, 1, 2).Double().fill(np.random.normal(1.5, 0.3, 10_000))
[2]:
Regular(50, 1, 2, label='Axis 0')
Double() Σ=9041.0 (10000.0 with flow)
Double() Σ=9041.0 (10000.0 with flow)
[3]:
Hist.new.Reg(50, 0, 2 * 3, circular=True).Double().fill(
np.random.normal(1.5, 0.7, 10_000)
)
[3]:
Regular(50, 0, 6, circular=True, label='Axis 0')
Double() Σ=10000.0
Double() Σ=10000.0
[4]:
Hist.new.Reg(50, 0, 2).Reg(50, 10, 20).Double().fill(
np.random.normal(1, 0.5, 10_000), np.random.normal(15, 3, 10_000)
)
[4]:
Regular(50, 0, 2, label='Axis 0')
Regular(50, 10, 20, label='Axis 1')
Double() Σ=8621.0 (10000.0 with flow)
Regular(50, 10, 20, label='Axis 1')
Double() Σ=8621.0 (10000.0 with flow)
[5]:
Hist.new.Reg(50, 0, 2).Reg(50, 10, 20).Reg(2, 3, 4).Double()
[5]:
Hist(
Regular(50, 0, 2, label='Axis 0'),
Regular(50, 10, 20, label='Axis 1'),
Regular(2, 3, 4, label='Axis 2'),
storage=Double())