Created
March 14, 2017 10:58
-
-
Save darden1/743ec1c63b4d746f3950c04bb0f56f08 to your computer and use it in GitHub Desktop.
py_test_sum.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| class TestSum(object): | |
| def __init__(self, n_iter): | |
| self.n_iter = n_iter | |
| self.sum = np.zeros(n_iter) | |
| def calc_sum(self): | |
| for i in range(1, self.n_iter): | |
| self.sum[i] = self.sum[i-1] + i |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment