Skip to content

Instantly share code, notes, and snippets.

@darden1
Created March 14, 2017 10:58
Show Gist options
  • Select an option

  • Save darden1/743ec1c63b4d746f3950c04bb0f56f08 to your computer and use it in GitHub Desktop.

Select an option

Save darden1/743ec1c63b4d746f3950c04bb0f56f08 to your computer and use it in GitHub Desktop.
py_test_sum.py
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