def test_all(self): v = BlockVector(2) a = np.ones(5) b = np.ones(3) v.set_block(0, a) v.set_block(1, b) self.assertTrue(v.all()) v = BlockVector(2) a = np.zeros(5) b = np.zeros(3) v.set_block(0, a) v.set_block(1, b) self.assertFalse(v.all())
def test_all(self): v = BlockVector(2) a = np.ones(5) b = np.ones(3) v[0] = a v[1] = b self.assertTrue(v.all()) v = BlockVector(2) a = np.zeros(5) b = np.zeros(3) v[0] = a v[1] = b self.assertFalse(v.all())