def add_ones(a):
    """Adds a column of 1s at the end of the array"""
    arr = N.ones((a.shape[0],a.shape[1]+1))
    arr[:,:-1] = a
    return arr
def add_ones ( a ) : arr = N . ones ( ( a . shape [ 0 ] , a . shape [ 1 ] + 1 ) ) arr [ : , : - 1 ] = a return arr
Adds a column of 1s at the end of the array