I am trying to read a large amount of data that is output in scientific
notation using D instead of E. After searching around I found a thread that
implied numpy already has the capability to do this:
http://stackoverflow.com/questions/1959210/python-scientific-notation-using-d-instead-of-e
On Fri, Feb 12, 2010 at 10:46 AM, Robert C. ricit...@mac.com wrote:
I am trying to read a large amount of data that is output in scientific
notation using D instead of E. After searching around I found a thread that
implied numpy already has the capability to do this:
On Fri, Feb 12, 2010 at 11:03 AM, josef.p...@gmail.com wrote:
On Fri, Feb 12, 2010 at 10:46 AM, Robert C. ricit...@mac.com wrote:
I am trying to read a large amount of data that is output in scientific
notation using D instead of E. After searching around I found a thread that
implied numpy
josef.p...@gmail.com wrote:
On Fri, Feb 12, 2010 at 11:03 AM, josef.p...@gmail.com wrote:
On Fri, Feb 12, 2010 at 10:46 AM, Robert C. ricit...@mac.com wrote:
I am trying to read a large amount of data that is output in scientific
notation using D instead of E. After searching around
On Fri, Feb 12, 2010 at 10:05, josef.p...@gmail.com wrote:
On Fri, Feb 12, 2010 at 11:03 AM, josef.p...@gmail.com wrote:
np.float('1.5698D+03')
1569.8
np.float('1.23D+04')
12300.0
it's still working with numpy 1.4.0
maybe this is a python feature with python builtin float:
Thank you for the replies. It must be because I am using python on OSX. Is
there no work around for it then?
Robert Kern-2 wrote:
On Fri, Feb 12, 2010 at 10:05, josef.p...@gmail.com wrote:
On Fri, Feb 12, 2010 at 11:03 AM, josef.p...@gmail.com wrote:
np.float('1.5698D+03')
1569.8
Robert Kern wrote:
numpy.float is indeed Python's builtin float type (for obscure
historical reasons that I won't go into). However, in Python 2.5, at
least, the parsing of the string is offloaded to the standard C
function strtod().
well, sort of -- it's pre-processed first, to add some
On Fri, Feb 12, 2010 at 11:27, Christopher Barker chris.bar...@noaa.gov wrote:
Robert Kern wrote:
numpy.float is indeed Python's builtin float type (for obscure
historical reasons that I won't go into). However, in Python 2.5, at
least, the parsing of the string is offloaded to the standard C
Robert Kern wrote:
Eh, what? numpy.float is Python's float. No numpy features at all.
my mistake -- I guess I assumed that numpy.float was an alias for
numpy.float64.
anyway, the (all?) the numpy dtypes have their own implementation of
conversion from strings (which are a bit buggy,