def logistic_log_partial_ij(x_i, y_i, beta, j):
 return ((y_i - logistic(dot(x_i, beta))) * x_i[j])

def logistic_log_partial_ij ( x_i , y_i , beta , j ) : return ( ( y_i - logistic ( dot ( x_i , beta ) ) ) * x_i [ j ] )
here i is the index of the data point .