code: def compute_basis(self):
      order = self.order
      nsd = self.nsd
      N = []
      pol, coeffs, basis = bernstein_space(order, nsd)
      points = create_point_set(order, nsd)
  
      equations = []
      for p in points:
          ex = pol.subs(x, p[0])
          if nsd > 1:
              ex = ex.subs(y, p[1])
          if nsd > 2:
              ex = ex.subs(z, p[2])
          equations.append(ex)
  
      A = create_matrix(equations, coeffs)
      Ainv = A.inv()
  
      b = eye(len(equations))
  
      xx = Ainv * b
  
      for i in range(0, len(equations)):
          Ni = pol
          for j in range(0, len(coeffs)):
              Ni = Ni.subs(coeffs[j], xx[j, i])
          N.append(Ni)
  
      self.N = N
  
file_path: sympy/examples/advanced/fem.py
imports: from sympy import symbols, Symbol, factorial, Rational, zeros, eye, integrate, diff, pprint, reduced
label_desc: Use image node_id 3 for calling the Lagrange obj's underlying member method code with example usage: obj.compute_basis() without return types