示例#1
0
 def testNotContiguous(self):
     sbuf = numpy.ones([3,2])[:,0]
     rbuf = numpy.zeros([3])
     self.assertRaises(
         (BufferError, ValueError, TypeError),
         Sendrecv, sbuf, rbuf,
     )
示例#2
0
 def testNotWriteable(self):
     sbuf = numpy.ones([3])
     rbuf = numpy.zeros([3])
     rbuf.flags.writeable = False
     self.assertRaises(
         (BufferError, ValueError, TypeError),
         Sendrecv, sbuf, rbuf
     )
示例#3
0
 def testOrderFortran(self):
     sbuf = numpy.ones([3,2]).T
     rbuf = numpy.zeros([3,2]).T
     Sendrecv(sbuf, rbuf)
     self.assertTrue((sbuf == rbuf).all())
示例#4
0
 def testReadonly(self):
     sbuf = numpy.ones([3])
     rbuf = numpy.zeros([3])
     sbuf.flags.writeable = False
     Sendrecv(sbuf, rbuf)
     self.assertTrue((sbuf == rbuf).all())
示例#5
0
 def testOrderC(self):
     sbuf = numpy.ones([3,2])
     rbuf = numpy.zeros([3,2])
     Sendrecv(sbuf, rbuf)
     self.assertTrue((sbuf == rbuf).all())