ajdmom.poly.Poly¶
- class ajdmom.poly.Poly(dict=None, /, **kwargs)[source]¶
Class for different versions of “Polynomial”
Indicating the purpose for each key component, a tuple of str.
Poly.add_keyval(key, val)Insert a new key-val or add val to the existing key.
Constant equivalent to 1 in real numbers.
Constant equivalent to 0 in real numbers.
Poly.fromkeys(iterable[, value])Poly.get(k[,d])Poly.is_exact_type(other)Check whether the supplied argument is a poly having the same keyfor.
Poly.merge(other)Merge another poly having the same keyfor attribute.
Poly.mul_poly(other, keyIndexes, keyfor)Multiply by another poly of different type and return a new poly.
Poly.pop(k[,d])If key is not found, d is returned if given, otherwise KeyError is raised.
as a 2-tuple; but raise KeyError if D is empty.
Remove any item having value 0.
Poly.set_keyfor(names)Set the
keyforattribute for the poly.Poly.setdefault(k[,d])Poly.update([E, ]**F)If E present and has a .keys() method, does: for k in E.keys(): D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v
Poly.write_to_csv(filename)Write the poly to a csv file with the
keyforas the title line.Poly.write_to_txt(filename)Write the poly to a txt file with the
keyforas the title line.