import math


def mean_stddev(array):
    """Compute the mean (average) and standard deviation of a numerical array.
    """
    total = 0
    count = 0
    for elem in array:
        if elem is not None:
            total += elem
            count += 1
    mean = total / count if count > 0 else 0

    total = 0
    for elem in array:
        if elem is not None:
            elem = elem - mean
            total += elem * elem
    stddev = math.sqrt(total / count) if count > 0 else 0

    return mean, stddev