def check_bernstein_copula(est_copula):
    """
    Check if an estimated distribution of kind EmpiricalBernstein
    is of type copula and all marginals are also.
    """
    print('Is estimation a copula ? --> ', est_copula.isCopula())
    print('Maginal checking')
    dimension = est_copula.getDimension()
    for d in range(dimension):
        print('Is marginal %d a copula ? --> %s' % (d, est_copula.isCopula()))
