Re: Quick poll: gmean or geometric_mean

2016-07-13 Thread alister
On Tue, 12 Jul 2016 18:42:44 -0700, Lawrence D’Oliveiro wrote: > On Wednesday, July 13, 2016 at 10:58:14 AM UTC+12, alister wrote: > >> a US gallon is smaller than an Imperial Gallon a US Mile is shorter >> than an Imperial mile and probably most importantly (because it means >> they keep serving

Re: Quick poll: gmean or geometric_mean

2016-07-12 Thread Steven D'Aprano
On Wed, 13 Jul 2016 08:57 am, alister wrote: > a US gallon is smaller than an Imperial Gallon > a US Mile is shorter than an Imperial mile > and probably most importantly (because it means they keep serving me > short measures) a US pint is smaller than an Imperial Pint That's okay, they charge y

Re: Quick poll: gmean or geometric_mean

2016-07-12 Thread Gene Heskett
On Tuesday 12 July 2016 21:42:44 Lawrence D’Oliveiro wrote: > On Wednesday, July 13, 2016 at 10:58:14 AM UTC+12, alister wrote: > > a US gallon is smaller than an Imperial Gallon > > a US Mile is shorter than an Imperial mile > > and probably most importantly (because it means they keep serving me

Re: Quick poll: gmean or geometric_mean

2016-07-12 Thread Lawrence D’Oliveiro
On Wednesday, July 13, 2016 at 10:58:14 AM UTC+12, alister wrote: > a US gallon is smaller than an Imperial Gallon > a US Mile is shorter than an Imperial mile > and probably most importantly (because it means they keep serving me > short measures) a US pint is smaller than an Imperial Pint I th

Re: Quick poll: gmean or geometric_mean

2016-07-12 Thread alister
On Tue, 12 Jul 2016 15:17:58 -0700, Lawrence D’Oliveiro wrote: > On Monday, July 11, 2016 at 5:16:53 AM UTC+12, Ian wrote: > >> For local variables I usually wouldn't bother with the units, but in >> general it's a good practice to help avoid crashing your orbiter into >> Mars. > > The Mars Clim

Re: Quick poll: gmean or geometric_mean

2016-07-12 Thread Lawrence D’Oliveiro
On Monday, July 11, 2016 at 2:30:00 AM UTC+12, Rustom Mody wrote: > Force is given by the negative of the universal_gravitational_constant times > the mass_of_first_body times mass_of_second_body divided by the square of > the distance_between_the_bodies > > Cobol anyone? Look at it this way: th

Re: Quick poll: gmean or geometric_mean

2016-07-12 Thread Lawrence D’Oliveiro
On Monday, July 11, 2016 at 5:16:53 AM UTC+12, Ian wrote: > For local variables I usually wouldn't bother with the units, but in > general it's a good practice to help avoid crashing your orbiter into > Mars. The Mars Climate Orbiter fiasco wasn’t a problem with using the wrong units (dimensiona

Re: Quick poll: gmean or geometric_mean

2016-07-12 Thread Chris Angelico
On Wed, Jul 13, 2016 at 8:13 AM, Lawrence D’Oliveiro wrote: > On Saturday, July 9, 2016 at 9:05:18 PM UTC+12, Peter Otten wrote: > >> Life's too short for abbreviations. > > Why is there no abbreviation for “abbreviation”? > > Let me propose “brev”. Nice and ... um ... abbreviated. abbr? ChrisA

Re: Quick poll: gmean or geometric_mean

2016-07-12 Thread Lawrence D’Oliveiro
On Saturday, July 9, 2016 at 9:05:18 PM UTC+12, Peter Otten wrote: > Life's too short for abbreviations. Why is there no abbreviation for “abbreviation”? Let me propose “brev”. Nice and ... um ... abbreviated. -- https://mail.python.org/mailman/listinfo/python-list

Re: Quick poll: gmean or geometric_mean

2016-07-10 Thread Ian Kelly
On Sun, Jul 10, 2016 at 9:03 AM, Marko Rauhamaa wrote: > Ian Kelly : > >> That's still excessive by any reasonable standards. Names should be >> descriptive, but no more verbose than necessary. How about: >> >> force_N = -G * mass1_kg * mass2_kg / distance_m ** 2 > > Why bother with tagging the na

Re: Quick poll: gmean or geometric_mean

2016-07-10 Thread Random832
On Sun, Jul 10, 2016, at 10:55, Ian Kelly wrote: > force_N = -G * mass1_kg * mass2_kg / distance_m ** 2 > > I'm fine with "G" as is because it's the standard name for the value > in physics contexts, and it's presumably defined in the code as a > constant. It's every bit as clear as "pi". Shouldn

Re: Quick poll: gmean or geometric_mean

2016-07-10 Thread Michael Selik
On Sun, Jul 10, 2016, 5:08 AM Chris Angelico wrote: > On Sun, Jul 10, 2016 at 8:08 PM, Steven D'Aprano > wrote: > >> Now even the basic IPython shell has autocomplete :-) > > > > Not all shells or editors are IPython, and not all abbreviations are bad. > > Would you rather print, or > > write_va

Re: Quick poll: gmean or geometric_mean

2016-07-10 Thread Marko Rauhamaa
Ian Kelly : > That's still excessive by any reasonable standards. Names should be > descriptive, but no more verbose than necessary. How about: > > force_N = -G * mass1_kg * mass2_kg / distance_m ** 2 Why bother with tagging the names with standard units? Somewhat related: Many programming frame

Re: Quick poll: gmean or geometric_mean

2016-07-10 Thread Ian Kelly
On Sun, Jul 10, 2016 at 2:01 AM, Jussi Piitulainen wrote: > Ian Kelly writes: > >> On Sat, Jul 9, 2016 at 3:45 PM, Chris Angelico wrote: >>> On Sat, Jul 9, 2016 at 3:26 PM, Steven D'Aprano wrote: I'd like to get a quick show of hands regarding the names. Which do you prefer?

Re: Quick poll: gmean or geometric_mean

2016-07-10 Thread Ian Kelly
On Sun, Jul 10, 2016 at 8:29 AM, Rustom Mody wrote: > Newton's law F = -Gm₁m₂/r² > > Better seen in its normal math form: > https://en.wikipedia.org/wiki/Newton%27s_law_of_universal_gravitation#Modern_form > > De-abbreviated > > Force is given by the negative of the universal_gravitational_constan

Re: Quick poll: gmean or geometric_mean

2016-07-10 Thread Rustom Mody
On Sunday, July 10, 2016 at 8:00:00 PM UTC+5:30, Rustom Mody wrote: > Newton's law F = -Gm₁m₂/r² > > Better seen in its normal math form: > https://en.wikipedia.org/wiki/Newton%27s_law_of_universal_gravitation#Modern_form > > De-abbreviated > > Force is given by the negative of the universal_gra

Re: Quick poll: gmean or geometric_mean

2016-07-10 Thread Rustom Mody
On Sunday, July 10, 2016 at 3:39:02 PM UTC+5:30, Steven D'Aprano wrote: > On Sun, 10 Jul 2016 07:24 pm, Michael Selik wrote: > > > On Sun, Jul 10, 2016, 4:56 AM Steven D'Aprano wrote: > > > >> On Sun, 10 Jul 2016 05:28 pm, Rustom Mody wrote: > >> > >> > From fuzzy memory of sitting in statistics

Re: Quick poll: gmean or geometric_mean

2016-07-10 Thread Chris Angelico
On Sun, Jul 10, 2016 at 8:08 PM, Steven D'Aprano wrote: >> Now even the basic IPython shell has autocomplete :-) > > Not all shells or editors are IPython, and not all abbreviations are bad. > Would you rather print, or > write_values_as_strings_to_the_predefined_standard_output_file? Also: Inter

Re: Quick poll: gmean or geometric_mean

2016-07-10 Thread Steven D'Aprano
On Sun, 10 Jul 2016 07:24 pm, Michael Selik wrote: > On Sun, Jul 10, 2016, 4:56 AM Steven D'Aprano wrote: > >> On Sun, 10 Jul 2016 05:28 pm, Rustom Mody wrote: >> >> > From fuzzy memory of sitting in statistics classes decades ago >> > filled with μ-σ etc I'd suggest μ gμ hμ >> >> In all the sta

Re: Quick poll: gmean or geometric_mean

2016-07-10 Thread Michael Selik
On Sun, Jul 10, 2016, 4:56 AM Steven D'Aprano wrote: > On Sun, 10 Jul 2016 05:28 pm, Rustom Mody wrote: > > > From fuzzy memory of sitting in statistics classes decades ago > > filled with μ-σ etc I'd suggest μ gμ hμ > > In all the stats books and references I've seen, μ is always the population

Re: Quick poll: gmean or geometric_mean

2016-07-10 Thread Steven D'Aprano
On Sun, 10 Jul 2016 05:28 pm, Rustom Mody wrote: > From fuzzy memory of sitting in statistics classes decades ago > filled with μ-σ etc I'd suggest μ gμ hμ In all the stats books and references I've seen, μ is always the population mean (implicitly the arithmetic mean). When discussing the differ

Re: Quick poll: gmean or geometric_mean

2016-07-10 Thread Jussi Piitulainen
Ian Kelly writes: > On Sat, Jul 9, 2016 at 3:45 PM, Chris Angelico wrote: >> On Sat, Jul 9, 2016 at 3:26 PM, Steven D'Aprano wrote: >>> I'd like to get a quick show of hands regarding the names. Which do you >>> prefer? >>> >>> hmean and gmean >>> >>> harmonic_mean and geometric_mean >> >> I'd

Re: Quick poll: gmean or geometric_mean

2016-07-10 Thread Rustom Mody
On Saturday, July 9, 2016 at 10:56:27 AM UTC+5:30, Steven D'Aprano wrote: > As requested in issue 27181 on the bug tracker, I'm adding functions to > calculate the harmonic and geometric means to the statistics module. > > I'd like to get a quick show of hands regarding the names. Which do you > p

Re: Quick poll: gmean or geometric_mean

2016-07-10 Thread Ian Kelly
On Sat, Jul 9, 2016 at 3:45 PM, Chris Angelico wrote: > On Sat, Jul 9, 2016 at 3:26 PM, Steven D'Aprano wrote: >> I'd like to get a quick show of hands regarding the names. Which do you >> prefer? >> >> hmean and gmean >> >> harmonic_mean and geometric_mean > > I'd prefer the shorter names. I'd

Re: Quick poll: gmean or geometric_mean

2016-07-09 Thread Chris Angelico
On Sat, Jul 9, 2016 at 3:26 PM, Steven D'Aprano wrote: > I'd like to get a quick show of hands regarding the names. Which do you > prefer? > > hmean and gmean > > harmonic_mean and geometric_mean I'd prefer the shorter names. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: Quick poll: gmean or geometric_mean

2016-07-09 Thread Michael Selik
On Sat, Jul 9, 2016, 12:57 PM Robert Kern wrote: > On 2016-07-09 17:13, Michael Selik wrote: > > On Sat, Jul 9, 2016 at 10:17 AM Jason Friedman > wrote: > > > >>> +1 for consistency > > > > What do other languages use? > > R, the most likely candidate, doesn't have them built-in. > > scipy.stats

Re: Quick poll: gmean or geometric_mean

2016-07-09 Thread Robert Kern
On 2016-07-09 17:13, Michael Selik wrote: On Sat, Jul 9, 2016 at 10:17 AM Jason Friedman wrote: +1 for consistency What do other languages use? R, the most likely candidate, doesn't have them built-in. scipy.stats uses gmean() and hmean() -- Robert Kern "I have come to believe that the

Re: Quick poll: gmean or geometric_mean

2016-07-09 Thread Michael Selik
On Sat, Jul 9, 2016 at 10:17 AM Jason Friedman wrote: > > +1 for consistency > What do other languages use? Even though I generally prefer complete words instead of abbreviations, if an abbreviation is a strong standard across many statistics modules (like "stdev" instead of "standard_deviation

Re: Quick poll: gmean or geometric_mean

2016-07-09 Thread Jason Friedman
> > +1 for consistency, but I'm just fine with the short names. It's in the > statistics module after all, so the context is very narrow and clear and > people who don't know which to use or what the one does that they find in a > given piece of code will have to read the docs and maybe fresh up th

Re: Quick poll: gmean or geometric_mean

2016-07-09 Thread Ethan Furman
On 07/09/2016 03:23 AM, Stefan Behnel wrote: Ethan Furman schrieb am 09.07.2016 um 08:27: On 07/08/2016 10:49 PM, Random832 wrote: On Sat, Jul 9, 2016, at 01:26, Steven D'Aprano wrote: hmean and gmean harmonic_mean and geometric_mean The latter, definitely. My preference is also for the

Re: Quick poll: gmean or geometric_mean

2016-07-09 Thread Stefan Behnel
Ethan Furman schrieb am 09.07.2016 um 08:27: > On 07/08/2016 10:49 PM, Random832 wrote: >> On Sat, Jul 9, 2016, at 01:26, Steven D'Aprano wrote: > >>> hmean and gmean >>> >>> harmonic_mean and geometric_mean >> >> The latter, definitely. > > My preference is also for the latter. However, if the

Re: Quick poll: gmean or geometric_mean

2016-07-09 Thread Peter Otten
Steven D'Aprano wrote: > As requested in issue 27181 on the bug tracker, I'm adding functions to > calculate the harmonic and geometric means to the statistics module. > > I'd like to get a quick show of hands regarding the names. Which do you > prefer? > > hmean and gmean > > harmonic_mean and

Re: Quick poll: gmean or geometric_mean

2016-07-08 Thread Ethan Furman
On 07/08/2016 10:49 PM, Random832 wrote: On Sat, Jul 9, 2016, at 01:26, Steven D'Aprano wrote: hmean and gmean harmonic_mean and geometric_mean The latter, definitely. My preference is also for the latter. However, if the rest of the module is filled with abbreviated names you may as we

Re: Quick poll: gmean or geometric_mean

2016-07-08 Thread Random832
On Sat, Jul 9, 2016, at 01:26, Steven D'Aprano wrote: > hmean and gmean > > harmonic_mean and geometric_mean The latter, definitely. > Remember that the arithmetic mean is just called "mean". so? (also maybe it shouldn't be?) -- https://mail.python.org/mailman/listinfo/python-list

Re: Quick poll: gmean or geometric_mean

2016-07-08 Thread Jussi Piitulainen
Steven D'Aprano writes: > As requested in issue 27181 on the bug tracker, I'm adding functions > to calculate the harmonic and geometric means to the statistics > module. > > I'd like to get a quick show of hands regarding the names. Which do > you prefer? > > hmean and gmean > > harmonic_mean and

Quick poll: gmean or geometric_mean

2016-07-08 Thread Steven D'Aprano
As requested in issue 27181 on the bug tracker, I'm adding functions to calculate the harmonic and geometric means to the statistics module. I'd like to get a quick show of hands regarding the names. Which do you prefer? hmean and gmean harmonic_mean and geometric_mean Remember that the arithm