On Sunday, July 24, 2011, john_perry_usm wrote:
> What about not-the-notebook? :-) For example, I have the following
> file, called test_rational.pyx:
>
>from sage.rings.rational import Rational
import ---> cimport ?!
>
>cpdef Rational add(a, b):
> return a + b
>
> When I try to a
What about not-the-notebook? :-) For example, I have the following
file, called test_rational.pyx:
from sage.rings.rational import Rational
cpdef Rational add(a, b):
return a + b
When I try to attach it to sage, I get: [lots of output removed]
_home_perry_test_rational_pyx_1.p
On Sun, Jul 24, 2011 at 5:47 PM, john_perry_usm wrote:
> I want to declare c to be of the type defined by the class Rational.
> I'm sure this is easy, but what I want to do is this:
>
>from sage.rings.rational import Rational
>cdef Rational c
>
> but that doesn't work. Neither does cimpor
I want to declare c to be of the type defined by the class Rational.
I'm sure this is easy, but what I want to do is this:
from sage.rings.rational import Rational
cdef Rational c
but that doesn't work. Neither does cimport (which I found in a file
somewhere, albeit commented out, and now
Hi people,
I have a little doubt about ticks in plots. I'd like to know whether the
following tasks are possible:
- eliminate all ticks of a plot.
- eliminate the dependent variable ticks.
- changing the number by letter, either 1 by \eta and 2 by 2\eta or 1 by
\eta and 1.2 by \xi.
Dear John,
You make a slight mistake, the unit group of Z[sqrt(2)] has rank 1, so
although you have unique factorization up to units this might still give you
a lot of different a and b satisfying the criteria.
See for example:
sage: [a^2-2*b^2 for (a,b) in [(3, 1), (5, 3), (13, 9), (27, 19),
On Sun, Jul 24, 2011 at 10:46 AM, John Cremona wrote:
>
>
> On Jul 24, 1:24 pm, raman wrote:
> > Hi Dears
> > First I must find all primes in the form p=8k+1 or p=8k+7 in range
> > 1.
>
> [p for p in prime_range(10^4) if p%8 in [1,7]]
>
>
> > Second I should find the all integers a and b su
For the first question, since Sage has the prime_range() function: [p
for p in prime_range(1) if mod(p, 8) in (1, 7)]. There are several
ways of filtering a list in Python, but I tend to choose list
comprehensions (http://en.wikipedia.org/wiki/
List_comprehension#Python)
On Jul 24, 8:24 am, ra
On Jul 24, 1:24 pm, raman wrote:
> Hi Dears
> First I must find all primes in the form p=8k+1 or p=8k+7 in range
> 1.
[p for p in prime_range(10^4) if p%8 in [1,7]]
> Second I should find the all integers a and b such that p=a^2-2b^2 in
> range 1.
[list(K.ideal(p).factor()[0][0].ge
Hi Dears
First I must find all primes in the form p=8k+1 or p=8k+7 in range
1.
Second I should find the all integers a and b such that p=a^2-2b^2 in
range 1.
Could you please help me for writing this program?
--
To post to this group, send email to sage-support@googlegroups.com
To unsub
Hi Dears
First I must find all primes in the form p=8k+1 or p=8k+7 in range 1.
Second I should find the all integers a and b such that p=a^2-2b^2 in
range 1.
Could you please help me for writing this program?
On 7/24/11, raman kurdi wrote:
> Dear Prof.Stein
> This is not homework but it
11 matches
Mail list logo