There could be code in other parts of devel/sage/sage that depends
upon .sum(), althouh not too likely.
You should run "make testlong" to see if anything breaks (well, it
takes a while of course )
And then, you know, open a trac ticket with your patch.

On Nov 13, 9:54 pm, Maxim <maxim.courno...@gmail.com> wrote:
> On 13 nov, 00:18, Dima Pasechnik <dimp...@gmail.com> wrote:
>
> > I don't think sum() method is needed. It's certainly a code bloat.
> > Could you check that sum() in vector_double_dense can be removed?
> > (remove it there, do sage -b, run testsuite, see if there were any
> > errors caused by it)
>
> I just tried that, it worked. The sage -b completed without issue,
> then I ran this to test the vector_double_dense object integrity:
> sage: v = vector([1,float(2),3)]
> sage: type(v)
> -> <type
> 'sage.modules.vector_real_double_dense.Vector_real_double_dense'>
> sage: TestSuite(v).run(verbose = True)
>     running ._test_category() . . . pass
>     running ._test_eq() . . . pass
>     running ._test_not_implemented_methods() . . . pass
>     running ._test_pickling() . . . pass
>
> and now doing a:
> sage: v.sum()
>     Traceback (click to the left of this block for traceback)
>     ...
>     AttributeError:
>     'sage.modules.vector_real_double_dense.Vector_real_double_dense'
> object
>     has no attribute 'sum'
>
> Which is the same consistent behaviour as for a vector_integer_dense
> object, forcing one to use the universal sum(v).

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to