Skip to content

Commit

Permalink
a slight refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
espdev committed Feb 7, 2020
1 parent e789976 commit 0c3d5f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions csaps/_sspndg.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def evaluate(self, xi: ty.Sequence[np.ndarray]) -> np.ndarray:
sizey = list(yi.shape)
nsize = tuple(x.size for x in xi)

for i in range(self.ndim - 1, -1, -1):
for i in reversed(range(self.ndim)):
ndim = int(np.prod(sizey[:self.ndim]))
coeffs = yi.reshape((ndim * self.pieces[i], self.order[i]), order='F')

Expand Down Expand Up @@ -214,7 +214,7 @@ def _make_spline(self, smooth: ty.List[ty.Optional[float]]) -> ty.Tuple[NdGridSp
_smooth = []

# Perform coordinatewise smoothing spline computing
for i in range(self._ndim - 1, -1, -1):
for i in reversed(range(self._ndim)):
shape_i = (np.prod(sizey[:-1]), sizey[-1])
ydata_i = ydata.reshape(shape_i, order='F')

Expand Down

0 comments on commit 0c3d5f6

Please sign in to comment.