def imf(m):
    ''' 
    Returns
    -------
    N(M)dM
        for given mass according to Kroupa IMF, vectorization
        available via vimf() 

    '''

    m1 = 0.08; m2 = 0.50
    a1 = 0.30; a2 = 1.30; a3 = 2.3
    const2 = m1**-a1 -m1**-a2 
    const3 = m2**-a2 -m2**-a3 

    if m < 0.08:
        alpha = 0.3
        const = -const2 -const3
    elif m < 0.50:
        alpha = 1.3
        const = -const3
    else:
        alpha = 2.3
        const = 0.0
    # print m,alpha, const, m**-alpha + const 
    return m**-alpha + const
Returns
    -------
    N(M)dM
        for given mass according to Kroupa IMF, vectorization
        available via vimf()