Пример #1
0
        def test_numpy(self):
            import numpy

            a = numpy.ndarray((10, 20))
            a[0, 0] = 10
            self.assertEquals(safe_type(a), "numpy.ndarray[numpy.float64_t, ndim=2]")
            self.assertEquals(inline("return a[0,0]", a=a, **self.test_kwds), 10.0)
Пример #2
0
 def test_numpy(self):
     import numpy
     a = numpy.ndarray((10, 20))
     a[0, 0] = 10
     self.assertEqual(safe_type(a),
                      'numpy.ndarray[numpy.float64_t, ndim=2]')
     self.assertEqual(inline("return a[0,0]", a=a, **self.test_kwds), 10.0)