[Numpy-discussion] numpy.fromstring() : error handling ?

oc-spam66 oc-spam66@laposte....
Fri Aug 8 20:11:41 CDT 2008

> > Shouldn't it raise an exception ValueError ? (because "abcd" is not a float)
> I don't think so, but it shouldn't return a zero either.
> That call should mean: scan this whitespace separated string for as many 
> floating point numbers as it has. There are none, so it should return 
> and empty array:

Is it really how it should be ? 

I thought this method should be restrictive in what it accepts (because the goal is to fill an array with precise dimensions). When floating point numbers are mixed with something else, it should be parsed with a regexp.

 Créez votre adresse électronique prenom.nom@laposte.net 
 1 Go d'espace de stockage, anti-spam et anti-virus intégrés.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080809/9051d041/attachment.html 

More information about the Numpy-discussion mailing list