Closed Permafacture closed 9 years ago
pts = self.pts nmax = len(pts) real_areas = array([triangle_area(pts[n-1],pts[n],pts[n+1]) if n not in [0,nmax-1] else np.inf for n in range(nmax)])
AGH! creating an array from a list comprehension looping over an array!? What was I thinking?
Fixed. Brought 1/3 of triangle area calculations to essentially zero time. Overall not a huge improvement. (OldTime - NewTime) / OldTime = 17%
AGH! creating an array from a list comprehension looping over an array!? What was I thinking?