def get_row_nnz(mat, row):
 return (mat.indptr[(row + 1)] - mat.indptr[row])

def get_row_nnz ( mat , row ) : return ( mat . indptr [ ( row + 1 ) ] - mat . indptr [ row ] )
return the number of nonzeros in row .