Data Science - Average of Rows
hello, i am trying to solve the code challenge at the end of chapter1 of the data science course and i can only pass 3 out of 5 tests and i can't figure out why my code is not working in all the cases #input of the first line containg the size of rows(n) and columns(p) of a data set n, p = [int(x) for x in input().split()] my first approach was to read the next lines containg the data for the data set and add them into a list and transform that into a ndarray import numpy as np myList = [] for index in range(n): p1 = [float(x) for x in input().split()] p1=[float("{:.2f}".format(i)) for i in p1] myList.append(p1) myArr = np.array(myList) myArr.reshape(n,p) print(myArr.sum(axis=1)/p) with this method i convert the string value in a float one and then impose a 2 digits float number format. i then sum by row and display the average can someone help me understand where i might not see a bug in my flow?