All problems
Row Standard Deviation
Problem
Compute the sample standard deviation (denominator n - 1) of each row of data.
Return a list of standard deviations, one per row.
Hint
Rows of length 1 would divide by zero; the inputs have at least two entries per row.
Test cases
case 1
in: [[[1,2,3]]]
expected: [1]
case 2
in: [[[1,1],[2,2]]]
expected: [0,0]
case 3
in: [[[1,3,5,7]]]
expected: [2.581988897471611]
case 4
in: [[[0,2],[4,6]]]
expected: [1.4142135623730951,1.4142135623730951]
Starter codePython
def row_std(data):
# Your code here
pass4 test cases · run your code against them in the editor