Exemplo n.º 1
0
    def setUp(self):
        "Variations on the constructors in the Elements notebook"

        x,y  = np.mgrid[-10:10,-10:10] * 0.25
        sine_rings  = np.sin(x**2+y**2)*np.pi+np.pi
        exp_falloff1 = 1/np.exp((x**2+y**2)/8)
        exp_falloff2 = 1/np.exp((x**2+y**2)/9)

        self.vfield1 = VectorField([x,y,sine_rings, exp_falloff1])
        self.vfield2 = VectorField([x,y,sine_rings, exp_falloff2])
Exemplo n.º 2
0
 def test_vectorfield_string_signature(self):
     vectorfield = VectorField([], ['a', 'b'], ['c', 'd'])
     self.assertEqual(vectorfield.kdims, [Dimension('a'), Dimension('b')])
     self.assertEqual(vectorfield.vdims, [Dimension('c'), Dimension('d')])