[issue40855] statistics.stdev ignore xbar argument
New submission from Matti : statistics.variance also has the same problem. >>> import statistics >>> statistics.stdev([1,2]) 0.7071067811865476 >>> statistics.stdev([1,2], 3) 0.7071067811865476 >>> statistics.stdev([1,2], 1.5) 0.7071067811865476 should be 0.7071067811865476 2.23606797749979 0.5 -- messages: 370659 nosy: Folket priority: normal severity: normal status: open title: statistics.stdev ignore xbar argument type: behavior versions: Python 3.6 ___ Python tracker <https://bugs.python.org/issue40855> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40855] statistics.stdev ignore xbar argument
Matti added the comment: If we estimate the mean using a sample we loose one degree of freedom so it will be divided by N-1, while if we have the mean independent of the sample it should be divided by N to be unbiased. i.e. example 1 sqrt(((1-1.5)²+(2-1.5)²)/(2-1)) = 0.7... example 3 sqrt(((1-1.5)²+(2-1.5)²)/(2)) = 0.5 -- ___ Python tracker <https://bugs.python.org/issue40855> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40855] statistics.stdev ignore xbar argument
Matti added the comment: Hi Raymond and Steven! I'm happy that you are solving this issue but do you have any comment on my previous answer? -- ___ Python tracker <https://bugs.python.org/issue40855> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40855] statistics.stdev ignore xbar argument
Matti added the comment: >I see what you're trying to do but think that interpretation is surprising >and is at odds with the existing and intended uses of the *xbar* argument. > >The goals were to allow the mean to be precomputed (common case) or to be >recentered (uncommon). Neither case should have the effect of changing the >divisor. > >We can't break existing code that assumes that stdev(data) is equal to >stdev(data, xbar=mean(data)). Maybe the requirement are buged? It seems to me that recalculating the mean is a very niche use case. You will very little time on a call you do once. But what good is it to supply a re-centered mean if you get a wrong estimation of the standard deviation? If the mean is not the mean of the sample it was not calculated using the sample so there is no loos of degrees of freedom. -- ___ Python tracker <https://bugs.python.org/issue40855> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40855] statistics.stdev ignore xbar argument
Matti added the comment: I meant to write "pre-calculate". -- ___ Python tracker <https://bugs.python.org/issue40855> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1239] openpty does not give bidirectional pipe
Changes by Matti Katila: -- components: None severity: normal status: open title: openpty does not give bidirectional pipe type: behavior versions: Python 2.5 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1239> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1239] openpty does not give bidirectional pipe
New submission from Matti Katila: http://rafb.net/p/t8cqSt71.html -- nosy: +mudyc __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1239> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1239] openpty does not give bidirectional pipe
Matti Katila added the comment: Linux Programmer’s Manual for ptmx and pts - pseudo-terminal master and slave states: "Data written to the slave is presented on the master descriptor as input. Data written to the master is presented to the slave as input." The data can be read from slave to master but not from master to slave. The unit test does not test this issue either: http://coverage.livinglogic.de/Lib/test/test_openpty.py.html __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1239> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1239] openpty does not give bidirectional pipe
Matti Katila added the comment: Not a real issue - it's a standard behaviour of tty. Fix is to set -icanon: m,s = os.openpty() s = os.ttyname(s) os.system( 'stty cs8 -icanon -echo < %s' % s ) see, http://www.eulogika.net/download/eutalk_20040302/pymouse.html The issue can be closed and documentation can be updated with some helpful information. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1239> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1912] Segmentation fault
New submission from Matti Punkeri: Python seg faults after 20-30 hours. The running Python application is a Qt based user interface which handles several SSH threads. Backtrace is attached. -- files: backtrace.txt messages: 61558 nosy: mpunkeri severity: major status: open title: Segmentation fault type: crash versions: Python 2.4 Added file: http://bugs.python.org/file9270/backtrace.txt __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1912> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1912] Segmentation fault
Matti Punkeri added the comment: And the program is running on SuSE Linux, 2.6.11.4-20a-default, gcc version 3.3.5 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1912> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14897] struct.pack raises unexpected error message
Matti Mäki added the comment: Changed the error message as suggested by http://bugs.python.org/issue14897#msg161493 Also made similar change to struct.pack_into -- keywords: +patch nosy: +makimat Added file: http://bugs.python.org/file27679/issue14897.patch ___ Python tracker <http://bugs.python.org/issue14897> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14897] struct.pack raises unexpected error message
Matti Mäki added the comment: A second try, now taking into account buffer and offset params in pack_into. -- Added file: http://bugs.python.org/file27689/issue14897-2.patch ___ Python tracker <http://bugs.python.org/issue14897> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14897] struct.pack raises unexpected error message
Matti Mäki added the comment: I filled up the contributor form and gave it to Petri Lehtinen 2012-10-22 -- ___ Python tracker <http://bugs.python.org/issue14897> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com