Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Arthur Whitney releases an open-source K with MIT license. Parent comment
(Copied from some forum, since I don't use Python much)
import numpy as np def geo_mean_overflow(iterable): return np.exp(np.log(iterable).mean())
from statistics import. geometric_mean geometric_mean([1.0, 0.00001, 10000000000.]) # 46.415888336127786
gm=:#%:*/
And I don't need to format code on HN in J because it's so short anyway, besides I don't know how!
There are no comments on this comment yet.
(Copied from some forum, since I don't use Python much)
Or, In J, since I don't know K: Even shorter than Python whether it's a canned lib routine or created from composing simple functions.And I don't need to format code on HN in J because it's so short anyway, besides I don't know how!