You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
As a user I need to calculate the variance of the elements in the list So that so that calculations can be automated.
Assumptions:
There should be a main.py file with the following content.
@math_ns.route('/variance')@math_ns.doc(description='Variance of the list.')classVarianceList(Resource):
defget(self):
returnms.variance(my_list)
The main.py file should include an external file above the from src import basic_services as bs line.
fromsrcimportmath_servicesasms
The requirements.txt file should list numpy as a dependency.
There should be a src/math_services.py file with the following content
importnumpyasnpdefvariance(integer_list):
""" Calculates the variance of the list of integers. Receives -------- integer_list : list List of integers. Returns ------- var : float Variance of the list. """integer_array=np.array(integer_list, dtype=int)
returnnp.var(integer_array).astype(float)
There should be a test/math_test.py file with the following content.
As a user
I need to calculate the variance of the elements in the list
So that so that calculations can be automated.
Assumptions:
main.py
file with the following content.main.py
file should include an external file above thefrom src import basic_services as bs
line.The
requirements.txt
file should listnumpy
as a dependency.There should be a
src/math_services.py
file with the following contenttest/math_test.py
file with the following content.Acceptance criteria:
The text was updated successfully, but these errors were encountered: