def testMin(self): ts = self.getts() val = cross(ts.min(fallback=self.fallback)) for v in ts.values(): self.assertTrue(val <= v) ts = self.getts(cols=3) val = ts.min(fallback=self.fallback) self.assertEqual(len(val), 3) val = cross(val) for v in ts.values(): self.assertTrue(val <= v)
def testAllGE(self): self.assertTrue(cross([1,2]) >= [-1,0.5]) self.assertTrue(cross([1,2,78]) >= [-1,1,56]) self.assertTrue(cross([1,2,56]) >= [-1,1,56]) self.assertFalse(cross([1,2,-5]) >= [-1,1,56])
def testAllLE(self): self.assertFalse(cross([1,2]) <= [-1,1]) self.assertFalse(cross([1,2,78]) <= [-1,1,56]) self.assertFalse(cross([1,2,56]) <= [-1,1,56]) self.assertTrue(cross([1,2,-5]) <= [4,2,56]) self.assertTrue(cross([-90,1,-5]) <= [-1,1,56])
def testAllGE(self): self.assertTrue(cross([1, 2]) >= [-1, 0.5]) self.assertTrue(cross([1, 2, 78]) >= [-1, 1, 56]) self.assertTrue(cross([1, 2, 56]) >= [-1, 1, 56]) self.assertFalse(cross([1, 2, -5]) >= [-1, 1, 56])
def testAllLE(self): self.assertFalse(cross([1, 2]) <= [-1, 1]) self.assertFalse(cross([1, 2, 78]) <= [-1, 1, 56]) self.assertFalse(cross([1, 2, 56]) <= [-1, 1, 56]) self.assertTrue(cross([1, 2, -5]) <= [4, 2, 56]) self.assertTrue(cross([-90, 1, -5]) <= [-1, 1, 56])