logistic regression using numpy