gammapy.utils
is a collection of utility functions that are used in many places or don't fit in one of the other packages.
Since the various sub-modules of gammapy.utils
are mostly unrelated, they are not imported into the top-level namespace. Here are some examples of how to import functionality from the gammapy.utils
sub-modules:
from gammapy.utils.random import sample_sphere
sample_sphere(size=10)
from gammapy.utils import random
random.sample_sphere(size=10)
gammapy.utils.coordinates
gammapy.utils.const
gammapy.utils.fits
gammapy.utils.region
gammapy.utils.root
gammapy.utils.random
gammapy.utils.distributions
gammapy.utils.pyfact
gammapy.utils.scripts
gammapy.utils.testing
gammapy.utils.time