def meanColor(c):
    """Calculate mean of nnz values in array.

    Args:
        c (array): Array for which to calculate mean.

    Returns:
        Mean of non zero values in c.
    """
    nnz_total = (c > 0).sum()
    if nnz_total == 0:
        return 0

    return c.sum()/nnz_total