diff options
author | Anton Khirnov <anton@khirnov.net> | 2017-05-24 16:03:43 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2017-05-24 16:03:43 +0200 |
commit | 62726e1ec3cc7503de62bbbb33ed9db675fc64db (patch) | |
tree | 814b4c292bea147ecc027464b2c73b24e3323ca7 | |
parent | c082920c93514fea8fe168a8e9650bfafa3261cf (diff) |
series_expansion: implement 2D evaluation
-rw-r--r-- | series_expansion.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/series_expansion.py b/series_expansion.py index 76adc30..15ee79d 100644 --- a/series_expansion.py +++ b/series_expansion.py @@ -67,5 +67,10 @@ class SeriesExpansion(object): for c, val in zip(self._coeffs, basis_vals[0]): ret += val * c return ret + elif self._dim == 2: + for i in xrange(self._coeffs.shape[0]): + for j in xrange(self._coeffs.shape[1]): + ret += self._coeffs[i, j] * np.outer(basis_vals[0][i], basis_vals[1][j]) + return ret else: raise NotImplementedError('Unsupported number of dimensions') |