# Episode 6 - "General Composite Statistics" exercise #975

Open
opened this issue Jan 16, 2022 · 2 comments
Open

# Episode 6 - "General Composite Statistics" exercise #975

opened this issue Jan 16, 2022 · 2 comments

### faizbond commented Jan 16, 2022

 In Episode 6, the exercise for General Composite Statistics seems to be missing some code on line 5 for the first part of the exercise. If that omission is by design and a part of the exercise, I believe some clarification should be made in the instructions leading up to the sample code. If this is indeed an oversight, the code would then read as follows: ``````filenames = glob.glob('inflammation*.csv') composite_data = numpy.zeros((60,40)) for filename in filenames: # sum each new file's data into composite_data as it's read data = numpy.loadtxt(fname = filename, delimiter=',') composite_data = composite_data + data # and then divide the composite_data by number of samples composite_data = composite_data / len(filenames) `````` in place of ``````filenames = glob.glob('inflammation*.csv') composite_data = numpy.zeros((60,40)) for filename in filenames: # sum each new file's data into composite_data as it's read # # and then divide the composite_data by number of samples composite_data = composite_data / len(filenames) `````` The text was updated successfully, but these errors were encountered:

### ldko commented Jan 18, 2022

 Hi @faizbond , I believe the omission is by design and intentional. Do you think it would be more clear if the first part of the instructions said: "Use each of the files once to generate a dataset containing values averaged over all patients by completing the code inside the loop given below:" ? If you think this works, or you would like to propose other text, you are welcome to open a pull request.

### faizbond commented Jan 21, 2022

 @ldko I think that would work!