I win

13 views
Skip to first unread message

jlgrover1

unread,
Oct 2, 2014, 1:20:40 PM10/2/14
to psychology-...@googlegroups.com
from scipy.stats import mode

Jibo Ho

unread,
Oct 2, 2014, 1:21:45 PM10/2/14
to psychology-...@googlegroups.com
>>> from scipy.stats import mode
>>> mode([1,2,3,1,2,1,1,1,3,2,2,1]) (array([ 1.]), array([ 6.]))
>>> most_frequent = mode([1,2,3,1,2,1,1,1,3,2,2,1])[0][0]
>>> most_frequent


On Thursday, October 2, 2014 12:20:40 PM UTC-5, jlgrover1 wrote:
from scipy.stats import mode

Jibo He

unread,
Oct 2, 2014, 2:21:29 PM10/2/14
to jlgrover1, psychology-...@googlegroups.com
Thanks, Grover! You are a very good student. I will give you one extra credit for being excellent.
Jibo

On Thu, Oct 2, 2014 at 12:20 PM, jlgrover1 <jlgr...@gmail.com> wrote:
from scipy.stats import mode

--
This is the mail list for Dr He's Python programming class.
http://psychology-courses.appspot.com/
---
You received this message because you are subscribed to the Google Groups "Python Programming" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psychology-progra...@googlegroups.com.
Visit this group at http://groups.google.com/group/psychology-programming.
To view this discussion on the web visit https://groups.google.com/d/msgid/psychology-programming/bd9fc25c-b865-4aa4-82aa-1873b5434cb1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages