On 10/22/2014 01:22 PM, smohamm...@gmail.com wrote:
> Hello to every one,
> I am a *primitive *sage user and I want to produce a function of n
> variables (|x[1],x[2],...,x[n]|), in nested 'for' loops. I've searched
> in sage's documentation, but I have still 2 problems:
> 1. How to define a list o
On Friday, October 24, 2014 9:45:46 AM UTC-7, Nils Bruin wrote:
> There may be a good reason why Sage chooses to call __radd__ manually
> rather than let python do the work by returning NotImplemented, but if
> there's not perhaps it would be better to stay closer to python's standard?
>
The re
Understood. Thank you!
On Friday, October 24, 2014 2:45:46 PM UTC-2, Nils Bruin wrote:
>
> On Thursday, October 23, 2014 11:46:02 AM UTC-7, João Alberto Ferreira
> wrote:
>>
>> I am running the following Python example from the book "Learning
>> Python", from Mark Lutz and David Ascher, but Sage
This was a "demonstration problem" - my actual application will involve
arbitrary-precision reals with lots of constraints.
It appears that PPL not only supports rationals, but insists on them. It
seems to set the base_ring to QQ, as the output from the following code is
"Rational Field", but
This was a "demonstration problem" - my actual application will involve
arbitrary-precision reals with lots of constraints.
It appears that PPL not only supports rationals, but insists on them. It
seems to set the base_ring to QQ, as the output from the following code is
"Rational Field", but
On Thursday, October 23, 2014 11:46:02 AM UTC-7, João Alberto Ferreira
wrote:
>
> I am running the following Python example from the book "Learning
> Python", from Mark Lutz and David Ascher, but Sage is returning a
> TypeError after presenting the correct response. Can anyone explain me
> why?
Thanks for your answer. Though I have defined and now use such a function
you suggested, but I need to calculate this function later for thousands
of different inputs. This means a huge amount of computation that can be
avoided, by once deriving an expression in terms of x[i]'s and then just
r