def vmul(vect, s):
    """
    This function returns the vector result of multiplying each entries of a vector by a scalar. Works also for flat matrices
    
    :param vect: the vector to be multiplied with the scalar value
    :param s: the scalar value
    :type vect: double or integer iterable
    :type s: double or integer
    :return: The resulting vector s(vect1)
    :rtype: double iterable

    """
    ret=[]
    for x in vect:
        ret.append(x*s)
    return ret