"""
This module implements the class `truncated_gaussian` which 
performs (conditional) UMPU tests for Gaussians
restricted to a set of intervals.

"""
import numpy as np
from ..distributions.pvalue import (norm_pdf, 
                                    truncnorm_cdf, 
                                    norm_q,
                                    norm_interval,
                                    mp)

from scipy.stats import norm as ndist
from .base import truncated, find_root

class truncated_gaussian(truncated):

    """
    >>> from intervals import intervals
    >>> I = intervals.intersection(intervals((-1, 6)), \
                                       intervals(( 0, 7)), \