O tempora, o mores! Nowadays someone who is doing 'logistic regression' with numpy, matplotlib and mpl_toolkits is a beginner...
But on more serious note - did you read the documentation till end? The last example is probably something you are looking for:
But on more serious note - did you read the documentation till end? The last example is probably something you are looking for:
>>> s = StringIO('10.01 31.25-\n19.22 64.31\n17.57- 63.94') >>> def conv(fld): ... return -float(fld[:-1]) if fld.endswith(b'-') else float(fld) ... >>> np.loadtxt(s, converters={0: conv, 1: conv}) array([[ 10.01, -31.25], [ 19.22, 64.31], [-17.57, 63.94]])You could write similar helper function to convert last column values to 0 or 1 based on condition.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.