<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def Corr(poly, dist=None, **kws):
 """ Correlation matrix of a distribution or polynomial. Args: poly (Poly, Dist):
 Input to take correlation on. Must have ``len(poly)>=2``. dist (Dist):
 Defines the space the correlation is taken on. It is ignored if ``poly`` is a distribution. Returns: (numpy.ndarray):
 Correlation matrix with ``correlation.shape == poly.shape+poly.shape``. Examples: [[1. 0.3536] [0.3536 1. ]] [[1. 0.] [0. 1.]] """

    if isinstance(poly, distributions.Dist):
        poly, dist = polynomials.variable(len(poly)), poly
    else:
        poly = polynomials.Poly(poly)

    cov = Cov(poly, dist, **kws)
    var = numpy.diag(cov)
    vvar = numpy.sqrt(numpy.outer(var, var))
    return numpy.where(vvar > 0, cov/vvar, 0)