code: def test_legvander(self):
      # check for 1d x
      x = np.arange(3)
      v = leg.legvander(x, 3)
      assert_(v.shape == (3, 4))
      for i in range(4):
          coef = [0] * i + [1]
          assert_almost_equal(v[..., i], leg.legval(x, coef))
  
      # check for 2d x
      x = np.array([[1, 2], [3, 4], [5, 6]])
      v = leg.legvander(x, 3)
      assert_(v.shape == (3, 2, 4))
      for i in range(4):
          coef = [0] * i + [1]
          assert_almost_equal(v[..., i], leg.legval(x, coef))
  
imports: from functools import reduce
  import numpy
  import numpy.polynomial.legendre
  from numpy.polynomial.polynomial import polyval
  from numpy.testing import assert_almost_equal, assert_raises, assert_equal, assert_
label_desc: Use image node_id 1 for calling the TestVander obj's underlying member method code with example usage: obj.test_legvander() without return types