You are viewing a single comment's thread. Return to all comments →
l = [1 if x >0 else -1 for x in arr if x != 0] print("%.6f" % float(l.count(1)/n)) print("%.6f" % float(l.count(-1)/n)) print("%.6f" % float(abs(len(l)-n) /n))
Seems like cookies are disabled on this browser, please enable them to open this website
Plus Minus
You are viewing a single comment's thread. Return to all comments →