def valarray(shape, value=nan, typecode=None):
    """Return an array of all value.
    """
    return np.full(shape, value, dtype=typecode)