Did I find the right examples for you? yes no      Crawl my project      Python Jobs

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

src/p/y/Pymol-script-repo-HEAD/modules/pdb2pqr/contrib/numpy-1.1.0/numpy/doc/swig/test/testArray.py   Pymol-script-repo(Download)
    def setUp(self):
        self.nrows = 5
        self.ncols = 4
        self.array2 = Array.Array2(self.nrows, self.ncols)
 
    def testConstructor0(self):
        "Test Array2 default constructor"
        a = Array.Array2()
    def testConstructor2(self):
        "Test Array2 array constructor"
        na = np.zeros((3,4), dtype="l")
        aa = Array.Array2(na)
        self.failUnless(isinstance(aa, Array.Array2))
            for j in range(self.ncols):
                self.array2[i][j] = i * j
        arrayCopy = Array.Array2(self.array2)
        self.failUnless(arrayCopy == self.array2)
 

src/n/u/numpy-1.8.1/doc/swig/test/testArray.py   numpy(Download)
    def setUp(self):
        self.nrows = 5
        self.ncols = 4
        self.array2 = Array.Array2(self.nrows, self.ncols)
 
    def testConstructor0(self):
        "Test Array2 default constructor"
        a = Array.Array2()
    def testConstructor2(self):
        "Test Array2 array constructor"
        na = np.zeros((3, 4), dtype="l")
        aa = Array.Array2(na)
        self.failUnless(isinstance(aa, Array.Array2))
            for j in range(self.ncols):
                self.array2[i][j] = i * j
        arrayCopy = Array.Array2(self.array2)
        self.failUnless(arrayCopy == self.array2)