pylab_ml.common.data.str2num

str2num(value, base=10, default='')[source]

translate str to numeric value.

if value start with 0x than it is a hex number. if value start with 0b than it is a binary number. if value = ‘’ -> set to default value