Re: Convert a scientific notation to decimal number, and still keeping the data format as float64

2019-10-22 Thread Richard Damon
more correct). >>> >>> But these are just choices of the implementers of the language, not >>> characteristics of the language itself. >> In Python 0.1 => 1e-05, so it just chooses a different point to >> switch from pure decimal to scientific no

Re: Convert a scientific notation to decimal number, and still keeping the data format as float64

2019-10-21 Thread doganadres
For me. The problem is solved. Thank you for your participation. -- https://mail.python.org/mailman/listinfo/python-list

Re: Convert a scientific notation to decimal number, and still keeping the data format as float64

2019-10-21 Thread Joel Goldstick
On Mon, Oct 21, 2019 at 4:59 PM Chris Angelico wrote: > > On Tue, Oct 22, 2019 at 7:41 AM wrote: > > > > They ought to have a reason to make the program switch from pure decimal to > > scientific notation representation. I don't know that reason. Getting along >

Re: Convert a scientific notation to decimal number, and still keeping the data format as float64

2019-10-21 Thread Chris Angelico
On Tue, Oct 22, 2019 at 7:41 AM wrote: > > They ought to have a reason to make the program switch from pure decimal to > scientific notation representation. I don't know that reason. Getting along > with it. > This is JUST a default display representation. Nothing more. I

Re: Convert a scientific notation to decimal number, and still keeping the data format as float64

2019-10-21 Thread doganadres
uage, not > > characteristics of the language itself. > > In Python 0.1 => 1e-05, so it just chooses a different point to > switch from pure decimal to scientific notation. > -- > Pieter van Oostrum > WWW: http://piet.vanoostrum.org/ > PGP key: [8DAE142BE17999C4] T

Re: Convert a scientific notation to decimal number, and still keeping the data format as float64

2019-10-21 Thread Piet van Oostrum
at the same time > maybe even more correct). > > But these are just choices of the implementers of the language, not > characteristics of the language itself. In Python 0.1 => 1e-05, so it just chooses a different point to switch from pure decimal to scientific notation. --

Re: Convert a scientific notation to decimal number, and still keeping the data format as float64

2019-10-21 Thread Piet van Oostrum
doganad...@gmail.com writes: > I dont know much about scala actually. I have just have tried to give > 0.0001 and it returned a presentation with an 'e' .whereas python takes > 0.0001 and gives 0.0001 . it made me think python is better in that > specific subject. > > However, python though starts

Re: Convert a scientific notation to decimal number, and still keeping the data format as float64

2019-10-20 Thread Joel Goldstick
On Sun, Oct 20, 2019 at 6:06 PM wrote: > > > my statement may seem unlogical while evaluating and comparing the languages > as a whole.. > > I thought when I give a small number into the programme , the more decimals I > can see after the dot as an output, the more human readable it is. > > when

Re: Convert a scientific notation to decimal number, and still keeping the data format as float64

2019-10-20 Thread doganadres
my statement may seem unlogical while evaluating and comparing the languages as a whole.. I thought when I give a small number into the programme , the more decimals I can see after the dot as an output, the more human readable it is. when I see a bunch of numbers with 'e' s I know the number

Re: Convert a scientific notation to decimal number, and still keeping the data format as float64

2019-10-20 Thread Piet van Oostrum
doganad...@gmail.com writes: > > In the meanwhile I have checked Scala , and it's more limited then Python. > As an example: > 0.0001 > 1.0E-4: Double > Why do you think this means Scala is more limited than Python? -- Piet van Oostrum WWW: http://piet.vanoostrum.org/ PGP key: [8DAE142BE17999C4]

Re: Convert a scientific notation to decimal number, and still keeping the data format as float64

2019-10-18 Thread Thomas Jollans
On 18/10/2019 10:35, doganad...@gmail.com wrote: Here is my question: I am using the numpy.std formula to calculate the standart deviation. However, the result comes as a number in scientific notation. Therefore I am asking, How to convert a scientific notation to decimal number, and still

Re: Convert a scientific notation to decimal number, and still keeping the data format as float64

2019-10-18 Thread doganadres
October 18, 2019 at 2:21:34 PM UTC+3, Richard Damon wrote: > >>>> On 10/18/19 4:35 AM, doganad...@gmail.com wrote: > >>>>> Here is my question: > >>>>> > >>>>> > >>>>> I am using the numpy.std formula to calculate

Re: Convert a scientific notation to decimal number, and still keeping the data format as float64

2019-10-18 Thread doganadres
On Friday, October 18, 2019 at 4:55:33 PM UTC+3, Chris Angelico wrote: > On Sat, Oct 19, 2019 at 12:51 AM wrote: > > By taking the default OUTPUT of a numpy formula, in my case standart > > deviation, I am using the advantage of saving the result into an excel file > > without any problems.(they

Re: Convert a scientific notation to decimal number, and still keeping the data format as float64

2019-10-18 Thread Richard Damon
4:35 AM, doganad...@gmail.com wrote: >>>>> Here is my question: >>>>> >>>>> >>>>> I am using the numpy.std formula to calculate the standart deviation. >>>>> However, the result comes as a number in scientific notation. >&

Re: Convert a scientific notation to decimal number, and still keeping the data format as float64

2019-10-18 Thread Chris Angelico
On Sat, Oct 19, 2019 at 12:51 AM wrote: > By taking the default OUTPUT of a numpy formula, in my case standart > deviation, I am using the advantage of saving the result into an excel file > without any problems.(they come as numpy.float64) From there, The excel takes > all the things as they a

Re: Convert a scientific notation to decimal number, and still keeping the data format as float64

2019-10-18 Thread doganadres
estion: > >>> > >>> > >>> I am using the numpy.std formula to calculate the standart deviation. > >>> However, the result comes as a number in scientific notation. > >>> Therefore I am asking, How to convert a scientific notation to deci

Re: Convert a scientific notation to decimal number, and still keeping the data format as float64

2019-10-18 Thread Richard Damon
ate the standart deviation. >>> However, the result comes as a number in scientific notation. >>> Therefore I am asking, How to convert a scientific notation to decimal >>> number, and still keep the data format as float64 ? >>> >>> Or is

Re: Convert a scientific notation to decimal number, and still keeping the data format as float64

2019-10-18 Thread Richard Damon
standart deviation. >>> However, the result comes as a number in scientific notation. >>> Therefore I am asking, How to convert a scientific notation to decimal >>> number, and still keep the data format as float64 ? >>> >>> Or is there any workaround to

Re: Convert a scientific notation to decimal number, and still keeping the data format as float64

2019-10-18 Thread doganadres
On Friday, October 18, 2019 at 2:21:34 PM UTC+3, Richard Damon wrote: > On 10/18/19 4:35 AM, doganad...@gmail.com wrote: > > Here is my question: > > > > > > I am using the numpy.std formula to calculate the standart deviation. > > However, the result comes a

Re: Convert a scientific notation to decimal number, and still keeping the data format as float64

2019-10-18 Thread doganadres
On Friday, October 18, 2019 at 2:46:42 PM UTC+3, Gys wrote: > On 10/18/19 10:35 AM, doganad...@gmail.com wrote: > > > > Here is my question: > > > > > > I am using the numpy.std formula to calculate the standart deviation. > > However, the result c

Re: Convert a scientific notation to decimal number, and still keeping the data format as float64

2019-10-18 Thread Gys
On 10/18/19 10:35 AM, doganad...@gmail.com wrote: Here is my question: I am using the numpy.std formula to calculate the standart deviation. However, the result comes as a number in scientific notation. Therefore I am asking, How to convert a scientific notation to decimal number, and still

Re: Convert a scientific notation to decimal number, and still keeping the data format as float64

2019-10-18 Thread Richard Damon
On 10/18/19 4:35 AM, doganad...@gmail.com wrote: > Here is my question: > > > I am using the numpy.std formula to calculate the standart deviation. > However, the result comes as a number in scientific notation. > Therefore I am asking, How to convert a scientific notation to

Convert a scientific notation to decimal number, and still keeping the data format as float64

2019-10-18 Thread doganadres
Here is my question: I am using the numpy.std formula to calculate the standart deviation. However, the result comes as a number in scientific notation. Therefore I am asking, How to convert a scientific notation to decimal number, and still keep the data format as float64 ? Or is there any

Re: Controlling number of zeros of exponent in scientific notation

2013-03-06 Thread Russ P.
One possibility is to form the string as usual, split on the "e", format each part separately, then rejoin with an "e". On Tuesday, March 5, 2013 12:09:10 PM UTC-8, fa...@squashclub.org wrote: > Instead of: > > > > 1.8e-04 > > > > I need: > > > > 1.8e-004 > > > > So two zeros before t

Re: Controlling number of zeros of exponent in scientific notation

2013-03-06 Thread jmfauth
On 6 mar, 15:03, Roy Smith wrote: > In article , > >  fa...@squashclub.org wrote: > > Instead of: > > > 1.8e-04 > > > I need: > > > 1.8e-004 > > > So two zeros before the 4, instead of the default 1. > > Just out of curiosity, what's the use case here? -- >>> from vecmat6 import * >>> from s

Re: Controlling number of zeros of exponent in scientific notation

2013-03-06 Thread Roy Smith
In article , fa...@squashclub.org wrote: > Instead of: > > 1.8e-04 > > I need: > > 1.8e-004 > > So two zeros before the 4, instead of the default 1. Just out of curiosity, what's the use case here? -- http://mail.python.org/mailman/listinfo/python-list

Re: Controlling number of zeros of exponent in scientific notation

2013-03-05 Thread Terry Reedy
On 3/5/2013 3:09 PM, fa...@squashclub.org wrote: Instead of: 1.8e-04 I need: 1.8e-004 So two zeros before the 4, instead of the default 1. The standard e and g float formats do not give you that kind of control over the exponent. You have to write code that forms the string you want. You can

Re: Controlling number of zeros of exponent in scientific notation

2013-03-05 Thread Dave Angel
On 03/05/2013 03:09 PM, fa...@squashclub.org wrote: Instead of: 1.8e-04 I need: 1.8e-004 So two zeros before the 4, instead of the default 1. You could insert a zero two characters before the end, num = "1.8e-04" num = num[:-2] + "0" + num[-2:] But to get closer to your problem, could yo

Controlling number of zeros of exponent in scientific notation

2013-03-05 Thread faraz
Instead of: 1.8e-04 I need: 1.8e-004 So two zeros before the 4, instead of the default 1. -- http://mail.python.org/mailman/listinfo/python-list

Re: scientific notation in legend (pylab)

2012-01-18 Thread Jason Friedman
> thank you, I am trying to learn python, but I am having a hard to find > a good introduction to it. Try this: http://docs.python.org/py3k/tutorial/ -- http://mail.python.org/mailman/listinfo/python-list

Re: scientific notation in legend (pylab)

2012-01-18 Thread simona bellavista
thank you, I am trying to learn python, but I am having a hard to find a good introduction to it. On Jan 15, 3:27 am, Jason Friedman wrote: > > Not sure why legend annotations makes the problem different, but > perhaps this is a start: -- http://mail.python.org/mailman/listinfo/python-list

Re: scientific notation in legend (pylab)

2012-01-14 Thread Jason Friedman
> I I would like to have numbers expressed in scientific notation in > legend annotations. Does anybody know how to do that? > Not sure why legend annotations makes the problem different, but perhaps this is a start: $ python3 Python 3.2 (r32:88445, Jun 11 2011, 10:38:04) [GCC 4.4.3]

scientific notation in legend (pylab)

2012-01-14 Thread simona bellavista
Hi, I I would like to have numbers expressed in scientific notation in legend annotations. Does anybody know how to do that? Cheers, S. -- http://mail.python.org/mailman/listinfo/python-list

RE: sorting items in a table problematic because of scientific notation

2009-05-04 Thread Davis, Amelie Y
Behalf Of Raymond Hettinger Sent: Wednesday, April 29, 2009 10:31 AM To: python-list@python.org Subject: Re: sorting items in a table problematic because of scientific notation [John Machin] > > 'NEAR_DIST'], [('N', 9, 0), ('N', 9, 0), ('F', 19, 1

Re: sorting items in a table problematic because of scientific notation

2009-04-29 Thread Raymond Hettinger
[John Machin] > > 'NEAR_DIST'], [('N', 9, 0), ('N', 9, 0), ('F', 19, 11)], [53, 55, ' > > The data type code for the offending column is "F" which is not in the > bog-standard dBase III set of C, N, D, and L. The code that you have used > merely > returns unchanged the character string that finds

Re: sorting items in a table problematic because of scientific notation

2009-04-29 Thread skip
>> Maybe string.ato[if] used to behave that way? John> Nope. ... OK, I remember what it was. The C atof()/atoi() functions will stop at the first non-numeric character. (I believe the more modern strtod/strtof functions behave the same way.) You could thus call atof(" 12345 ab

Re: sorting items in a table problematic because of scientific notation

2009-04-29 Thread John Machin
On 29/04/2009 11:33 PM, s...@pobox.com wrote: >> Thanks. Didn't used to be that way I don't think. Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>> float('1.23456789e+004 ') 12345.6

Re: sorting items in a table problematic because of scientific notation

2009-04-29 Thread skip
>> Thanks. Didn't used to be that way I don't think. Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>> float('1.23456789e+004 ') 12345.6789 John> :-) Maybe string.ato[if] used to

Re: sorting items in a table problematic because of scientific notation

2009-04-28 Thread John Machin
pobox.com> writes: > MRAB> FYI: > > >>> float(s) > 105646.365517 > > MRAB> which saves a few keystrokes. > > Thanks. Didn't used to be that way I don't think. Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32 Copyright 1991-1995 Stichting Mathemati

Re: sorting items in a table problematic because of scientific notation

2009-04-28 Thread John Machin
he table in and I need to sort it on a particular field but this > field has scientific notation in it and when I use the following command, it > seems to ignore the scientific notation which is very problematic outlist = > sorted(records, key=itemgetter(2)) .  > > I read > throu

Re: sorting items in a table problematic because of scientific notation

2009-04-28 Thread skip
MRAB> FYI: >>> float(s) 105646.365517 MRAB> which saves a few keystrokes. :-) Thanks. Didn't used to be that way I don't think. -- Skip Montanaro - s...@pobox.com - http://www.smontanaro.net/ "XML sucks, dictionaries rock" - Dave Beazley -- http://mail.python.org/mail

Re: sorting items in a table problematic because of scientific notation

2009-04-28 Thread MRAB
) to read the table Amélie> in and I need to sort it on a particular field but this field Amélie> has scientific notation in it and when I use the following Amélie> command, it seems to ignore the scientific notation which is Amélie> very problematic outlist = sorted(re

Re: sorting items in a table problematic because of scientific notation

2009-04-28 Thread MRAB
field has scientific notation in it and when I use the following command, it seems to ignore the scientific notation which is very problematic outlist = sorted(records, key=itemgetter(2)) . [snip] The field you're sorting on is actually a string. For example, '1' comes bef

Re: sorting items in a table problematic because of scientific notation

2009-04-28 Thread skip
Amélie> in and I need to sort it on a particular field but this field Amélie> has scientific notation in it and when I use the following Amélie> command, it seems to ignore the scientific notation which is Amélie> very problematic outlist = sorted(records, key=itemgetter(2

sorting items in a table problematic because of scientific notation

2009-04-28 Thread Davis, Amelie Y
tific notation in it and when I use the following command, it seems to ignore the scientific notation which is very problematic outlist = sorted(records, key=itemgetter(2)) . I read through the help and it says to use '%f' % to change the format but I'm not sure where to put that

Re: Unexpected scientific notation

2009-01-09 Thread Mark Dickinson
On Jan 9, 5:38 pm, Paul McNett wrote: > I'll clarify my LOL: Mark initially replied to me directly, to which I > responded > directly. Because he replied directly, I kept my response offline, too, not > knowing > if he had a special reason to discuss this offline instead of in public. Yup, def

Re: Unexpected scientific notation

2009-01-09 Thread Paul McNett
Paul McNett wrote: Mark Dickinson wrote: On Jan 8, 1:00 am, Paul McNett wrote: It displays '3E+1' instead of '30.0'. As I can't reproduce I'm looking for an idea brainstorm of what could be causing this. What would be choosing to display such a normal number in

Re: Unexpected scientific notation

2009-01-09 Thread Mark Dickinson
On Jan 9, 5:16 pm, Paul McNett wrote: > Thank you for the insight. I believe the problem is with my use of > normalize(), but I > still can't figure out why I can't reproduce the issue in my running app. Me neither. In particular, I can't see how it could this output could come out of a locale.

Re: Unexpected scientific notation

2009-01-09 Thread Paul McNett
Mark Dickinson wrote: On Jan 8, 1:00 am, Paul McNett wrote: It displays '3E+1' instead of '30.0'. As I can't reproduce I'm looking for an idea brainstorm of what could be causing this. What would be choosing to display such a normal number in scientific no

Re: Unexpected scientific notation

2009-01-09 Thread Mark Dickinson
On Jan 8, 1:00 am, Paul McNett wrote: > It displays '3E+1' instead of '30.0'. > > As I can't reproduce I'm looking for an idea brainstorm of what could be > causing > this. What would be choosing to display such a normal number in scientific > no

Replying to list messages (was: Unexpected scientific notation)

2009-01-07 Thread Ben Finney
Paul McNett writes: > [Some day hopefully I'll remember to change the to: address to > python-list@python.org instead of the original sender. Even better: Take full advantage of the standards-compliant messages from the list, by using the “Reply to list” function of your RFC 2369 compliant mail

Re: Unexpected scientific notation

2009-01-07 Thread Paul McNett
inney wrote: Paul McNett writes: The app bundles python 2.5.2 using py2exe. It displays '3E+1' instead of '30.0'. As I can't reproduce I'm looking for an idea brainstorm of what could be causing this. What would be choosing to display such a normal number in scien

Re: Unexpected scientific notation

2009-01-07 Thread Paul McNett
Robert Kern wrote: Paul McNett wrote: One of my users has reported that my app is giving them scientific notation instead of decimal notation for one specific value among many that display properly. I am unable to reproduce on my end, and this is the first I've heard of anything like

Re: Unexpected scientific notation

2009-01-07 Thread Ben Finney
Paul McNett writes: > The app bundles python 2.5.2 using py2exe. > > It displays '3E+1' instead of '30.0'. > > As I can't reproduce I'm looking for an idea brainstorm of what > could be causing this. What would be choosing to display such

Re: Unexpected scientific notation

2009-01-07 Thread Robert Kern
Paul McNett wrote: One of my users has reported that my app is giving them scientific notation instead of decimal notation for one specific value among many that display properly. I am unable to reproduce on my end, and this is the first I've heard of anything like this since the app

Unexpected scientific notation

2009-01-07 Thread Paul McNett
One of my users has reported that my app is giving them scientific notation instead of decimal notation for one specific value among many that display properly. I am unable to reproduce on my end, and this is the first I've heard of anything like this since the app's launch 2 years

Re: Scientific Notation

2005-12-04 Thread Dustan
Thanks for your help, Alex, Roy and Jorge. I'm new to Python, and programming in general, which might explain my lack of knowledge, Fredrick. -- http://mail.python.org/mailman/listinfo/python-list

Re: Scientific Notation

2005-12-04 Thread Fredrik Lundh
> > > You mean something like: > > > > > > >>> print '%e' % (1e50) > > > 1.00e+50 > > > > > > ...? > > > No, I mean given a big number, such as > > 100

Re: Scientific Notation

2005-12-03 Thread Jorge Godoy
"Dustan" <[EMAIL PROTECTED]> writes: > No, I mean given a big number, such as > 1000, convert it into > scientific notation. It's the same. >>> print "%e" % 10

Re: Scientific Notation

2005-12-03 Thread Alex Martelli
000000000 > 1.00e+51 Exactly: the "%e" builds a ``scientific-notation" string from whatever number you're formatting that way (big or small). You can also use %g if what you want is fixed-point notation within a certain range and scientific notations only for numb

Re: Scientific Notation

2005-12-03 Thread Roy Smith
In article <[EMAIL PROTECTED]>, "Dustan" <[EMAIL PROTECTED]> wrote: > 1000 >>> print "%e" % 1000 1.00e+51 -- http://mail.python.org/mailman/listinfo/python-list

Re: Scientific Notation

2005-12-03 Thread Dustan
No, I mean given a big number, such as 1000, convert it into scientific notation. -- http://mail.python.org/mailman/listinfo/python-list

Re: Scientific Notation

2005-12-03 Thread Alex Martelli
Dustan <[EMAIL PROTECTED]> wrote: > How can I get a number into scientific notation? I have a preference > for the format '1 E 50' (as an example), but if it's well known, it > works. You mean something like: >>> print '%e' % (1e50) 1.00e+5

Scientific Notation

2005-12-03 Thread Dustan
How can I get a number into scientific notation? I have a preference for the format '1 E 50' (as an example), but if it's well known, it works. -- http://mail.python.org/mailman/listinfo/python-list