Re: [sage-devel] Re: sum() with addition or subtraction raises type error

2016-04-29 Thread Daniel Krenn
On 2016-04-30 07:48, Ralf Stephan wrote: > Please review > http://trac.sagemath.org/ticket/9424 Done. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [sage-devel] Re: sum() with addition or subtraction raises type error

2016-04-29 Thread Daniel Krenn
On 2016-04-30 07:48, Ralf Stephan wrote: > Please review > http://trac.sagemath.org/ticket/9424 This does not solve the posters problem. Daniel -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving

[sage-devel] Re: sum() with addition or subtraction raises type error

2016-04-29 Thread Ralf Stephan
Please review http://trac.sagemath.org/ticket/9424 Regards. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to

Re: [sage-devel] sum() with addition or subtraction raises type error

2016-04-29 Thread Daniel Krenn
On 2016-04-30 01:46, Marc Tardif wrote: > When I evaluate this series numerically, I get a type error: > > sage: sum(1/2^x-1/3^x, x, 1, oo).n() > ... > TypeError: cannot evaluate symbolic expression numerically It cannot calculate the sum symbolically (for whatever reason): sage:

[sage-devel] sum() with addition or subtraction raises type error

2016-04-29 Thread Marc Tardif
Hi folks, When I evaluate this series numerically, I get a type error: sage: sum(1/2^x-1/3^x, x, 1, oo).n() ... TypeError: cannot evaluate symbolic expression numerically but when I evaluate each part of the series, I get the sum: sage: (sum(1/2^x, x, 1, oo) - sum(1/3^x, x, 1,

Re: [sage-devel] Re: Tab completion on results of method calls

2016-04-29 Thread 'Martin R' via sage-devel
I am using emacs/sage-mode only, so my experience is biased. What I would like though is that tab completion automatically adds at least the open parenthesis, or possibly both, whenever appropriate. Would this make sense and would this be possible? Perhaps one could do even more - I don't

Re: [sage-devel] Re: Tab completion on results of method calls

2016-04-29 Thread William Stein
For the record, a third option is to attempt to tab complete for 3 seconds (say), and interrupt if the result can't be computed that quickly. But I think Volker's answer is sufficient for now. William On Fri, Apr 29, 2016 at 7:12 AM, Volker Braun wrote: > IPython (and

[sage-devel] Re: Tab completion on results of method calls

2016-04-29 Thread Volker Braun
IPython (and hence Sage) can do tab completion of function call results already, its just off by default (thankfully!) sage: %config IPCompleter.greedy=True sage: sin(x).[TAB] Display all 211 possibilities? (y or n) [...] -- You received this message because you are subscribed to the Google

Re: [sage-devel] Re: Deprecate the use of properties in all public API (was: Heavy-computation @property in Matrix class)

2016-04-29 Thread Nicolas M. Thiery
On Fri, Apr 29, 2016 at 09:47:14AM +, Simon King wrote: > Just to be clear: In the other regard (documentation!), it seems > to me that @lazy_attribute is not suitable for API. In general yes; if a lazy_attribute A.f returns the integer 1, we cannot configure introspection on this integer to

[sage-devel] Re: Deprecate the use of properties in all public API (was: Heavy-computation @property in Matrix class)

2016-04-29 Thread Simon King
On 2016-04-29, Simon King wrote: > In that regard, @lazy_attribute is better. Just to be clear: In the other regard (documentation!), it seems to me that @lazy_attribute is not suitable for API. Cheers, Simon -- You received this message because you are subscribed to

[sage-devel] Re: Deprecate the use of properties in all public API (was: Heavy-computation @property in Matrix class)

2016-04-29 Thread Simon King
Hi Nicolas, On 2016-04-29, Nicolas M. Thiery wrote: > There is one use case for properties in the public API though which I > would like to bring up, namely "glorified methods". Let me explain: So, briefly, these are properties (or lazy attributes) that behave,

Re: [sage-devel] Deprecate the use of properties in all public API (was: Heavy-computation @property in Matrix class)

2016-04-29 Thread Johan S . R . Nielsen
> Wouldn't you have to get rid of all public attributes as well when doing > this? > Or why should > sage: x.some_attribute > work and > sage: x.some_attribute_by_at_property > be forbidden? My impression is that public attributes generally are frowned upon, in Sage as in many other

[sage-devel] Tab completion on results of method calls

2016-04-29 Thread Nicolas M. Thiery
On Wed, Apr 27, 2016 at 02:11:46PM +0200, VulK wrote: > This example is dumb because it does not give any real benefit but it will > do. On the command line you could run something like > > sage: B = matrix() > sage: B.T.roo > > and get > > sage: B.T.rook_vector > > but > > sage: sage:

Re: [sage-devel] Deprecate the use of properties in all public API (was: Heavy-computation @property in Matrix class)

2016-04-29 Thread Nicolas M. Thiery
On Fri, Apr 29, 2016 at 09:31:31AM +0200, Johan S. R. Nielsen wrote: > I call for the following vote: > > [ ] Phase out all uses of properties in the public API and make them > into methods that take no arguments. Add in the developer's manual > somewhere that this is the general policy.

[sage-devel] Rank Metric Codes in Sage

2016-04-29 Thread Arpit Merchant
Hello, I am Arpit Merchant and I'm a Masters student at IIIT-H, India. I've been selected for GSOC '16 with Sage for a project on Rank-Metric Codes. My complete proposal for this project can be found here . I

Re: [sage-devel] Deprecate the use of properties in all public API (was: Heavy-computation @property in Matrix class)

2016-04-29 Thread Daniel Krenn
On 2016-04-29 09:31, Johan S. R. Nielsen wrote: > [ ] Phase out all uses of properties in the public API and make them > into methods that take no arguments. Add in the developer's manual > somewhere that this is the general policy. Wouldn't you have to get rid of all public attributes as

Re: [sage-devel] Heavy-computation @property in Matrix class

2016-04-29 Thread Nicolas M. Thiery
On Tue, Apr 26, 2016 at 10:53:37AM +0200, Johan S. R. Nielsen wrote: > I came across this because it currently breaks tab-completion on > matrices in the Emacs sage-mode: perhaps due to a bug, IPython inspects > the properties when tab-completing, so when a property throws an > exception, no

[sage-devel] Deprecate the use of properties in all public API (was: Heavy-computation @property in Matrix class)

2016-04-29 Thread Johan S . R . Nielsen
In the previous discussion concerning properties on Matrix, there seemed to be consensus that Matrix.I was a problem. More generally, only little defence of the general use of properties in the public API was given. Therefore, I suggest that we phase out *all* uses of properties in the public