Did I find the right examples for you? yes no

All Samples(22)  |  Call(22)  |  Derive(0)  |  Import(0)

src/v/i/visionegg-HEAD/VisionEgg/Dots.py   visionegg(Download)
    def __init__(self, **kw):
        VisionEgg.Core.Stimulus.__init__(self,**kw)
        # store positions normalized between 0 and 1 so that re-sizing is ok
        num_dots = self.constant_parameters.num_dots # shorthand
        self.x_positions = RandomArray.uniform(0.0,1.0,(num_dots,))
        self.y_positions = RandomArray.uniform(0.0,1.0,(num_dots,))
        self.random_directions_radians = RandomArray.uniform(0.0,2*math.pi,(num_dots,))
                Numeric.put( self.start_times_sec, replace_indices, now_sec )
 
                new_x_positions = RandomArray.uniform(0.0,1.0,
                                                      (len(replace_indices),))
                Numeric.put( self.x_positions, replace_indices, new_x_positions )
 
                new_y_positions = RandomArray.uniform(0.0,1.0,

src/v/i/visionegg-1.2.1/VisionEgg/Dots.py   visionegg(Download)
    def __init__(self, **kw):
        VisionEgg.Core.Stimulus.__init__(self,**kw)
        # store positions normalized between 0 and 1 so that re-sizing is ok
        num_dots = self.constant_parameters.num_dots # shorthand
        self.x_positions = RandomArray.uniform(0.0,1.0,(num_dots,))
        self.y_positions = RandomArray.uniform(0.0,1.0,(num_dots,))
        self.random_directions_radians = RandomArray.uniform(0.0,2*math.pi,(num_dots,))
                Numeric.put( self.start_times_sec, replace_indices, now_sec )
 
                new_x_positions = RandomArray.uniform(0.0,1.0,
                                                      (len(replace_indices),))
                Numeric.put( self.x_positions, replace_indices, new_x_positions )
 
                new_y_positions = RandomArray.uniform(0.0,1.0,

src/p/y/Pymol-script-repo-HEAD/modules/ADT/mglutil/math/statetocoordstest.py   Pymol-script-repo(Download)
    def test_applyQuaternion04(self):
        """applyQuaternion04  -- random pts 360 about random-axis"""
        state = StateToCoords(self.random_points, tolist=1)
        q = RandomArray.uniform(self.min, self.max, (4,))
        q[3] = 360.0
    def test_applyQuaternion06(self):
        """applyQuaternion06  -- random pts 2*180 about random-axis"""
        state = StateToCoords(self.random_points, tolist=1)
        q = RandomArray.uniform(self.min, self.max, (4,))
        q[3] = 180.0
    def test_applyTranslation01(self):
        """applyTranslation01 -- random pts x (random translation)"""
        state = StateToCoords(self.random_points, tolist=0)
        trn = RandomArray.uniform(self.min, self.max, (3,))
        expected = (Numeric.array(self.random_points) + trn)
    def test_applyTranslation03(self):
        """applyTranslation03 -- random pts x (random there and back)"""
        state = StateToCoords(self.random_points, tolist=1)
        trn = RandomArray.uniform(self.min, self.max, (3,))
        state.applyTranslation(trn)

src/p/y/Pymol-script-repo-HEAD/modules/ADT/mglutil/math/rmsdtest.py   Pymol-script-repo(Download)
        num_points = 20
        dimension = 3
        point_list_1 = RandomArray.uniform(min, max, (num_points, dimension))
        delta = point_list_1[0][0]
        point_list_2 = point_list_1 + delta
        num_points = 20
        dimension = 3
        point_list_1 = RandomArray.uniform(min, max, (num_points, dimension))
        point_list_2 = RandomArray.uniform(min, max, (num_points, dimension))
        self.assertEqual(