Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from __future__ import print_function
- def stc(data, n):
- ret = []
- for i in range(len(data)):
- result = pow((i+1) / len(data), 1 / n)
- ret.append(result)
- return ret
- print(stc([1]*10, 2))
- [0.31622776601683794,
- 0.4472135954999579,
- 0.5477225575051661,
- 0.6324555320336759,
- 0.7071067811865476,
- 0.7745966692414834,
- 0.8366600265340756,
- 0.8944271909999159,
- 0.9486832980505138,
- 1.0]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement