# Python numpy.polynomial.legendre.leggrid2d() Examples

The following are code examples for showing how to use numpy.polynomial.legendre.leggrid2d(). They are from open source Python projects. You can vote up the examples you like or vote down the ones you don't like.

Example 1
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 2
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 3
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 4
 Project: att   Author: Centre-Alt-Rendiment-Esportiu   File: test_legendre.py    GNU General Public License v3.0 5 votes
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 5
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 6
 Project: MARRtino-2.0   Author: DaniAffCH   File: test_legendre.py    GNU General Public License v3.0 5 votes
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 7
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 8
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 9
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 10
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 11
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 12
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 13
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 14
 Project: 3dprinteros-client   Author: panasevychol   File: test_legendre.py    GNU Affero General Public License v3.0 5 votes
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 15
 Project: 3dprinteros-client   Author: panasevychol   File: test_legendre.py    GNU Affero General Public License v3.0 5 votes
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 16
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 17
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 18
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 19
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 20
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 21
 Project: facethin   Author: ParkerGod   File: test_legendre.py    GNU General Public License v3.0 5 votes
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 22
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 23
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 24
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 25
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 26
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 27
 Project: linux-cross-gcc   Author: nmercier   File: test_legendre.py    BSD 3-Clause "New" or "Revised" License 5 votes
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 28
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 29
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 30
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 31
 Project: honours_project   Author: JFriel   File: test_legendre.py    GNU General Public License v3.0 5 votes
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 32
 Project: honours_project   Author: JFriel   File: test_legendre.py    GNU General Public License v3.0 5 votes
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 33
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 34
 Project: PYPIC   Author: max614   File: test_legendre.py    BSD 2-Clause "Simplified" License 5 votes
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 35
 Project: PYPIC   Author: max614   File: test_legendre.py    BSD 2-Clause "Simplified" License 5 votes
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 36
 Project: PYPIC   Author: max614   File: test_legendre.py    BSD 2-Clause "Simplified" License 5 votes
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 37
 Project: offlow   Author: satwikkansal   File: test_legendre.py    GNU General Public License v3.0 5 votes
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 38
 Project: lambda-tensorflow-object-detection   Author: mikylucky   File: test_legendre.py    GNU General Public License v3.0 5 votes
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 39
 Project: elasticintel   Author: securityclippy   File: test_legendre.py    GNU General Public License v3.0 5 votes
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 40
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 41
```def test_leggrid2d(self):
x1, x2, x3 = self.x
y1, y2, y3 = self.y

#test values
tgt = np.einsum('i,j->ij', y1, y2)
res = leg.leggrid2d(x1, x2, self.c2d)
assert_almost_equal(res, tgt)

#test shape
z = np.ones((2, 3))
res = leg.leggrid2d(z, z, self.c2d)
assert_(res.shape == (2, 3)*2) ```
Example 42
```def test_leggrid2d(self):