[sage-support] A mathematical mistake in root_lattice_realizations.py

2014-10-12 Thread Dinakar Muthiah
I claim there is currently a mathematical mistake in the way the "is_real_root" method in the file root_lattice_realizations.py is implemented. There is also a parallel mistake in "is_imaginary_root". Let me illustrate with an example: sage: R = RootSystem(["A",2,1]).weight_lattice() sage: alph

[sage-support] Re: Best Practices for extending functionality of a sage class

2014-06-06 Thread Dinakar Muthiah
Ideally, I would like to define a subclass of Partition called MyPartition and include all my custom methods. I think this is a standard way to extend libraries, but for some reason this doesn't work at all. Is there a solution that is more in the spirit of subclassing? -- You received this me

[sage-support] Re: Best Practices for extending functionality of a sage class

2014-06-05 Thread Dinakar Muthiah
I literally wrote the following at the top of my module: #\lambda^(i) from Carrell-Goulding paper def i_part(self,i): if i==0: return self elif i<0: return (self.conjugate().i_part(-i)).conjugate() zero_one_sequence = self.zero_one_sequence() num_ones = zero_one_seq

[sage-support] Best Practices for extending functionality of a sage class

2014-06-05 Thread Dinakar Muthiah
Hello, I want to know the best practices for extending the functionality of a sage class. For example, I would like to add the following method to the Partition class in sage: #\lambda^(i) from Carrell-Goulding paper def i_part(self,i): if i==0: return self elif i<0: ret