def nonzeroCoef(beta, bystep = False):
result = scipy.absolute(beta) > 0
if len(result.shape) == 1:
result = scipy.reshape(result, [result.shape[0], 1])
if not bystep:
result = scipy.any(result, axis = 1)
return(result)
# end of nonzeroCoef()
# =========================================
评论列表
文章目录