def test_call_all_zero(self): for eg, bits in self.examples: p = PackedPowers(eg, bits) zero = (0.0,)*len(eg) if p.degree()==0: self.assertEquals(p(zero), 1.0) else: self.assertEquals(p(zero), 0.0)
def test_degree(self): for eg, bits in self.examples: p = PackedPowers(eg, bits) self.assertEquals(p.degree(), sum(eg))
def test_degree(self): m = PackedPowers() self.assertEquals(m.degree(), 1)