Skip to content

Commit

Permalink
Bumping version
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaem committed Jan 25, 2019
1 parent f1dbe7a commit 9703302
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion shenfun/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"""
#pylint: disable=wildcard-import,no-name-in-module

__version__ = '1.2.2'
__version__ = '1.2.3'
__author__ = 'Mikael Mortensen'

import numpy as np
Expand Down
17 changes: 17 additions & 0 deletions shenfun/chebyshev/bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""
import functools
import numpy as np
import sympy
from numpy.polynomial import chebyshev as n_cheb
from scipy.special import eval_chebyt
from mpi4py_fft import fftw
Expand Down Expand Up @@ -88,6 +89,10 @@ def points_and_weights(self, N=None, map_true_domain=False):
def vandermonde(self, x):
return n_cheb.chebvander(x, self.N-1)

def sympy_basis(self, i=0):
x = sympy.symbols('x')
return sympy.chebyshevt(i, x)

def evaluate_basis(self, x, i=0, output_array=None):
x = np.atleast_1d(x)
if output_array is None:
Expand Down Expand Up @@ -358,6 +363,10 @@ def _composite_basis(self, V):
P[:, -1] = (V[:, 0] - V[:, 1])/2
return P

def sympy_basis(self, i=0):
x = sympy.symbols('x')
return sympy.chebyshevt(i, x) - sympy.chebyshevt(i+2, x)

def evaluate_basis(self, x, i=0, output_array=None):
x = np.atleast_1d(x)
if output_array is None:
Expand Down Expand Up @@ -479,6 +488,10 @@ def _composite_basis(self, V):
P[:, :-2] = V[:, :-2] - (k[:-2]/(k[:-2]+2))**2*V[:, 2:]
return P

def sympy_basis(self, i=0):
x = sympy.symbols('x')
return sympy.chebyshevt(i, x) - (i/(i+2))**2*sympy.chebyshevt(i+2, x)

def evaluate_basis(self, x, i=0, output_array=None):
x = np.atleast_1d(x)
if output_array is None:
Expand Down Expand Up @@ -608,6 +621,10 @@ def _composite_basis(self, V):
P[:, :-4] = V[:, :-4] - (2*(k+2)/(k+3))*V[:, 2:-2] + ((k+1)/(k+3))*V[:, 4:]
return P

def sympy_basis(self, i=0):
x = sympy.symbols('x')
return sympy.chebyshevt(i, x) - (2*(i+2)/(i+3))*sympy.chebyshevt(i+2, x) + (i+1)/(i+3)*sympy.chebyshevt(i+4, x)

def evaluate_basis(self, x, i=0, output_array=None):
x = np.atleast_1d(x)
if output_array is None:
Expand Down

0 comments on commit 9703302

Please sign in to comment.