def alinexand (a,columnlist,valuelist):
        if type(columnlist) not in [ListType,TupleType,N.ndarray]:
            columnlist = [columnlist]
        if type(valuelist) not in [ListType,TupleType,N.ndarray]:
            valuelist = [valuelist]
        criterion = ''
        for i in range(len(columnlist)):
            if type(valuelist[i])==StringType:
                critval = '\'' + valuelist[i] + '\''
            else:
                critval = str(valuelist[i])
            criterion = criterion + ' x['+str(columnlist[i])+']=='+critval+' and'
        criterion = criterion[0:-3]         # remove the "and" after the last crit
        return adm(a,criterion)
Returns the rows of an array where col (from columnlist) = val
dataset/ETHPy150Open sunlightlabs/clearspending/completeness/statlib/pstat.py/alinexand