Re: [sage-support] complex numbers printing real part + imaginary part

2017-04-11 Thread Vincent Delecroix

Hello,

Indeed there are some unconsistancies

 sage: CC(1,2)
 1.00 + 2.00*I
 sage: CDF(1,2)
 1.0 + 2.0*I

versus

 sage: QQbar.one() + 2*QQbar.gen()
 2*I + 1
 sage: K = QuadraticField(-1)
 sage: K.one() + 2*K.gen()
 2*a + 1

Vincent

On 11/04/2017 18:25, Pedro Cruz wrote:

Hello,

sage is printing b*I + a and we want to see a + b * I

What could we do ?
We can create a function  to print it a + b*I but is any other standard way?

Thank you,
Pedro



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Sage for Windows, when?

2017-04-24 Thread Vincent Delecroix

Dear Jim,

For windows status, have a look at [1]. Concerning data storage with 
flash drive, the live USB key [2] gives you access to your hard drive. 
So I don't understand your limitation problem.


Vincent

[1] https://groups.google.com/forum/#!topic/sage-devel/t2s8cUdf4ZQ
[2] https://sagedebianlive.metelu.net/

On 23/04/2017 23:50, Jim Mooney wrote:

Sage is so painfully slow on win 8.1 since it's run in a virtualbox, I had
to fall back to Maxima (which is fine for now, but I'll want Sage
eventually). I don't want to partition and dual-boot linux, and running
linux from a flash drive only allows a tiny amount of storage for Sage,
even with a big flash drive. Is there any progress on Sage for Windows? Or
an ETA?



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Sage for Windows, when?

2017-05-02 Thread Vincent Delecroix

On 02/05/2017 00:20, Jim Mooney wrote:



On Monday, April 24, 2017 at 2:57:41 AM UTC-7, vdelecroix wrote:


Dear Jim,

For windows status, have a look at [1]. Concerning data storage with
flash drive, the live USB key [2] gives you access to your hard drive.
So I don't understand your limitation problem.

Vincent



Casper only allows about 2 gigs for Persistence between startups, so I
can't download much since Sage is big. If I'm mistaken, please clarify.


This is right, but you can use your *hard drive* or *any other storage 
device*. You are not limited by the persistence on the USB key that 
contains the system.


--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Discrete Logarithm

2017-05-11 Thread Vincent Delecroix

Hi,

"primitive element" is meant as "generator for the multiplicative group 
GF(p)^*" and not the additive group GF(p). The OP question is about the 
former and Johan answer is about the latter.


For very large p such as what you asked for is likely to be delicate 
(but I am not a specialist).


Vincent

On 11/05/2017 08:45, Johan S. H. Rosenkilde wrote:

Hi Panos

In GF(p) then an element g is primitive if its embedding into ZZ is
coprime with p-1. Since Euclidean algorithm is so fast, you can test
this:

sage: p = Primes().next(2^2048) #long
sage: g1 = 3
sage: gcd(g1, p-1)
3
sage: g2 = 5
sage: gcd(g2, p-1)
1

So 3 is not a primitive element in GF(p) but 5 is. (Since 5 is also a
prime, you could also have done g2.divides(p-1) instead)

Best,
Johan


Panos Phronimos writes:


Hello everyone,

I am trying to calculate a primitive element (g) of a big Finite Field:
GF(p) where p is prime number > 2^2048

So then, i could share a secret integer (r) as: m=g^r, but it seems
impossible to calculate it with function primitive_element()
Is there another way i can use to calculate it?

Thanks in advance,
Panos




--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Error Building Sage

2017-06-02 Thread Vincent Delecroix
It is only the documentation that failed to build. You should be able to 
use Sage. To fix the documentation you can try


make doc-clean
make doc

On 02/06/2017 22:24, Ben B wrote:

Hello all,

I have been trying to update my Sage so that I have the latest beta but
I have been getting a build error. I am running Mac OS Sierra 10.12.4 and
was trying to update from Sage 7.6. I attempted to update my Sage by using
the following commands:

git pull trac
make

Here is the error message that I received:

Error building Sage.

The following package(s) may have failed to build (not necessarily

during this run of 'make all'):

* documentation: dochtml

  log file: /Users/bbarros/Sage-develop/logs/pkgs/../dochtml.log
wj
The build directory may contain configuration files and other potentially
helpful information. WARNING: if you now run 'make' again, the build
directory will, by default, be deleted. Set the environment variable
SAGE_KEEP_BUILT_SPKGS to 'yes' to prevent this.

make: *** [all] Error 1


I have tried to build Sage several times now and it keeps giving me an
error.

Any help is greatly appreciated.

Ben Barros



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] define elliptic curve y^2=x^3-x over finite field 11

2017-06-20 Thread Vincent Delecroix

What is the problem!? "10 = -1 mod 11", no?

On 20/06/2017 12:52, Xavier Nogues wrote:

Hello,
I dont  know how to define elliptic curve y^2=x^3-x over finite field 11.
The negative  "-x" is the problem

p=11
E=EllipticCurve(GF(p),[0,0,0,-1,0]);



Elliptic Curve defined by y^2 = x^3 + *10*x* over Finite Field of size 11


Thanks





--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: [sage-devel] An issue with the .coefficient() function

2017-06-25 Thread Vincent Delecroix

Dear Eyo,

We use several mailing lists. Please ask these kind of questions on 
sage-support. Now the question is forwarded and continue the discussion 
there.


Best
Vincent

On 25/06/2017 16:51, baliza Eyo wrote:

Dear Sage developers,

Here is a quick question about the output of the .coefficient() for an SR
object.
having set up the variables as follows

sage: var('x,y')
(x, y)

Shouldn't the output of the following commands be the same:

sage: ((x^2 - 2)^2 - y^2).coefficient(x^4)
0
sage: expand(((x^2 - 2)^2 - y^2)).coefficient(x^4)
1
sage: ((x^2 - 2)^2 - y^2).diff(x,4).subs(x==0)/factorial(4)
1

The last two outputs are correct but why is 0 the intended output for
  ((x^2 - 2)^2 - y^2).coefficient(x^4)   ?
Thanks in advance,
Best regards,
Eyo,



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Re: csdp installed in 7.6?

2017-07-11 Thread Vincent Delecroix
To get the list of standard/optional/experimental packages in Sage you 
can use the command line


$ sage -standard --local
[package]...[latest version] ([version])

alabaster...0.7.8.p0 (0.7.8)
appnope.0.1.0.p0 (0.1.0.p0)
arb.2.8.1.p1 (2.8.1.p1)
babel...2.3.4.p0 (2.3.4)
etc

$ sage -optional --local
[package]...[latest version] ([version])

4ti21.6.7 (not_installed)
atlas...3.10.2.p3 (not_installed)
autotools...20141105 (not_installed)
etc

$ sage -experimental --local
[package]...[latest version] ([version])

compilerwrapper.1.2 (not_installed)
fricas..1.2.7 (not_installed)
gap301may17 (not_installed)
etc

On 11/07/2017 20:53, Dima Pasechnik wrote:

current optional packages of Sage are listed at
http://www.sagemath.org/download-packages.html
And yes, csdp is current---although it is optional, so it needs to be
installed
into 7.3 or 7.6 by issuing 'sage -i csdp' command.

Hope this explains.


On Tuesday, July 11, 2017 at 7:11:37 PM UTC+1, c. e. larson wrote:


i'm trying to to a large computation. the latest version of Sage on my
university's cluster is 7.3. one of the functions (lovasz_number) requires
the optional csdp package. i'm not allowed to install additional packages
myself. so i can request it - or request that 7.3 be upgraded to 7.6 - if
csdb is included with 7.6.

since lovasz_number computes on Cocalc csdb is installed there - but does
that mean csbp is *included* in (the console version of) Sage 7.6? (or,
even better, how can i figure out these answers on my own?)





--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] guesing algebraic numbers from floats

2017-07-20 Thread Vincent Delecroix

sage: algdep(RealField(20)(1.4142), 2)
x^2 - 2

Note that you have to specify the maximal degree. Be careful about the input

sage: algdep(1.4142, 2)
5000*x - 7071

This is using the PARI/GP algdep command (whose algorithm is a LLL 
reduction).


Vincent

On 20/07/2017 16:31, Daniel Krenn wrote:

Dear all,

I vaguely remember a discussion on this list some years ago about the
following: Given a floating point number, what is a good guess for the
simplest possible algebraic number that approximates this?

E.g. The input 1.4142 gives back sqrt(2) or x^2-2 and says that this is
approximates the input on the first four digits. (Of course much more
precise guesses would be possible, but a simple one should just do fine.)

(I am aware that this is not a Sage-specific question, but when I
remember correctly, there was some software mentioned in that thread
years ago, which can do this. Maybe I am completely wrong and it was
somewhere else; but maybe someone has an idea if such a program exists.)

Best wishes

Daniel



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Difference between sagemathcloud and sagemath

2017-07-23 Thread Vincent Delecroix

Very same question discussed at

https://ask.sagemath.org/question/38357/sagemath-cocal-what-is-the-actual-status/

On 22/07/2017 16:08, William Stein wrote:

On Sat, Jul 22, 2017 at 8:43 AM Gianni D.  wrote:


What are difference between sagemathcloud and sagemath?



Hi,

sagemathcloud no longer exists.   CoCalc, which used to be called
sagemathcloud, is
a web application.  SageMath, is a large Python-based math software
package.  It is
like comparing apples and oranges.

William



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] phc interface not working in Sage version 8.0

2017-07-26 Thread Vincent Delecroix
Do you have phc installed on your computer? The error message says that 
there is no 'phc' command available...


(I was not able to install phcpack so I can not properly test the interface)

On 26/07/2017 17:15, 'Peter Mueller' via sage-support wrote:

Trying the example from the doc of phc results in:

sage: from sage.interfaces.phc import phc
sage: R. = PolynomialRing(CDF,2)
sage: testsys = [x^2 + 1, x*y - 1]
sage: phc.mixed_volume(testsys)
---
ExceptionPexpect  Traceback (most recent call last)
 in ()
> 1 phc.mixed_volume(testsys)

/home/mueller/local/sage-8.0/local/lib/python2.7/site-packages/sage/interfaces/phc.pyc
in mixed_volume(self, polys, verbose)
 758 4
 759 """
--> 760 output_filename = self._output_from_command_list(['phc
-m','4','n','n','n'], polys, verbose = verbose)
  
 761

 762 out = open(output_filename).read()

/home/mueller/local/sage-8.0/local/lib/python2.7/site-packages/sage/interfaces/phc.pyc
in _output_from_command_list(self, command_list, polys, verbose)
 452
 453 # Create a phc process
--> 454 child_phc = pexpect.spawn(command_list[0])
 455 # feed it the commands
 456 child_phc.sendline('y')

/home/mueller/local/sage-8.0/local/lib/python2.7/site-packages/pexpect/pty_spawn.pyc
in __init__(self, command, args, timeout, maxread, searchwindowsize,
logfile, cwd, env, ignore_sighup, echo, preexec_fn, encoding, codec_errors,
dimensions)
   
 196 self.name = ''

 197 else:
--> 198 self._spawn(command, args, preexec_fn, dimensions)
 199
 200 def __str__(self):

/home/mueller/local/sage-8.0/local/lib/python2.7/site-packages/pexpect/pty_spawn.pyc
in _spawn(self, command, args, preexec_fn, dimensions)
 269 if command_with_path is None:
 270 raise ExceptionPexpect('The command was not found or
was not ' +
--> 271 'executable: %s.' % self.command)
 272 self.command = command_with_path
  
 273 self.args[0] = self.command


ExceptionPexpect: The command was not found or was not executable: phc.
sage:



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Sage_crash_report

2017-08-02 Thread Vincent Delecroix

Could you give details on:

- your precise operating system version
- how did you install Sage

On 02/08/2017 11:41, 张彪 wrote:





--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] INSTALLATION SAGE

2017-08-22 Thread Vincent Delecroix
Which version of Ubuntu do you have? There is now a package that works 
for Ubuntu 17.04 (zesty)


   https://packages.ubuntu.com/search?keywords=sagemath-common

This is by far the best way to use Sage under Ubuntu.

Vincent

On 22/08/2017 08:08, KULDEEP SARMA wrote:

How sage can be installed in Ubuntu system? I had followed the instructions
but it says no such file



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Sage crashes with a rational exponent

2017-08-31 Thread Vincent Delecroix

Thanks for you report. It works fine for me 8.1.beta3 also on archlinux.

Can you give more precision about:
- how did you install sage 8.0?
- does the rest of Sage looks ok?

On 31/08/2017 08:38, Tavian Barnes wrote:

The following simple expression crashes Sage 8.0 on Arch Linux:

tavianator@cosmicray $ sage

┌┐
│ SageMath version 8.0, Release Date: 2017-07-21 │
│ Type "notebook()" for the browser-based notebook interface.│
│ Type "help()" for help.│
└┘
sage: version()
'SageMath version 8.0, Release Date: 2017-07-21'
sage: sage: (2*sqrt(x))^Rational(2)
---
MemoryError   Traceback (most recent call
last)
sage/rings/integer.pyx in sage.rings.integer.Integer.__repr__
(/build/sagemath/src/sage-8.0/src/src/build/cythonized/sage/rings/integer.c:7976)
()

sage/rings/integer.pyx in sage.rings.integer.Integer.str
(/build/sagemath/src/sage-8.0/src/src/build/cythonized/sage/rings/integer.c:8429)
()

memory.pxd in cysignals.memory.check_malloc
(/build/sagemath/src/sage-8.0/src/src/build/cythonized/sage/rings/integer.c:45920)
()

MemoryError: failed to allocate 1292913990 bytes
Exception MemoryError: MemoryError('failed to allocate 1292913990 bytes',)
in 'sage.libs.pynac.pynac.py_repr' ignored




--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Sage crashes with a rational exponent

2017-08-31 Thread Vincent Delecroix

On 31/08/2017 10:05, Tavian Barnes wrote:

On Thursday, 31 August 2017 12:24:29 UTC-4, vdelecroix wrote:


Thanks for you report. It works fine for me 8.1.beta3 also on archlinux.



1292913990 bytes is only 1.3GiB.  I don't have that much free, but if you
do it probably just works.


Indeed. Though it is weird that Sage asks for that much memory for this 
small computation!


--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] jupyter nbconvert broken

2017-09-07 Thread Vincent Delecroix

On 04/09/2017 12:40, Pstrang Rzekle wrote:

   File "/home/mitchw/Downloads/nbconvert/nbconvert/__init__.py", line 4, in


How did you instal Jupyter? Why is it in /home/mitchw/Downloads?

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Re: OpenBlas multithreaded or not ?

2017-09-10 Thread Vincent Delecroix
This is too bad. There is no other way around? It is a pitty that we 
have to disable multicore in one of the few libraries where this is 
available...


On 05/09/2017 14:39, Volker Braun wrote:

I disabled multithreading in openblas in #22021 as interrupting tends to
deadlock the thread pool:


commit eda96f33267984aaf82f96f759c654a185439c72
Merge: bb399086c4 026672777b
Author: Release Manager 
Date:   Sat Dec 24 20:58:34 2016 +0100

 Trac #22021: OpenBLAS randomly crashes / deadlocks
 
 Openblas occasionally crashes or deadlocks, most often in

 `src/sage/matrix/matrix_integer_dense.pyx` but also other places. But
 its always some longish linear algebra computation. Examples in the
 comments.
 
 URL: https://trac.sagemath.org/22021

 Reported by: vbraun
 Ticket author(s): Volker Braun
 Reviewer(s): François Bissey



On Tuesday, September 5, 2017 at 6:43:32 PM UTC+2, tdumont wrote:


Hi,

I am doing some performances measurements  with Sage/scipy.
It's matrix x matrix multiplication (not a very new benchmark).

It appears that, on the same computer Sage version 8.0 uses Openblas
with multithreading, but not Sage version 8.1.beta3:



-Example (4 core, broadwell, 3.4ghz. Peak performance 217 Gflops !):
size of matrices: 640

   -> Sage version 8.0 :
   Gflops=  138.359946456  Portion peak perf =  0.6358  (top says %cpu=400)

   -> Sage version 8.1.beta3:
   Gflops=  48.5945679306  Portion peak perf =  0.2233 (%cpu=100)

Both of Sage versions where compiled from source.

My questions:
Will OpenBlas be fixed to 1 thread in the next versions of sage?

t.d.






--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Re: Conversion of libgap data to sage data

2017-09-16 Thread Vincent Delecroix

Hi Simon,

It would be nice if matrices had (lib)gap conversion (which fast 
implementation for specialized types). Something along


sage: m = matrix(ZZ, 100)
sage: X = my_gap_matrix()
sage: m.set_from_gap(X)

This has to be done for each matrix type in order to be efficient. One 
problem of the .sage() on (lib)gap matrices is that it corresponds to 
the generic GapElement_List one. It would be better to provide an extra 
argument "parent" to it in order to build vectors/matrices 
appropriately. If that is the case we could have the alternative to the 
example above


sage: X = my_gap_matrix()
sage: X.sage(parent=MatrixSpace(ZZ, 100))

Please put me in cc if you start opening trac tickets about it!

Best
Vincent

On 16/09/2017 10:50, Simon King wrote:

On 2017-09-16, Simon King  wrote:

What to do? As sage_eval sucks, I should probably just try to
write the code into a (python) file and use sage.repl.load.load.


No, it is as bad as sage_eval, i.e., makes my laptop use swap
very quickly.




--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] operate with base 2 numbers

2017-11-05 Thread Vincent Delecroix
Your question was unclear to me. All numbers are stored in base 2 on a 
computer. To create a number using base 2 notations you need to use 
"named arguments" as in


sage: RealNumber("10101e2", base=2)
84.0

sage: Rational("101/10010", base=2)
5/18

Vincent

On 04/11/2017 19:00, René Mérou wrote:


Hi all,

Can anyone explain how can I operate with floating numbers in base 2?

I want to have (1010-10)/10   and have one 1.010101010101010...  or
1.010101010101*2^0  or  if possible, to have 1.(01) a periodic number.

I know how to have it in base 10 and use str(2) to have the answer but i
would like to continue my work with the result as a number not as a string.

My tentatives:

Integer('1000',2)  goes well but just with integers

Rational('100.1',3)

TypeError: unable to convert '100.1' to a rational

Real('1.1',2)
NameError: name 'Real' is not defined

In a phrase, is there a way to operate directly with floating point or 
scientific numbers in base 2?



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] User Defined Embedding in Number fields

2017-11-10 Thread Vincent Delecroix

Hi,

Could you provide some concrete examples you are working with?

On 08/11/2017 06:48, Abhishek Bharadwaj wrote:

I would like to know whether is it possible to define embedding between
number fields explicitly rather than using the .embedding command. For
instance,
Given 2 "isomorphic" number fields L. and M., and I know the
isomorphism a maps to b, Can I give an explicit command specifying the
embedding between L and M rather than
choosing an element from g=L.embeddings(M);



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] integrals and algorithms

2017-11-12 Thread Vincent Delecroix

You should give the command that leads you to the error.

Concerning sympy, note that you can use it directly within Sage

sage: import sympy
sage: x = sympy.Symbol('x')
sage: sympy.integrate(sympy.sin(x^2), x)
3*sqrt(2)*sqrt(pi)*fresnels(sqrt(2)*x/sqrt(pi))*gamma(3/4)/(8*gamma(7/4))

On 12/11/2017 11:30, Enrique Artal wrote:

I was prepairing some exercises and I got some errors using differente
algorithms for integral, using version 8.0. Integrating with
mathematica_free, I got this error:
Traceback (most recent call last):
   File "", line 1, in 
   File "_sage_input_4.py", line 10, in 
 exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8
-*-\\n" +
_support_.preparse_worksheet_cell(base64.b64decode("aW50ZWdyYWwoeCx4LGFsZ29yaXRobT0nbWF0aGVtYXRpY2FfZnJlZScp"),globals())+"\\n");
execfile(os.path.abspath("___code___.py"))
   File "", line 1, in 
 
   File "/tmp/tmpfvk1XJ/___code___.py", line 2, in 

 exec compile(u"integral(x,x,algorithm='mathematica_free')" + '\n', '',
'single')
   File "", line 1, in 
 
   File

"/usr/local/sage-8.0/local/lib/python2.7/site-packages/sage/misc/functional.py",
line 721, in integral
 return x.integral(*args, **kwds)
   File "sage/symbolic/expression.pyx", line 12275, in
sage.symbolic.expression.Expression.integral
(/usr/local/sage-8.0/src/build/cythonized/sage/symbolic/expression.cpp:69945)
   File
"/usr/local/sage-8.0/local/lib/python2.7/site-packages/sage/symbolic/integration/integral.py",
line 795, in integrate
 return integrator(expression, v, a, b)
   File
"/usr/local/sage-8.0/local/lib/python2.7/site-packages/sage/symbolic/integration/external.py",
line 97, in mma_free_integrator
 page = page[page.index('"inputForm"'):page.index('"outputForm"')]
ValueError: substring not found
   


If I try  integral(sin(x^2),x,algorithm='sympy') I get:

Traceback (most recent call last):
   File "", line 1, in 
   File "_sage_input_20.py", line 10, in 
 exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8
-*-\\n" +
_support_.preparse_worksheet_cell(base64.b64decode("aD1pbnRlZ3JhbChzaW4oeF4yKSx4LGFsZ29yaXRobT0nc3ltcHknKQ=="),globals())+"\\n");
execfile(os.path.abspath("___code___.py"))
   File "", line 1, in 
 
   File "/tmp/tmpK8eQi1/___code___.py", line 3, in 

 exec compile(u"h=integral(sin(x**_sage_const_2 ),x,algorithm='sympy')"
+ '\n', '', 'single')
   File "", line 1, in 
 
   File

"/usr/local/sage-8.0/local/lib/python2.7/site-packages/sage/misc/functional.py",
line 721, in integral
 return x.integral(*args, **kwds)
   File "sage/symbolic/expression.pyx", line 12275, in
sage.symbolic.expression.Expression.integral
(/usr/local/sage-8.0/src/build/cythonized/sage/symbolic/expression.cpp:69945)
   File
"/usr/local/sage-8.0/local/lib/python2.7/site-packages/sage/symbolic/integration/integral.py",
line 795, in integrate
 return integrator(expression, v, a, b)
   File
"/usr/local/sage-8.0/local/lib/python2.7/site-packages/sage/symbolic/integration/external.py",
line 56, in sympy_integrator
 return result._sage_()
   File
"/usr/local/sage-8.0/local/lib/python2.7/site-packages/sympy/core/mul.py",
line 1572, in _sage_
 s *= x._sage_()
   File
"/usr/local/sage-8.0/local/lib/python2.7/site-packages/sympy/core/function.py",
line 707, in _sage_
 func = getattr(sage, fname)
AttributeError: 'module' object has no attribute 'fresnels'

It seems that fresnels is defined in sympy but not in sagemath, Is it
possible to correct these errors? Thanks, Enrique.



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Powers of polynomials in positive characteristic extremely slow

2017-11-30 Thread Vincent Delecroix

Dear Peter,

The power in GF(2)[a,b][x] uses a very generic datastructure and a very 
generic power method, see the code at [1]. As you can see, when the 
characteristic is > 0 and the power > 20 a special method that explains 
the difference seen between f^16 and f^1024.


Did you check how it goes with GF(2)[a,b,x]?

If you have any idea to improve the powering algorithm, Sage is an open 
source software that welcomes contribution!


Best
Vincent

 [1] 
https://github.com/sagemath/sage/blob/master/src/sage/rings/polynomial/polynomial_element.pyx#L2105


On 28/11/2017 22:23, 'Peter Mueller' via sage-support wrote:

In Sage 8.0 I find the following unexpected behavior:

sage: k. = GF(2)[]
sage: K. = k[]
sage: f = x^1000 + a*x^500 + b
sage: time f^16
CPU times: user 7.61 s, sys: 8 ms, total: 7.62 s
Wall time: 7.62 s
x^16000 + a^16*x^8000 + b^16

Is it really the case that the exponentiation does not make use of the
positive characteristic? Of course I could write a quick function which
does what I need in *reasonable* time. But somehow I hope that Sage
provides the most basic arithmetic operations, and I simply missed it. What
puzzles me even more is this: f^16 takes 7.61 s, but f^1024 takes only 2.04
s. While the latter time is still ridiculous, it seems that for larger
exponents some better (yet very poor) algorithm is used.

-- Peter Mueller



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Bug in polynomial ring over quotient ring of multivariate polynomial ring?

2017-11-30 Thread Vincent Delecroix
Not really a bug but it is indeed annoying. I provided a fix for this 
very specific problem


  https://trac.sagemath.org/ticket/24308

And opened an issue for the more general problem of the fact that 
quotient rings do not know their characteristic


  https://trac.sagemath.org/ticket/24309

Vincent

On 30/11/2017 19:40, 'Peter Mueller' via sage-support wrote:

Is it a bug, or is there a reasonable explanation of the following?

kk. = GF(2)[]
k. = kk.quo(a^2+a+1)
K. = k[]
for n in [10..32]:
 print n, (T*y)^n

0 y*T^10
11 (y + 1)*T^11
12 T^12
13 y*T^13
14 (y + 1)*T^14
15 T^15
16 y*T^16
17 (y + 1)*T^17
18 T^18
19 y*T^19
20 (y + 1)*T^20
21---
NotImplementedError   Traceback (most recent call last)
[...]
--> 986 return self.base_ring().characteristic()
 987
 988 def cyclotomic_polynomial(self, n):
[...]
/home/mueller/local/sage-8.0/local/lib/python2.7/site-packages/sage/rings/quotient_ring.pyc
in characteristic(self)
 757 NotImplementedError
 758 """
--> 759 raise NotImplementedError
 760
 761 def defining_ideal(self):

NotImplementedError:
sage:

-- Peter Mueller



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Memory leak in loops (SageMath 8.1)

2017-12-15 Thread Vincent Delecroix

You can fill your memory with something simpler

  sage: l = range(10**9)

As far as I can see it has nothing to do with Sage or loops. In Python2 
the range functions constructs a list. And in the above example, the 
list is huge.


Vincent

On 15/12/2017 12:06, Marco Caselli wrote:

Hello there,
I am currently having trouble in memory management, I wrote a code that was
not supposed to store anything but actually it was using a massive amount
of memory. At a first glance, I thought it was related to some function in
my code, such as factor() for polynomials in a multivariate ring over a
finite field.  I dug a bit deeper and the problem seems even at a lower
level:

def check_memory(k):

a=get_memory_usage()
silly_function(k)
return get_memory_usage()-a

def silly_function(k):
for i in range(10^k):
2+2



Notice that silly_function does not store neither return anything, so the
memory usage should be zero.
check_memory(9) returned 23446.37109375, this amount is in MB, so those are
23GB. This information is consistent with the data from top. At a second
run it returned just 972.62109375, which is still a lot.



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] LattE failed to build

2017-12-18 Thread Vincent Delecroix

Alternative workaround: manually download the following package

https://mirrors.tuna.tsinghua.edu.cn/sagemath/spkg/upstream/latte_int/latte_int-1.7.3.tar.gz

and put it in the upstream/ repository in your sage install. Once done, 
you should be able to run


 $ sage -i latte_int

Vincent

On 18/12/2017 09:23, Jeroen Demeyer wrote:

There seems to be a problem with your networking setup. Does this help:

https://superuser.com/questions/879731/osx-ssh-could-not-resolve-hostname-nodename-nor-servname-provided-or-not-kno 





--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] LattE failed to build

2017-12-18 Thread Vincent Delecroix

On 18/12/2017 09:56, Sihuang Hu wrote:

I used : sudo sage -i latte_int and it works. Thanks.


Nobody suggested that! This is a very bad idea to use sudo here. The 
permissions of your Sage installation are now messed up.


Though, if it works. Good enough.

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] How to make tutorial cells editable and possible to evaluate?

2017-12-24 Thread Vincent Delecroix
In the top right part of the screen there is an "Activate" button that 
does the job.


On 24/12/2017 00:44, Tobiasz Budzyński wrote:

Hi,
I'm just starting.
My 8.0 sagemath notebook with jupiter on windows with google Chrome works.
But the tutorials that I open in Help pop out in different tab just as a
web page. I can push button of activation witch I think evaluates the cells
or sth, but its not editable.
I attach scr shoot.
Would be greateful for a response.
Cheers,
Tobiasz Budzyński
budzynski.art



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] avoiding startup time cost with multiple invocations

2018-01-10 Thread Vincent Delecroix

Have a look at

  https://docs.python.org/2/extending/embedding.html

The following does work for me

1. Create a test.c file with
{{{
#include 

int
main(int argc, char *argv[])
{
  Py_SetProgramName("python");  /* optional but recommended */
  Py_Initialize();
  PyRun_SimpleString("from sage.all import *\n"
 "print ZZ(3).is_prime()\n");
  Py_Finalize();
  return 0;
}
}}}

2. Then to compile you need to do

$ sage -sh
$ gcc $(python2-config --cflags) $(python2-config --ldflags) test.c

3. Run the program (still in the sage-sh shell)

$ ./a.out
True

4. Exit sage environment

$ exit

Vincent

On 10/01/2018 12:22, Berkeley Churchill wrote:

As part of a research project we're using sage as a subroutine for some
matrix computations over rings.  We have hundreds or thousands of these
computations, but each computation is fairly quick.  Right now, for each
computation we write python code into a .sage file, and then start a new
process with "sage somefile.sage > output".  This works fine, except each
time we incur the startup time, which is about 2.5 seconds (whereas running
a tiny python program is < 0.02s).  Since we call sage hundreds of times,
this adds up pretty quickly.

I'm wondering if there's a better way to do this.  Is there a recommended
practice?  Otherwise, is it possible to start sage in one process and then
reuse it?  Or, if there's a way to start up sage quickly (comparable to
python's start time) and then load the modules we need, that would be cool
too.  I'm hoping for a solution that doesn't require many changes to our
code or setting up server infrastructure.  We also want every computation
to be independent of the others.  For instance, we don't want an exception
in one computation to cause problems for a future one.  Any suggestions are
appreciated.  If it makes any difference, our code base is C++.



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Re: Find_root not finding a root

2018-03-05 Thread Vincent Delecroix

On 05/03/2018 20:01, saad khalid wrote:

Hello, and thank you for your response. While I agree that the behaviour of
the function certainly complies with the specifications listed in its
description, I think everyone would agree that it would be better if it did
give all of the roots in a given interval. Would you happen to know
anything about the difference between the alg Mathematica uses vs the alg
Sage uses that lets Mathematica find the root without making the interval
so precise?


Hello,

I don't agree. There might be infinitely many roots (just take
the function x * sin(1/x) in the interval [-1,1]).

There is a slight difference between root *isolation* and root
*approximation*. Since you are not providing the Mathematica code
you are using it is hard to tell anyway.

Best
Vincent

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Re: Has Big-Endian support been deprecated yet?

2018-03-13 Thread Vincent Delecroix

Dear Kim,

As mentioned on the ticket, this big-endian incompatibility does not
prevent the inclusion of primecount as an "experimental package" that I
still aim to achieve (the type of the package "experimental", "optional"
or "standard" is simply a flag). In practice "experimental" means "not
officially supported" and "less tested".

And as Dima mentioned, it would be simpler for SageMath to have
primecount supporting big-endian. We certainly do not want that a single
library prevents using SageMath on big-endian architecture.

Now, three questions for Sage developers:

- Who is testing a big-endian architecture?

- Are all optional packages big-endian compatible?

- Is it reasonable to ask for big-endian compatibility for
  optional packages?

Vincent

PS: to discuss these kind of issues related to development, it is better
to use the other google group sage-devel.

On 13/03/2018 23:11, Dima Pasechnik wrote:



On Tuesday, March 13, 2018 at 9:41:50 PM UTC, Kim Walisch wrote:


Hi,

We all know that the big-endian CPU architecture is slowly dying,
some people even state that "Big-Endian is effectively dead".

So my question is: Does sagemath still support big-endian CPU
architectures like e.g. 32-bit Sparc?



We have recently more or less revived a SPARC Solaris 11 port of Sagemath.
So yes, please, make it both-endian...


  



I am asking because there is a ticket
(https://trac.sagemath.org/ticket/24966
)
to integrate my primecount
library into sagemath and primecount currently only supports
little-endian CPUs. I could support big-endian CPUs but I want to
make sure this is required by sagemath.

Thanks,
Kim





--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] scalar restriction in extension field

2018-04-16 Thread Vincent Delecroix

On 16/04/2018 09:21, fanxue...@iie.ac.cn wrote:

I have constructed  a big prime field:

p=68235916425158872634653027
F=GF(p)


Here is what I get

sage: p = 68235916425158872634653027
sage: F = GF(p)
Traceback (most recent call last):
...
ValueError: the order of a finite field must be a prime power

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] scalar restriction in extension field

2018-04-16 Thread Vincent Delecroix

On 16/04/2018 13:15, John Cremona wrote:

On 16 April 2018 at 12:04, Vincent Delecroix <20100.delecr...@gmail.com>
wrote:


On 16/04/2018 09:21, fanxue...@iie.ac.cn wrote:


I have constructed  a big prime field:


p=68235916425158872634653027

F=GF(p)




Here is what I get

sage: p = 68235916425158872634653027
sage: F = GF(p)
Traceback (most recent call last):
...
ValueError: the order of a finite field must be a prime power



OK, but apart from typos in the report there is a real bug:

sage: p=next_prime(68235916425158872634653027)
sage: F=GF(p)
sage: E2=GF(p^6)

  AttributeError: 'int' object has no attribute 'divisors'


reason: type inconsistency in the output of K.degree()

sage: type(GF(next_prime(2^62)^2).degree())


versus

sage: type(GF(next_prime(2^63)^2).degree())


Vincent

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] scalar restriction in extension field

2018-04-16 Thread Vincent Delecroix

On 16/04/2018 15:09, Vincent Delecroix wrote:

On 16/04/2018 13:15, John Cremona wrote:

On 16 April 2018 at 12:04, Vincent Delecroix <20100.delecr...@gmail.com>
wrote:


On 16/04/2018 09:21, fanxue...@iie.ac.cn wrote:


I have constructed  a big prime field:


p=68235916425158872634653027

F=GF(p)




Here is what I get

sage: p = 68235916425158872634653027
sage: F = GF(p)
Traceback (most recent call last):
...
ValueError: the order of a finite field must be a prime power



OK, but apart from typos in the report there is a real bug:

sage: p=next_prime(68235916425158872634653027)
sage: F=GF(p)
sage: E2=GF(p^6)

  AttributeError: 'int' object has no attribute 'divisors'


reason: type inconsistency in the output of K.degree()

sage: type(GF(next_prime(2^62)^2).degree())


versus

sage: type(GF(next_prime(2^63)^2).degree())



which is a consequence of this one

sage: R1 = PolynomialRing(Zmod(next_prime(2^62)), 'x')
sage: type(R1.an_element().degree())


versus

sage: R2 = PolynomialRing(Zmod(next_prime(2^63)), 'x')
sage: type(R2.an_element().degree())


Vincent

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] scalar restriction in extension field

2018-04-16 Thread Vincent Delecroix

fixed at

https://trac.sagemath.org/ticket/25182

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Fedora 27: Sage installation

2018-04-25 Thread Vincent Delecroix

Dear Manfred,

Thanks for you report. However this list is intended for sage
development which is not likely to be read by package maintainers. You
would better address your mail to the corresponding fedora mailing list.

Best
Vincent

On 25/04/2018 17:59, Manfred Scheucher wrote:

Hello,

I just set up a new fedora (release 27) and installed sage math using the
dnf package manager. in order to start sage I had to install ipython (some
dependencies) and, there are also seem to be some packages missing to solve
mixed integer programs... I managed to change the error message by
installing some further packages but at some point just downloaded the full
tar.bz2 from the sage website, which works without any problems

however, since this seems to be a dependency problem please take a look or
forward to the responsible developers

Best regards,
Manfred



  



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Sage 8.2 build fails on Fedora 28.....

2018-05-19 Thread Vincent Delecroix

Thanks for your report.

On 19/05/2018 04:42, doug5y wrote:

gcc version 8.1.1 20180502 (Red Hat 8.1.1-1) (GCC)


There are known issues with gcc 8.1. You need to either downgrade your
gcc or wait for next releases (python is fixed 8.3.beta2 but linbox is
not, see https://trac.sagemath.org/ticket/25353)

Vincent

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Re: Sage's animations and windows 10

2018-06-14 Thread Vincent Delecroix

On 01/06/2018 23:40, Erik Bray wrote:

On Friday, June 1, 2018 at 3:32:19 PM UTC+2, Francesco wrote:


Hello everyone.
My installation is Sage 8.2 and windows 10 64bit, with imagemagick and
ffmpeg installed. I send these commands to sage: ( an example of reference
manual )

sage: sines = [plot(c*sin(x), (-2*pi,2*pi), color=Color(c,0,0), ymin=-1, 
ymax=1) for c in sxrange(0,1,.2)]
sage: a = animate(sines)
sage: a.show()



after the last command sage tells:
convert.exe: unable to open image
'/dot_sage/temp/DESKTOP-JPA9NBD/7980/tmp_xZEVL6.gif': No such file or
directory @ error/blob.c/OpenBlob/3335.
/opt/sagemath-8.2/local/lib/python2.7/site-packages/sage/repl/rich_output/
display_manager.py:590: RichReprWarning: Exception in _rich_repr_ while
displaying object:
Error: Cannot generate GIF animation.  Verify that convert
(ImageMagick) or ffmpeg is installed, and that the objects passed to
the animate command can be saved in PNG image format.

See www.imagemagick.org and www.ffmpeg.org for more information.
   RichReprWarning,
Animation with 5 frames


But imagemagick and ffmpeg are installed!
Is it a bug ?


I don't know.  How did you install imagemagick and/or ffmpeg?


From the error message, the problem does not seem to come from
a problem with the program (convert.exe). Rather the "cygwin" version of
the path "/dot_sage/temp/DESKTOP-JPA9NBD/7980/tmp_xZEVL6.gif"
seems not understood. Could it be possible that
convert.exe would like something like C:/path/to/my/gif?

Erik, is there a straightforward path conversion cygwin <-> windows?


(I didn't even now Sage did anything with these--are they optional
packages?)


These are not optional packages, but since recently they are "features"

https://trac.sagemath.org/ticket/25305

Vincent

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] problem installing sage on ubuntu 18.04

2018-06-28 Thread Vincent Delecroix

How did you install it?

On 27/06/2018 18:53, 4.r.c.h.4.n.g.3.l.0...@gmail.com wrote:

┌┐
│ SageMath version 8.1, Release Date: 2017-12-07 │
│ Type "notebook()" for the browser-based notebook interface.│
│ Type "help()" for help.│
└┘
Traceback (most recent call last):
   File "/usr/share/sagemath/bin/sage-ipython", line 7, in 
 from sage.repl.interpreter import SageTerminalApp
ImportError: No module named repl.interpreter

I'm new to sage.I'm having a problem while installing it.
So please help me to get this problem rectified

Regards



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Re: Sage's animations and windows 10

2018-06-28 Thread Vincent Delecroix

Dear Erik,

On 22/06/2018 16:53, Erik Bray wrote:

On Thu, Jun 14, 2018 at 11:46 AM Vincent Delecroix
<20100.delecr...@gmail.com> wrote:


On 01/06/2018 23:40, Erik Bray wrote:

On Friday, June 1, 2018 at 3:32:19 PM UTC+2, Francesco wrote:


Hello everyone.
My installation is Sage 8.2 and windows 10 64bit, with imagemagick and
ffmpeg installed. I send these commands to sage: ( an example of reference
manual )

sage: sines = [plot(c*sin(x), (-2*pi,2*pi), color=Color(c,0,0), ymin=-1, 
ymax=1) for c in sxrange(0,1,.2)]
sage: a = animate(sines)
sage: a.show()



after the last command sage tells:
convert.exe: unable to open image
'/dot_sage/temp/DESKTOP-JPA9NBD/7980/tmp_xZEVL6.gif': No such file or
directory @ error/blob.c/OpenBlob/3335.
/opt/sagemath-8.2/local/lib/python2.7/site-packages/sage/repl/rich_output/
display_manager.py:590: RichReprWarning: Exception in _rich_repr_ while
displaying object:
Error: Cannot generate GIF animation.  Verify that convert
(ImageMagick) or ffmpeg is installed, and that the objects passed to
the animate command can be saved in PNG image format.

See www.imagemagick.org and www.ffmpeg.org for more information.
RichReprWarning,
Animation with 5 frames


But imagemagick and ffmpeg are installed!
Is it a bug ?


I don't know.  How did you install imagemagick and/or ffmpeg?


  From the error message, the problem does not seem to come from
a problem with the program (convert.exe). Rather the "cygwin" version of
the path "/dot_sage/temp/DESKTOP-JPA9NBD/7980/tmp_xZEVL6.gif"
seems not understood. Could it be possible that
convert.exe would like something like C:/path/to/my/gif?

Erik, is there a straightforward path conversion cygwin <-> windows?


(I didn't even now Sage did anything with these--are they optional
packages?)


These are not optional packages, but since recently they are "features"

https://trac.sagemath.org/ticket/25305


If you point me in the right direction in the code, this is easy to fix:

```
import cygwin
path = cygwin.cygpath(path)
```

This will convert a POSIX path within Cygwin to the equivalent Windows
path for passing to an external, non-Cygwin program.  You can see some
existing examples of this in the code, for example, in the Jmol
interface (which is still broken, but for other reasons...)


All the relevant code is in "sage/plot/animate.py". Something like

932 savefile = os.path.abspath(savefile)
...
939 cmd = 'cd "%s"; sage-native-execute ffmpeg -y -f image2 %s -i %s %s 
%s' % (pngdir, early_options, pngs, ffmpeg_options, savefile)


is certainly wrong.

I am sorry that I have no windows machine to test.

Best
Vincent

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] binomial() puts

2018-08-07 Thread Vincent Delecroix

The global binomial function is to be blamed. The one
in arith works fine

sage: R. = ZZ[]
sage: sage.arith.all.binomial(q,2)
1/2*q^2 - 1/2*q
sage: sage.arith.all.binomial(q,2).parent()
Univariate Polynomial Ring in q over Rational Field

Vincent

On 07/08/2018 07:08, J E Cremona wrote:

sage: R. = ZZ[]
sage: b = binomial(q,2)
sage: b
1/2*(q - 1)*q
sage: b.parent()
Symbolic Ring

especially when compared with

sage: binomial(q,1).parent()
Univariate Polynomial Ring in q over Integer Ring

John



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] binomial() puts

2018-08-08 Thread Vincent Delecroix

On 08/08/2018 00:26, John Cremona wrote:

On 7 August 2018 at 20:56, Vincent Delecroix <20100.delecr...@gmail.com>
wrote:


The global binomial function is to be blamed. The one
in arith works fine

sage: R. = ZZ[]
sage: sage.arith.all.binomial(q,2)
1/2*q^2 - 1/2*q
sage: sage.arith.all.binomial(q,2).parent()
Univariate Polynomial Ring in q over Rational Field



Thanks.  So if I put

from sage.arith.all import binomial

at the top then all works as expected.

The example you gave will work but not the following one

sage: var('m,n')
(m, n)
sage: binomial(m,n)
binomial(m, n)


This does leave the questions as to
why the symbolic version is imported but not this one.


The above example is the answer. You might want to manipulate
binomial as an abstract mathematical function.


 Ideally the global
function would test the type / parent of the first input and use that to
decide which function to call.  The current practice will be a cause of
bugs.


Did you fill a ticket on trac for the buggy type behavior?

Vincent

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Unable to display graphs from Ubuntu 18.04, Sage 8.3, 64 bit PC

2018-08-12 Thread Vincent Delecroix

Dear Graham,

Note that on Ubuntu 18.04 there is a sagemath and
sagemath-jupyter packages available in apt. They work
with the system Python and simplifies a lot installation.

Best
Vincent

On 8/12/18 7:57 AM, Graham Gerrard wrote:

Hi Jan

I initially installed from the binary tarball.  Successfully tried

sudo apt install tk tk-dev
sage -f python2

Ubuntu18.04 seems to be missing several development tools.  So I guess this
will all be resolved when a version of sage for 18.04 is formally released.

Many thanks for your help.

Graham

On 11 August 2018 at 15:22, Jan Groenewald  wrote:


Hi

On Sat, 11 Aug 2018 at 15:38, Graham Gerrard 
wrote:


I am using sage from a command prompt ...


show(line2d([(0,0),(1,1),(2,4)])) produces

/home/graham/SageMath/local/lib/python2.7/lib-tk/Tkinter.py in ()
  37 # Attempt to configure Tcl/Tk without requiring PATH
  38 import FixTk
---> 39 import _tkinter # If this fails your Python may not be
configuredhttps://packages.ubuntu.com/search?keywords=tk&;
searchon=names&suite=bionic§ion=all for Tk
  40 tkinter = _tkinter # b/w compat for export
  41 TclError = _tkinter.TclError

ImportError: libtk8.6.so: cannot open shared object file: No such file
or directory.




Did you install from source? (versus from apt / software centre?)

http://doc.sagemath.org/html/en/installation/source.html#tcl-tk

So it looks like even if you just sudo apt install tk8.6 (and mabye
tk8.6-blt2.5??)
your ubuntu python might pick it up but not the sage python.

So you should sudo apt install tk8.6-dev (and mabye tkblt-dev??)
and then rebuild the sage python as per the instructions at the link above.

tk packages in ubuntu 18.04:

https://packages.ubuntu.com/search?keywords=tk&searchon=
names&suite=bionic§ion=all

Or perhaps there is someone else who can answer if one can tell Sage not
to try to use tk for
show(lines(... but to use another graphics toolkit.

Regards,
Jan
--
   .~.
   /V\ Jan Groenewald
  /( )\www.aims.ac.za
  ^^-^^

--
You received this message because you are subscribed to a topic in the
Google Groups "sage-support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/
topic/sage-support/xbLE-tPJziI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.





--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Unable to display graphs from Ubuntu 18.04, Sage 8.3, 64 bit PC

2018-08-12 Thread Vincent Delecroix

Dear Graham

On 8/12/18 11:48 AM, Graham Gerrard wrote:

Vincent: Tried installing sagemath using your recipe.  Works OK for my
original problem.  However, have now reverted for several reasons...
(a) 8.1 not 8.3


Indeed. That is the life of packages in a distribution such as
Debian/Ubuntu. You should have 8.3 packaged in few months. But you can
say the same with all packages there: LaTeX, gcc, etc. On the other
hand, Debian guarantees that all these packages live perfectly well
together.


(b) I usually add packages to the GAP pkg directory.  I didnt find such a
directory.  sagemath structure looks very different.


The SageMath on Debian/Ubuntu is using the GAP from the system. Which
means that any GAP package have to be installed from apt
(I don't know if GAP optional packages are available in apt).

Maybe, GAP also provides an alternative way of installing
packages in this situation.

The Sage binary is simple: put everything in one folder (including
Python and possibly gcc!!). The distribution way of thinking is
organized similarly to what you can see in $SAGE_ROOT/local

 /usr/bin/ : binaries
 /usr/lib/ : libraries
 /usr/include/ : header files
 /usr/share/   : extra files (eg documentation)

In the Debian way of thinking, it is Sage that is weird.


(c) Seems slower than 16.04 tarball solution.


This is very weird. Do you have concrete examples (you can actually
measure the time taken by a command using the %time and %timeit
IPython magic).

Vincent

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Re: Sage 8.3 Build Fails on Debian Sid

2018-08-16 Thread Vincent Delecroix

On 8/15/18 5:05 PM, Dima Pasechnik wrote:

besides it's being gcc 8.2, and AFAIK nobody ever built Sage with gcc 8


This is perfectly fine with gcc-8.2.0 that I have on my machine. And
building Sage with it since long now. I don't see any reason to
switch to another compiler.

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Re: Accessing group generators in libgap

2018-09-30 Thread Vincent Delecroix

Dear Simon,

The main problem is that G is a gap group and not a libgap
group. By gap group I mean that the interface going through
the pexpect interface. The two systems gap and libgap do not
seem to share the namespaces (which make sense).

For example, this does work

  sage: gap(g1)
  f1


but this does not

  sage: libgap(g1)
  Traceback (most recent call last):
  ...
  ValueError: libGAP: Error, Variable: 'f1' must have a value

Best
Vincent

Le 30/09/2018 à 02:32, Simon King a écrit :

Here is another question on libgap: Let some libgap elements be given;
how to form the list of these elements in libgap? The purpose would, for
example, be to create a group from that list.

For instance:
 sage: G = gap.SmallGroup(48,36)
 sage: g1,g2,g3,g4,g5 = G.GeneratorsOfGroup()

Since G is a polycyclic group, its generators look not very informative,
but in any case they are valid elements in libgap:

 sage: g1*g2,g1*g2*g3,g4
 (f1*f2, f1*f2*f3, f4)

Nonetheless, the following doesn't work:

 sage: libgap.List(g1*g2,g1*g2*g3,g4)
 Traceback (most recent call last):
 ...
 ValueError: libGAP: Error, Variable: 'f1' must have a value

What to do instead?

Best regards,
Simon



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] ImportError: /usr/lib/liblapack.so.3: undefined symbol: sgetrs_N_parallel

2018-10-21 Thread Vincent Delecroix

This is a known problem

https://trac.sagemath.org/ticket/22006

Le 20/10/2018 à 01:03, slabbe a écrit :

After doing

sage -i cbc sagelib

as suggested here
http://doc.sagemath.org/html/en/thematic_tutorials/linear_programming.html#solvers

I get

sage: MixedIntegerLinearProgram('Coin')
Traceback (most recent call last)

1784 if solver == "Coin":
-> 1785 from sage.numerical.backends.coin_backend import CoinBackend
1786 return CoinBackend()
1787

ImportError: /usr/lib/liblapack.so.3: undefined symbol: sgetrs_N_parallel
sage: version()
'SageMath version 8.4, Release Date: 2018-10-17'

Someone has a clue?



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Re: "Is 1 zero or nonzero?"

2018-10-24 Thread Vincent Delecroix



I can not reproduce (or I misunderstood your instructions). Please
provide a *complete* list of commands that lead to the problem. Here
is what I got

   sage: a = SR.var('a')
   sage: b = SR.var('b')
   sage: f(r) = r^5*(1-r^2)/((1-2*a*r+r^2)*(1-2*b*r+r^2))
   sage: assume( -1 < a < 1)
   sage: assume( -1 < b < 1)
   sage: integral(f, (r, 0, 1))
   Traceback (most recent call last):
   ...
   ValueError: Computation failed since Maxima requested additional
   constraints; using the 'assume' command before evaluation *may*
   help (example of legal syntax is 'assume(b^2-1.0>0)', see
   `assume?` for more details)
   Is b^2-1.0 positive or negative?

It is kind of silly that SageMath or Maxima can not make
deduction such as

-1 < a < 1  =>  a^2 < 1.

Then

   sage: assume(a^2-1 <0)
   sage: assume(b^2-1 <0)
   sage: g = integral(f, (r, 0, 1))
   sage: h(t) = g.subs(a=cos(t), b=sin(t))
   sage: integral(h, (t, 0, 2*pi))
   Traceback (most recent call last):
   ...
   ValueError: Integral is divergent.


Le 24/10/2018 à 13:50, Chris Judge a écrit :

Hi Simon, The integral is sort of complicated. First integrate
f(r) = r^5*(1-r^2)/((1-2*a*r+r^2)*(1-2*b*r+r^2)) over [0,1]. Sage asked 
for some assumptions and so I gave it these: assume( -1 < a < 1) assume( 
-1 < b < 1) assume(a^2-1 <0) assume(b^2-1 <0) With these assumptions, 
this first integral worked. But read on! The result of integration 
g(a,b) depends on two parameters a,b. Now integrate g(cos(s),cos(t)) 
over s in [0,2pi]. The latter integral asks for assumptions. And so I 
made the following assumptions. assume( 0< arccos(cos(s)) <2*pi) assume( 
0< arccos(cos(t)) <2*pi) With these assumptions, the integrate command 
produced "Is 1 zero or nonzero?" I wish I could find simpler example for 
which produces this error message, but I really have no idea what's 
happening here. Best wishes, Chris PS By the way, Sage is outputting 
"acos" in error messages presumably because Maxima uses acos for arccos.

On 2018-10-24 4:35 a.m., Simon King wrote:

Hi Chris,

On 2018-10-23, Chris Judge  wrote:

Appears to be a bug that comes when integrating expression.
Maxima asks "Is 1 zero or nonzero?" and then suggests using assume(1>0).
Then it fails to accept this assumption...

You just made my day...

Coincidally, this week I told my students about the trivial ring (where
1=0).

In any case, in order to track down the bug you encountered, it would
help if you could give us the expression whose integration triggers the
bug.

Best regards,
Simon



--
You received this message because you are subscribed to the Google 
Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to sage-support+unsubscr...@googlegroups.com 
.
To post to this group, send email to sage-support@googlegroups.com 
.

Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Polyhedron.integrate: non-full dimension

2018-12-04 Thread Vincent Delecroix




Le 04/12/2018 à 15:36, Dima Pasechnik a écrit :

On Tue, Dec 4, 2018 at 1:47 PM Daniel Krenn  wrote:


For integrating a polynomial over a polyhedron LattE is used but if the
dimension is not full, then it is not implemented, see

 sage: x, y = polygens(QQ, 'x, y')
 sage: P = Polyhedron(vertices=[[0,0],[1,1]])
 sage: P.integrate(x*y)# optional - latte_int
 Traceback (most recent call last):
 ...
 NotImplementedError: The polytope must be full-dimensional.

from

http://doc.sagemath.org/html/en/reference/discrete_geometry/sage/geometry/polyhedron/base.html#sage.geometry.polyhedron.base.Polyhedron_base.integrate

I wonder if there is a (simple) way to come around this?

[I might not be that familiar with integration over polyhedra, but
shouldn't that basically be a somehow "nice" transformation where some
Jacobi-determinant comes into play?


you need an orthonormal transformation, thus potentially square roots,
if you just want to move over to
P.affine_hull() and integrate there.


Of course not. There is a well defined *rational* Lebesgue measure on
the affine hull H of your polyhedron. Just consider the Lebesgue measure
so that the lattice Z^d \cap H has covolume 1. With this normalization,
any integral is rational.

This is what you obtain for the volume (ie integration of the
constant function 1) with the option measure='induced'.


But the restriction to full-dimensional isn't really hard to overcome
with a generalisation of the method
in LattE, and I see how to do this, I think.
If anyone cares I could implement this.


If you do anything please respect the convention naming from the
volume function.

Vincent

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Period of a sequence

2018-12-09 Thread Vincent Delecroix

You can use

sage: w = Word(S)
sage: w.primitive_length()
[3]
sage: w.primitive()
word: 123

Le 09/12/2018 à 11:57, chandra chowdhury a écrit :

I have a sequence which I stored in an array.
I want to find the period of the sequence.
But the following code gives error.

S=[1,2,3,1,2,3]
S=Sequence(S)
print S.period()



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Period of a sequence

2018-12-17 Thread Vincent Delecroix

Indeed, primitive_length only consider periods that are
integer divisors of the total length. If you want other
periods you can use the (very slow)

sage: Word(S).periods()
[3, 6, 9]

Vincent

Le 17/12/2018 à 09:52, pc.chandr...@gmail.com a écrit :


Thank you. However if S=[1,2,3,1,2,3,1,2,3,1,2], it is showing 11 although
period is 3.


On Monday, December 10, 2018 at 1:26:50 PM UTC+5:30, vdelecroix wrote:


You can use

sage: w = Word(S)
sage: w.primitive_length()
[3]
sage: w.primitive()
word: 123

Le 09/12/2018 à 11:57, chandra chowdhury a écrit :

I have a sequence which I stored in an array.
I want to find the period of the sequence.
But the following code gives error.

S=[1,2,3,1,2,3]
S=Sequence(S)
print S.period()







--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] algorithme

2019-01-20 Thread Vincent Delecroix

Bonjour,

Cette liste est plutôt anglophone (voir les réponses). Il y a deux
erreurs dans votre programme.

Premièrement, il ne faut pas mettre de "\"  à la fin des lignes.
Ensuite, le signe de comparaison est "==" et non pas "=".

Je vous conseille de regarder un livre sur la programmation en
Python pour vous familiariser avec tout ça.

Le 20/01/2019 à 00:52, MAMANE DJAMILOU Salissou Dango a écrit :

Bonjour,
je suis un tous nouveau utilisateur de sagemath. Je maîtrise les opérations
indépendantes. Mon souci se trouve au nivaux des algorithmes. je n'arrive,
jusque là pas à comprendre comment programmer avec sageMath (voir les
''screenshots'').
merci de m'aider à démarrer.



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Viewers in cocalc?

2019-02-26 Thread Vincent Delecroix

This list concerns the SageMath software. If you want support
for cocalc, you should consider writing to their support. They
are very reactive.

Best
Vincent

Le 26/02/2019 à 00:26, david.guichard a écrit :

When I try to specify a viewer in a plot3d I get an error if I try anything
other than "tachyon". Even viewer='threejs' throws an error, though I think
the default viewer is threejs. What I'm really looking for is a viewer that
lets me display an orthogonal projection instead of perspective. I know
Three.js is capable of this, but I can't find a way to specify this to
plot3d. Can I either call a viewer that will do it or tell threejs to do it?

Thanks,
David



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] "Questions about Sage"

2019-02-26 Thread Vincent Delecroix

Dear William,

That is a good idea and the list seems to be complete.

* You use both Sage and SageMath. It is a bit confusing.

* I would change the order to reflect where you
  should look at. i.e. put as very last the "report a bug".
  Perhaps also, Sage documentation would be better as
  "one before the last" since it is not that easy to
  browse if you are not used to it.

BTW, what happen with the bug reports at [1]?

[1] https://github.com/sagemathinc/cocalc/wiki/SageBug

Best
Vincent

Le 26/02/2019 à 04:57, William Stein a écrit :

Hi,

We put a list of resources for end users asking questions about Sage
for the cocalc docs here:

https://doc.cocalc.com/howto/sage-question.html?highlight=ask%20sagemath%20org

Are we missing anything important?  If so, let me know or click the
"Edit in Github" button...

William



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Viewers in cocalc?

2019-02-26 Thread Vincent Delecroix

Your question is not about Sage but about a problem
of Sage running in cocalc. On my computer with Sage
installed I have no trouble with plot3d.

SageMath is an aggregation of many softwares and whether
each of them works correctly and interacts correctly
with the others on the online platform that is cocalc is
out of my knowledge.

Though, it might well be related to the thread:

https://groups.google.com/forum/#!topic/sage-devel/QC5-9rexyJo

In other words, try with the option

   plot3d(..., online=True)

Vincent

Le 26/02/2019 à 17:02, David Guichard a écrit :

Well, when I go to

https://github.com/sagemathinc/cocalc/wiki/Support

for Sage questions I get directed to

https://doc.cocalc.com/howto/sage-question.html

and it directs me to "The sage-support mailing list
<https://groups.google.com/forum/#!forum/sage-support>." which is where I
am now.

My question is about Sage, not any other component of cocalc.

On Tue, Feb 26, 2019 at 12:50 AM Vincent Delecroix <
20100.delecr...@gmail.com> wrote:


This list concerns the SageMath software. If you want support
for cocalc, you should consider writing to their support. They
are very reactive.

Best
Vincent

Le 26/02/2019 à 00:26, david.guichard a écrit :

When I try to specify a viewer in a plot3d I get an error if I try

anything

other than "tachyon". Even viewer='threejs' throws an error, though I

think

the default viewer is threejs. What I'm really looking for is a viewer

that

lets me display an orthogonal projection instead of perspective. I know
Three.js is capable of this, but I can't find a way to specify this to
plot3d. Can I either call a viewer that will do it or tell threejs to do

it?


Thanks,
David



--
You received this message because you are subscribed to a topic in the
Google Groups "sage-support" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/sage-support/xiwNeFonvDo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.





--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] about the speed of tha Magma interface

2019-02-26 Thread Vincent Delecroix

Hi,

Indeed that is a problem with all interfaces that are text
based such as magma (to communicate with Magma Sage uses
an emulation of a console). You can analyze what is sent
to magma by running

sage: m = matrix(2, [1,3,2,4])
sage: m._magma_init_(magma)
'Matrix(IntegerRing(),2,2,StringToIntegerSequence("1 3 2 4"))'

As I don't have magma I can not test it for sparse matrices,
but you can have a look at

sage: m = matrix(2, [0,0,2,0], sparse=True)
sage: m._magma_init_(magma)

For sparse matrices, it might be the case that the
string produced is somehow too big for no good reason. If
you find a smarter way to pass the data that would speed
up the process and could be incorporated into Sage.

Best
Vincent

Le 26/02/2019 à 17:36, Pierre Guillot a écrit :

Hi !

I'm trying to compute the determinant of a sparse, square matrix with
50,000 columns and coefficients in GF(5)["x y z t u"]. I'm trying my luck
with the magma interface, since we have a copy of magma running at my
university.

The first thing surprising me is that, on toy examples, magma seems pretty
slow, but that may be for another question. At least it works.

But when I try

foo= magma(my_matrix)

with the real example, well I seem to have to wait forever. By contrast,
when the matrix was saved as a .sobj file and then re-loaded back, it tooks
less than 10 seconds. Why should it be so hard to enter it into Magma?

is there any workaround that is worth trying? I could somehow directly
write magma code into a file, and then hope that loading that would be
faster, but I'm not sure why i would do better than the existing magma
interface...

thanks!
Pierre



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] about the speed of tha Magma interface

2019-02-26 Thread Vincent Delecroix

I don't think this has ever been implemented in Sage. You
have to figure out how to create a sparse matrix in magma
and write Sage code to produce it. You can get inspiration
from the current code of _magma_init_

def _magma_init_(self):
P = magma(self.parent())
v = [x._magma_init_(magma) for x in self.list()]
return '%s![%s]'%(P.name(), ','.join(v))

Vincent

Le 26/02/2019 à 17:55, Pierre Guillot a écrit :

Thanks! I think to know where the issue is :

M= random_matrix(ZZ, 10, sparse= True, density= 0.1)
M._magma_init_(magma)

'_sage_[11]![0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-14,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,8,0,0,0,0]'


This does not look like a sparse matrix to me : it's been converted to a
"dense" matrix before magma code was produced...

no wonder if my 50,000 x 50,000 matrix takes forever to load...

If anyone has an easy fix, it would be great. Otherwise, i'll have to learn
the syntax for sparse matrices in magma, and figure out how magma reads
from a file...








--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Segmentation fault in is_squarefree

2019-03-03 Thread Vincent Delecroix

Hi,

I can not reproduce (I am using Linux). Let me copy your traceback
that was a mess because of linebreaks

---
SignalError   Traceback (most recent call last)
 in ()
1 aa=Integer(109604757131194562205071319966444535807)>
2 print is_squarefree(aa)
/opt/sagemath-8.6/local/lib/python2.7/site-packages/sage/arith/misc.pyc 
in is_squarefree(n)

2850
2851 try:->
2852 return e.is_squarefree()
2853 except AttributeError:
2854 pass
/opt/sagemath-8.6/local/lib/python2.7/site-packages/sage/rings/integer.pyx 
in sage.rings.integer.Integer.is_squarefree 
(build/cythonized/sage/rings/integer.c:35954)()

5857 False
5858 """->
5859 return self.__pari__().issquarefree()
5860
5861 cpdef __pari__(self):
cypari2/gen.pyx in cypari2.gen.Gen.issquarefree()
SignalError: Segmentation fault

This seems to be a problem with cypari2 in cygwin (could you confirm
that you are using cygwin?). If so, you should try to reproduce the
problem without Sage by launching Python inside cygwin and then

>>> import cypari2
>>> pari = cypari2.Pari()
>>> pari(109604757131194562205071319966444535807).issquarefree()

Vincent

Le 03/03/2019 à 11:44, Rolandb a écrit :

Hi, the following result is probably not intended:

Sage 8.6 Windows

aa=109604757131194562205071319966444535807
print is_squarefree(aa)

---SignalError 
  Traceback (most recent call last) 
in ()  1 aa=Integer(109604757131194562205071319966444535807)> 2 print 
is_squarefree(aa)
/opt/sagemath-8.6/local/lib/python2.7/site-packages/sage/arith/misc.pyc in 
is_squarefree(n)   28502851 try:-> 2852 return 
e.is_squarefree()   2853 except AttributeError:   2854 pass
/opt/sagemath-8.6/local/lib/python2.7/site-packages/sage/rings/integer.pyx in 
sage.rings.integer.Integer.is_squarefree (build/cythonized/sage/rings/integer.c:35954)()   5857   
  False   5858 """-> 5859 return 
self.__pari__().issquarefree()   58605861 cpdef __pari__(self):
cypari2/gen.pyx in cypari2.gen.Gen.issquarefree()
SignalError: Segmentation fault


Roland




--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Segmentation fault in is_squarefree

2019-03-03 Thread Vincent Delecroix

Cher Roland,

Just to be sure, could you try in a *Python* Jupyter notebook to run
a cell with the following content

import cypari2
pari = cypari2.Pari()
pari(109604757131194562205071319966444535807).issquarefree()

(I expect the very same error to occur, but it is better to double
check)

Vincent

Le 03/03/2019 à 18:48, Rolandb a écrit :

Dear Vincent,

Indeed, sagecell  gives the correct answer.

I'm not an expert, so whether I use cygwin I do not know.

Jupyter and Notebook with Windows 8.6 give both segfault.

Notebook 8.6:

Traceback (most recent call last):
   File "", line 1, in 
   File "_sage_input_3.py", line 10, in 
 exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + 
_support_.preparse_worksheet_cell(base64.b64decode("YWE9MTA5NjA0NzU3MTMxMTk0NTYyMjA1MDcxMzE5OTY2NDQ0NTM1ODA3CnByaW50IGlzX3NxdWFyZWZyZWUoYWEp"),globals())+"\\n");
 execfile(os.path.abspath("___code___.py"))
   File "", line 1, in 
 
   File "/tmp/tmpXtAFoN/___code___.py", line 4, in 

 exec compile(u'print is_squarefree(aa)
   File "", line 1, in 
 
   File "/opt/sagemath-8.6/local/lib/python2.7/site-packages/sage/arith/misc.py", line 2852, in is_squarefree

 return e.is_squarefree()
   File "sage/rings/integer.pyx", line 5859, in 
sage.rings.integer.Integer.is_squarefree (build/cythonized/sage/rings/integer.c:35954)
   File "cypari2/gen.pyx", line 3347, in cypari2.gen.Gen.issquarefree
cysignals.signals.SignalError: Segmentation fault


Sage 6.9 notebook (via Window, thus 32 bit) yields the correct answer!

Vincent, I hope this information helps.

Roland



Op zondag 3 maart 2019 11:53:17 UTC+1 schreef vdelecroix:


Hi,

I can not reproduce (I am using Linux). Let me copy your traceback
that was a mess because of linebreaks

---

SignalError   Traceback (most recent call
last)
 in ()
1 aa=Integer(109604757131194562205071319966444535807)>
2 print is_squarefree(aa)
/opt/sagemath-8.6/local/lib/python2.7/site-packages/sage/arith/misc.pyc
in is_squarefree(n)
2850
2851 try:->
2852 return e.is_squarefree()
2853 except AttributeError:
2854 pass
/opt/sagemath-8.6/local/lib/python2.7/site-packages/sage/rings/integer.pyx
in sage.rings.integer.Integer.is_squarefree
(build/cythonized/sage/rings/integer.c:35954)()
5857 False
5858 """->
5859 return self.__pari__().issquarefree()
5860
5861 cpdef __pari__(self):
cypari2/gen.pyx in cypari2.gen.Gen.issquarefree()
SignalError: Segmentation fault

This seems to be a problem with cypari2 in cygwin (could you confirm
that you are using cygwin?). If so, you should try to reproduce the
problem without Sage by launching Python inside cygwin and then

  >>> import cypari2
  >>> pari = cypari2.Pari()
  >>> pari(109604757131194562205071319966444535807).issquarefree()

Vincent

Le 03/03/2019 à 11:44, Rolandb a écrit :

Hi, the following result is probably not intended:

Sage 8.6 Windows

aa=109604757131194562205071319966444535807
print is_squarefree(aa)



---SignalError
   Traceback (most recent call
last) in ()  1
aa=Integer(109604757131194562205071319966444535807)> 2 print
is_squarefree(aa)

/opt/sagemath-8.6/local/lib/python2.7/site-packages/sage/arith/misc.pyc

in is_squarefree(n)   28502851 try:-> 2852 return
e.is_squarefree()   2853 except AttributeError:   2854 pass



/opt/sagemath-8.6/local/lib/python2.7/site-packages/sage/rings/integer.pyx
in sage.rings.integer.Integer.is_squarefree
(build/cythonized/sage/rings/integer.c:35954)()   5857 False
5858 """-> 5859 return self.__pari__().issquarefree()
58605861 cpdef __pari__(self):

cypari2/gen.pyx in cypari2.gen.Gen.issquarefree()
SignalError: Segmentation fault


Roland








--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] sage dev in /usr for ubuntu

2019-03-16 Thread Vincent Delecroix

Hi,

Unless your Linux distribution is very permissive you should never
access the /usr repo in write mode. The standard place to install
your custom softwares is /opt [1].

 [1] https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

Vincent

Le 16/03/2019 à 19:27, HG a écrit :

Hi,
I have ubuntu 18.04 with sagemath-8.1, I use sagemath-8.6 (this one is call
from its dir) and I compiled dev sage 8.7, i don't need 3 sage, i only want
sage dev ans I wonder if I install it as a normal programm /usr after
./configure --prefix=/usr make and make install if it could work ?
I have no risk on my pc if it's mess I just reinstall a fresh one.
Henri



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] sage dev in /usr for ubuntu

2019-03-17 Thread Vincent Delecroix

Le 17/03/2019 à 00:27, henri.gir...@gmail.com a écrit :
My real question is how to make a deb without all this question about 
proprietary software.


I can not understand your real question. What do you mean by
"make a deb"? You mean a Debian package? For that there is the
documentation on debian.org. Then I have no idea what do you mean
"this question about proprietary software".

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] debian testing: sagemath crashing

2019-03-21 Thread Vincent Delecroix

Le 22/03/2019 à 00:10, Andreas Schuldei a écrit :

   File "/usr/local/lib/python2.7/dist-packages/six.py", line 809, in


Here is something fishy in your log: why do you have Python packages
installed in /usr/local?

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] not able to compile documentation in a Python module depending on SageMath

2019-03-25 Thread Vincent Delecroix

Dear all,

I have a Python module [1] which depends on SageMath. The
documentation used to build fine but now I got an
error

Exception occurred:
  File 
"/opt/sage/local/lib/python2.7/site-packages/sage/misc/sageinspect.py", 
line 2284, in sage_getsourcelines

raise err
TypeError:  is a built-in class

The full traceback is attached.

Any help appreciated.

Best
Vincent

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.
# Sphinx version: 1.7.6
# Python version: 2.7.15 (CPython)
# Docutils version: 0.14 
# Jinja2 version: 2.10
# Last messages:
#   loading intersphinx inventory from http://docs.python.org/objects.inv...
#   intersphinx inventory has moved: http://docs.python.org/objects.inv -> https://docs.python.org/3/objects.inv
#   building [mo]: targets for 0 po files that are out of date
#   building [html]: targets for 6 source files that are out of date
#   updating environment:
#   6 added, 0 changed, 0 removed
#   reading sources... [ 16%] database
#   reading sources... [ 33%] index
#   reading sources... [ 50%] interval_exchanges
#   reading sources... [ 66%] origamis
# Loaded extensions:
#   sphinx.ext.mathjax (1.7.6) from /opt/sage/local/lib/python2.7/site-packages/sphinx/ext/mathjax.pyc
#   sphinx.ext.viewcode (1.7.6) from /opt/sage/local/lib/python2.7/site-packages/sphinx/ext/viewcode.pyc
#   sphinx.ext.todo (1.7.6) from /opt/sage/local/lib/python2.7/site-packages/sphinx/ext/todo.pyc
#   sphinx.ext.autodoc (1.7.6) from /opt/sage/local/lib/python2.7/site-packages/sphinx/ext/autodoc/__init__.pyc
#   sphinx.ext.intersphinx (1.7.6) from /opt/sage/local/lib/python2.7/site-packages/sphinx/ext/intersphinx.pyc
#   alabaster (0.7.12) from /opt/sage/local/lib/python2.7/site-packages/alabaster/__init__.pyc
Traceback (most recent call last):
  File "/opt/sage/local/lib/python2.7/site-packages/sphinx/cmdline.py", line 304, in main
app.build(args.force_all, filenames)
  File "/opt/sage/local/lib/python2.7/site-packages/sphinx/application.py", line 331, in build
self.builder.build_update()
  File "/opt/sage/local/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 342, in build_update
'out of date' % len(to_build))
  File "/opt/sage/local/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 355, in build
updated_docnames = set(self.env.update(self.config, self.srcdir, self.doctreedir))
  File "/opt/sage/local/lib/python2.7/site-packages/sphinx/environment/__init__.py", line 568, in update
self._read_serial(docnames, self.app)
  File "/opt/sage/local/lib/python2.7/site-packages/sphinx/environment/__init__.py", line 587, in _read_serial
self.read_doc(docname, app)
  File "/opt/sage/local/lib/python2.7/site-packages/sphinx/environment/__init__.py", line 662, in read_doc
doctree = read_doc(self.app, self, self.doc2path(docname))
  File "/opt/sage/local/lib/python2.7/site-packages/sphinx/io.py", line 302, in read_doc
pub.publish()
  File "/opt/sage/local/lib/python2.7/site-packages/docutils/core.py", line 217, in publish
self.settings)
  File "/opt/sage/local/lib/python2.7/site-packages/docutils/readers/__init__.py", line 72, in read
self.parse()
  File "/opt/sage/local/lib/python2.7/site-packages/docutils/readers/__init__.py", line 78, in parse
self.parser.parse(self.input, document)
  File "/opt/sage/local/lib/python2.7/site-packages/sphinx/parsers.py", line 85, in parse
self.statemachine.run(inputstring, document, inliner=self.inliner)
  File "/opt/sage/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 171, in run
input_source=document['source'])
  File "/opt/sage/local/lib/python2.7/site-packages/docutils/statemachine.py", line 239, in run
context, state, transitions)
  File "/opt/sage/local/lib/python2.7/site-packages/docutils/statemachine.py", line 460, in check_line
return method(match, context, next_state)
  File "/opt/sage/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 2753, in underline
self.section(title, source, style, lineno - 1, messages)
  File "/opt/sage/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 327, in section
self.new_subsection(title, lineno, messages)
  File "/opt/sage/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 395, in new_subsection
node=section_node, match_titles=True)
  File "/opt/sage/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 282, in nested_parse
node=node, match_titles=match_titles)
  File "/opt/sage/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 196, in run
res

Re: [sage-support] not able to compile documentation in a Python module depending on SageMath

2019-03-25 Thread Vincent Delecroix

[1] https://gitlab.com/videlec/surface_dynamics

Sorry about that

Le 25/03/2019 à 10:44, Dima Pasechnik a écrit :

On Mon, Mar 25, 2019 at 9:41 AM Vincent Delecroix
<20100.delecr...@gmail.com> wrote:


Dear all,

I have a Python module [1] which depends on SageMath. The


and what is [1] ?



documentation used to build fine but now I got an
error

Exception occurred:
File
"/opt/sage/local/lib/python2.7/site-packages/sage/misc/sageinspect.py",
line 2284, in sage_getsourcelines
  raise err
TypeError:  is a built-in class

The full traceback is attached.

Any help appreciated.

Best
Vincent

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.




--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Preferred way to navigate through documentation

2019-04-07 Thread Vincent Delecroix

Dear Fan,

I definitely agree that browsing through the reference manual is a pain.
For general reference, I would advise to use one of the introductory
books that are better organized

- http://sagebook.gforge.inria.fr/english.html
- http://www.people.vcu.edu/~clarson/bard-sage-for-undergraduates-2014.pdf

The reference manual is compiled from the source code. It is efficient
if you want to know which option accept a given function. And the most
useful way to browse it is directly in the console (with one question
mark '?' and then enter)

sage: Mod?
Docstring:
   Return the equivalence class of n modulo m as an element of
   ZZ/mZZ.

   [...]

Python/Sage offers some convenient introspection that allows you
to obtain the source code (two question marks '??')

sage: Mod??
   [...]
   File: 
/usr/lib/python2.7/site-packages/sage/rings/finite_rings/integer_mod.pyx


I copied only the last line because it mentions the file where
this function is implemented.

Vincent

Le 07/04/2019 à 22:55, Fan Zhang a écrit :

Hi all, I'm a new user to Sage and could your help in getting my speed up.

Sage itself is quite user-friendly but my main challenge has been
navigating through the doc. I've been using the [official
reference](http://doc.sagemath.org/html/en/reference) to look up function
definitions etc. However I find the experience suboptimal. For example, I
couldn't figure out the difference between `Mod`, `Integers`,
`IntegersModRing` after quite some effort. (Despite they're frequently used
in the [example code
](http://doc.sagemath.org/html/en/reference/finite_rings/sage/rings/finite_rings/integer_mod.html)).
Moreover, I can't even find where `Mod` is defined.

More generally, what's the preferred way to browse the documentation? The
search function works but it returns an awful lot from which it is hard to
pick out the useful piece...



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Why does Sage Math crash instantly? / Running .sage files?

2019-04-08 Thread Vincent Delecroix

For reference, the exact same question is asked

https://ask.sagemath.org/question/46051/here

Vincent

Le 08/04/2019 à 17:24, Adrian Scheuer a écrit :

Hello.
First of all, I need to Mention that I am completely new to Sage Math and I
have no idea what causes my problem(s), like seriousely, no idea. When I
start SageMath, it instantly crashes, I don't even touch anything. I'm
running Windows 10 and I downloaded the binaries, a virtual box and this
sage-8.6.tar.gz file. I am sure that I must be missing something but I
don't know what.
Yesterday, I managed to get Sage to work, so in the terminal i could write
simple commands like sage:4+3 and later, I reinstalled python. Now it does
not work anymore.
My original aim was it to have sagetex in Latex, but for some reason
running the .sage file which is created with every document using sagetex
doesn't do anything and sage does not compile my document. And yes, I did
follow the instructions how to make sagetex known to tex.
I have no idea how to continue, so many problems and i'm desperately trying
to get things to work. (Feel like I downloaded half the Internet...)

Thank you very much for any help.



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Problem trying to run sagemath in ubuntu 18.04

2019-04-17 Thread Vincent Delecroix

Hola,

You most probably launched SageMath as a super user and
then the permissions in your home tree are messed up.
Could you run the following command in a console and
post the output back

 $ ls -lR ls /home/jgarcia/.sage

It would also help if you describe how did you install
SageMath (and where you used sudo and where not).

Vincent

Le 17/04/2019 à 22:54, jgar...@unc.edu.ar a écrit :

Hi

I install SageMath version 8.6, Release Date: 2019-01-15
on Ubuntu 18.04 but can't run without superuser configuration

I add the file generated by the system.

I'll be very gratefull of any help

Jorge Garcia
Universidad Nacional de Cordoba
Argentina



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] sage-8.7-Ubuntu_18.04-x86_64 Installation problem

2019-04-26 Thread Vincent Delecroix

Dear Philippe,

On the other hand, your distribution provides packages for SageMath,
see

https://packages.ubuntu.com/search?keywords=sagemath

Just install the four packages

  sagemath
  sagemath-jupyter
  sagemath-doc-en
  sagemath-doc-fr

Best
Vincent

Le 26/04/2019 à 20:47, Philippe Esperet a écrit :

%
/dosc/esperet/tex/email/sage1.tex ven. avril 26 2019 20:40:4

sage-8.7-Ubuntu_18.04-x86_64 Installation problem

%
uname -a
Linux henriIV203 3.2.0-53-generic #81-Ubuntu SMP Thu Aug 22 21:01:03
UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

%
tar xvvfj sage-8.7-Ubuntu_18.04-x86_64.tar.bz2

%
./sage

This might take a few minutes but only has to be done once.

Traceback (most recent call last):
   File "/home/esperet/Téléchargements/SageMath/relocate-once.py", line 143,
in 
 p = SearchAndReplace(ROOT_PATH,
'/var/lib/buildbot/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidmas391y',
DESTINATION)
   File "/home/esperet/Téléchargements/SageMath/relocate-once.py", line 123,
in __init__
 self.root_path = root_path.encode('utf-8')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 15:
ordinal not in range(128)
Error running the script 'relocate-once.py'.

Best regards



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] sage-8.7-Ubuntu_18.04-x86_64 Installation problem

2019-04-27 Thread Vincent Delecroix

Note that you downloaded SageMath for version 18.04

   sage-8.7-Ubuntu_18.04-x86_64

This is very unlikely to work with your 12.04. The only
way to get Sage working on not up to date distro is to
compile from source.

Best
Vincent

Le 27/04/2019 à 10:01, Philippe Esperet a écrit :

But my Ubuntu distro is a very old lady…
(12.04). I just took my chances. Even if now sage installation goes
smoothly, it crashes on opening. I think it is not worth debugging, I will
soon update my
antique Ubuntu then go back on sage.
Thank you for your help.

从我的安卓手机发的。

On Sat, 27 Apr 2019, 08:37 Vincent Delecroix, <20100.delecr...@gmail.com>
wrote:


Dear Philippe,

On the other hand, your distribution provides packages for SageMath,
see

  https://packages.ubuntu.com/search?keywords=sagemath

Just install the four packages

sagemath
sagemath-jupyter
sagemath-doc-en
sagemath-doc-fr

Best
Vincent

Le 26/04/2019 à 20:47, Philippe Esperet a écrit :

%
/dosc/esperet/tex/email/sage1.tex ven. avril 26 2019 20:40:4

sage-8.7-Ubuntu_18.04-x86_64 Installation problem

%
uname -a
Linux henriIV203 3.2.0-53-generic #81-Ubuntu SMP Thu Aug 22 21:01:03
UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

%
tar xvvfj sage-8.7-Ubuntu_18.04-x86_64.tar.bz2

%
./sage

This might take a few minutes but only has to be done once.

Traceback (most recent call last):
File "/home/esperet/Téléchargements/SageMath/relocate-once.py", line

143,

in 
  p = SearchAndReplace(ROOT_PATH,


'/var/lib/buildbot/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidmas391y',

DESTINATION)
File "/home/esperet/Téléchargements/SageMath/relocate-once.py", line

123,

in __init__
  self.root_path = root_path.encode('utf-8')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 15:
ordinal not in range(128)
Error running the script 'relocate-once.py'.

Best regards



--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.





--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Sage Crash Report

2019-04-27 Thread Vincent Delecroix

Hello,

What did you downloaded exactly? You meant that you installed
Sage from via the package manager (apt)?

Best
Vincent

Le 23/04/2019 à 03:22, Erik Wallace a écrit :

Hello,
I am submitting this crash report. I downloaded sage from the Ubuntu
repo. Please let me know, how I can fix this. Thanks.
Sincerely,

Erik



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Sage Crash Report

2019-04-28 Thread Vincent Delecroix

I do not see anything obvious in the crash report that explains the
problem. For each thing below could you copy paste the full output
of what appears in the console.

1. The list of sagemath packages installed

   $ apt list --installed | grep sagemath

2. Files in /usr/lib/python2.7/dist-packages/sage/structure via

   $ ls -l /usr/lib/python2.7/dist-packages/sage/structure/

Le 28/04/2019 à 21:05, Erik Wallace a écrit :

Yes, I downloaded via apt. The supporting python packages were also
downloaded via apt.

On Sat, Apr 27, 2019 at 5:08 PM Vincent Delecroix <20100.delecr...@gmail.com>
wrote:


Hello,

What did you downloaded exactly? You meant that you installed
Sage from via the package manager (apt)?

Best
Vincent

Le 23/04/2019 à 03:22, Erik Wallace a écrit :

Hello,
 I am submitting this crash report. I downloaded sage from the Ubuntu
repo. Please let me know, how I can fix this. Thanks.
Sincerely,

Erik



--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.





--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Function Field

2019-05-13 Thread Vincent Delecroix

Hello,

It works for me and I obtain

[Place (1/x, y), Place (1/x, y + 1), Place (x, x*y)]

Could you describe the SageMath version you are using?

Vincent

Le 13/05/2019 à 10:10, Santanu Sarkar a écrit :

Hi,
   This code works well.

K. = FunctionField(GF(2))
R. = K[]
f=y^2 + y + 1/x
L. = K.extension(f)
print L.places(1)


But if I take f=y^2 + y + 1/x, it is giving error.



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/e8d3d937-7dd5-0e51-1f8e-e9c310aaa74c%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Sage Crash Report

2019-05-14 Thread Vincent Delecroix

Why is the package named "sagemath" not installed? Did you
intentionally install only "sagemath-common"? To have a
fully working SageMath installation you need the
three packages

   sagemath sagemath-doc-en sagemath-jupyter

The package "sagemath-common" is a dependency of the first one of
these.

Note that this is documented at

   http://doc.sagemath.org/html/en/installation/linux.html#sec-gnu-linux

Vincent

Le 01/05/2019 à 14:35, Erik Wallace a écrit :

Here is the output:

$ apt list --installed | grep sagemath

sagemath-common/bionic,bionic,now 8.1-7ubuntu1 all [installed]

$ ls -l /usr/lib/python2.7/dist-packages/sage/structure/

total 808
-rw-r--r-- 1 root root   641 Dec  7  2017 all.py
-rw-r--r-- 1 root root  1114 Apr 15 21:51 all.pyc
-rw-r--r-- 1 root root   986 Dec  7  2017 category_object.pxd
-rw-r--r-- 1 root root   376 Dec  7  2017 coerce_actions.pxd
-rw-r--r-- 1 root root   851 Dec  7  2017 coerce_dict.pxd
-rw-r--r-- 1 root root   953 Dec  7  2017 coerce_exceptions.py
-rw-r--r-- 1 root root   868 Apr 15 21:51 coerce_exceptions.pyc
-rw-r--r-- 1 root root   463 Dec  7  2017 coerce_maps.pxd
-rw-r--r-- 1 root root  1086 Dec  7  2017 coerce.pxd
-rw-r--r-- 1 root root   154 Dec  7  2017 debug_options.pxd
-rw-r--r-- 1 root root 19675 Dec  7  2017 dynamic_class.py
-rw-r--r-- 1 root root 18719 Apr 15 21:51 dynamic_class.pyc
-rw-r--r-- 1 root root  7836 Dec  7  2017 element.pxd
-rw-r--r-- 1 root root   265 Dec  7  2017 element_wrapper.pxd
-rw-r--r-- 1 root root  3780 Dec  7  2017 factorization_integer.py
-rw-r--r-- 1 root root  4282 Apr 15 21:51 factorization_integer.pyc
-rw-r--r-- 1 root root 39922 Dec  7  2017 factorization.py
-rw-r--r-- 1 root root 41925 Apr 15 21:51 factorization.pyc
-rw-r--r-- 1 root root 15267 Dec  7  2017 formal_sum.py
-rw-r--r-- 1 root root 16707 Apr 15 21:51 formal_sum.pyc
-rw-r--r-- 1 root root  2035 Dec  7  2017 gens_py.py
-rw-r--r-- 1 root root  1795 Apr 15 21:51 gens_py.pyc
-rw-r--r-- 1 root root 66908 Dec  7  2017 global_options.py
-rw-r--r-- 1 root root 63304 Apr 15 21:51 global_options.pyc
-rw-r--r-- 1 root root  7908 Dec  7  2017 graphics_file.py
-rw-r--r-- 1 root root  9747 Apr 15 21:51 graphics_file.pyc
-rw-r--r-- 1 root root 26183 Dec  7  2017 indexed_generators.py
-rw-r--r-- 1 root root 24447 Apr 15 21:51 indexed_generators.pyc
-rw-r--r-- 1 root root 0 Dec  7  2017 __init__.py
-rw-r--r-- 1 root root   146 Apr 15 21:51 __init__.pyc
-rw-r--r-- 1 root root  2043 Dec  7  2017 list_clone.pxd
-rw-r--r-- 1 root root  6718 Dec  7  2017 list_clone_timings.py
-rw-r--r-- 1 root root  7534 Apr 15 21:51 list_clone_timings.pyc
-rw-r--r-- 1 root root   532 Dec  7  2017 mutability.pxd
-rw-r--r-- 1 root root   646 Dec  7  2017 nonexact.py
-rw-r--r-- 1 root root  1343 Apr 15 21:51 nonexact.pyc
-rw-r--r-- 1 root root   538 Dec  7  2017 parent_base.pxd
-rw-r--r-- 1 root root   743 Dec  7  2017 parent_gens.pxd
-rw-r--r-- 1 root root  1314 Dec  7  2017 parent_old.pxd
-rw-r--r-- 1 root root  4142 Dec  7  2017 parent.pxd
drwxr-xr-x 2 root root  4096 Apr 15 21:51 proof
-rw-r--r-- 1 root root  4892 Dec  7  2017 richcmp.pxd
-rw-r--r-- 1 root root32 Dec  7  2017 sage_object.pxd
-rw-r--r-- 1 root root 26596 Dec  7  2017 sequence.py
-rw-r--r-- 1 root root 27439 Apr 15 21:51 sequence.pyc
-rw-r--r-- 1 root root 17209 Dec  7  2017 set_factories_example.py
-rw-r--r-- 1 root root 20559 Apr 15 21:51 set_factories_example.pyc
-rw-r--r-- 1 root root 41168 Dec  7  2017 set_factories.py
-rw-r--r-- 1 root root 43362 Apr 15 21:51 set_factories.pyc
-rw-r--r-- 1 root root  1751 Dec  7  2017 test_factory.py
-rw-r--r-- 1 root root  1871 Apr 15 21:51 test_factory.pyc
-rw-r--r-- 1 root root 50516 Dec  7  2017 unique_representation.py
-rw-r--r-- 1 root root 51060 Apr 15 21:51 unique_representation.pyc

On Sun, Apr 28, 2019 at 4:46 PM Vincent Delecroix <20100.delecr...@gmail.com>
wrote:


I do not see anything obvious in the crash report that explains the
problem. For each thing below could you copy paste the full output
of what appears in the console.

1. The list of sagemath packages installed

 $ apt list --installed | grep sagemath

2. Files in /usr/lib/python2.7/dist-packages/sage/structure via

 $ ls -l /usr/lib/python2.7/dist-packages/sage/structure/

Le 28/04/2019 à 21:05, Erik Wallace a écrit :

Yes, I downloaded via apt. The supporting python packages were also
downloaded via apt.

On Sat, Apr 27, 2019 at 5:08 PM Vincent Delecroix <

20100.delecr...@gmail.com>

wrote:


Hello,

What did you downloaded exactly? You meant that you installed
Sage from via the package manager (apt)?

Best
Vincent

Le 23/04/2019 à 03:22, Erik Wallace a écrit :

Hello,
  I am submitting this crash report. I downloaded sage from the

Ubuntu

repo. Please let me know, how I can fix this. Thanks.
Sincerely,

Erik



--
You received this message because you are subscribed to the Google

Groups

"sage-support" group.
To unsubscribe from this group and st

Re: [sage-support] An unreliable decimal approximation using N(prec=)

2019-05-23 Thread Vincent Delecroix

This is not an issue. The numerical approximation function N simply
evaluates the expression at a given precision. There is no guarantee
on the overall result as cancellation may occur. If you want accurate
results, use interval or ball arithmetic. If you note your symbolic
expression "expr" you can use

for prec in [30,40,50,60,70,80,90]:
print(RealBallField(prec)(expr))

and get

[+/- 6.80e+7]
[+/- 6.64e+4]
[+/- 66.4]
[0.3 +/- 0.0578]
[0.3192 +/- 6.33e-5]
[0.3192060 +/- 8.68e-8]
[0.3192059665 +/- 4.33e-11]

which is correct at each step.

Vincent
Le 23/05/2019 à 13:23, John Spitzer a écrit :

When I run the following code on sagecell.sagemath.org, there seem to be
problems in evaluating an expression I have generated in the course of my
investigations:

for k in range(1,101):
 print k,N(1/6583885550*(1212730912710731739903840*e^2 -
1209871310179356975377887)*e^(2/3) -
1/6583885550*(186835325866398077159953*e^3 -
3081962205442654687288080*e)*e^(1/3) -
291669964562807277931896/658388555*e^2,prec=k)
print "Done"

The result I get is:

1 -2.3e15
2 1.1e15
3 -5.6e14
4 0.00
5 0.00
6 7.0e13
7 0.00
8 1.8e13
9 0.00
10 4.4e12
11 0.000
12 0.000
13 -5.50e11
14 2.75e11
15 0.
16 -6.872e10
17 0.
18 0.0
19 0.0
20 -4.2950e9
21 -2.14748e9
22 0.00
23 5.36871e8
24 0.00
25 0.000
26 0.000
27 0.000
28 1.6777216e7
29 -8.3886080e6
30 4.1943040e6
31 0.0
32 0.0
33 -524288.000
34 262144.000
35 0.00
36 0.00
37 32768.0
38 16384.00
39 0.000
40 0.000
41 0.
42 0.
43 0.
44 0.
45 0.0
46 64.000
47 0.0
48 0.00
49 -8.0
50 4.0
51 2.00
52 0.000
53 0.000
54 0.500
55 0.2500
56 0.3750
57 0.3125
58 0.328125000
59 0.328125000
60 0.320312500
61 0.3183593750
62 0.3212890625
63 0.31982421875000
64 0.31909179687500
65 0.319091796875000
66 0.319152832031250
67 0.319213867187500
68 0.3191986083984375
69 0.31920623779296875000
70 0.31921005249023437500
71 0.319202423095703125000
72 0.31920623779296875
73 0.319205284118652343750
74 0.31920623779296875
75 0.3192059993743896484375
76 0.3192060589790344238281
77 0.3192059695720672607422
78 0.31920593976974487304688
79 0.31920596957206726074219
80 0.31920596957206726074219
81 0.319205965846776962280273
82 0.319205966778099536895752
83 0.319205967243760824203491
84 0.319205966545268893241882
85 0.3192059665452688932418823
86 0.3192059665452688932418823
87 0.3192059665161650627851486
88 0.31920596650161314755678177
89 0.31920596650888910517096519
90 0.31920596650525112636387348
91 0.319205966505251126363873482
92 0.319205966506160621065646410
93 0.319205966507070115767419338
94 0.319205966506615368416532874
95 0.3192059665063879947410896420
96 0.3192059665065016815788112581
97 0.3192059665065016815788112581
98 0.31920596650650168157881125808
99 0.31920596650649457615145365708
100 0.31920596650650168157881125808
Done

Although we get a good result eventually one does wonder if this issue
happens elsewhere.
Have I stumbled upon an issue here?
Cheers,
John



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/e39f2555-d70a-9342-d883-0e5af422ce1c%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] The behavior of empty sums

2019-06-23 Thread Vincent Delecroix

The SageMath function sum accepts an optional "zero" argument precisely
for this purpose

sage: sum([], 0)
0
sage: sum([], 11)
11
sage: sum([], [])
[]

Le 17/06/2019 à 11:18, Peter Luschny a écrit :

Hi,

I think we should be confident that the sum of integers is
again an integer, the sum of rational numbers a rational number
and that the sum of polynomials is a polynomial.

With Sage this is not the case.

def ib(m, n): return sum(binomial(m*n-1, m*k)*OmegaPolynomial(m,k) for k in
(0..n-1))

The terms "binomial(m*n-1, m*k)*OmegaPolynomial(m,k)" are of type


However "for n in (0..6): print(ib(2, n).list())" yields an
AttributeError: 'int' object has no attribute 'list'.

OK, it is not difficult to work around this.
But would you agree to call this behavior a bug?



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/2e23c6a7-039a-cd89-aae2-3f7468df7cbc%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] ask.sagemath server error

2019-06-28 Thread Vincent Delecroix

Dear Mark,

I just created a login/password account without any problem. Please
try again as it might have been a temporary problem.

Best
Vincent

Le 27/06/2019 à 18:28, Mark Butler a écrit :



I am hoping to write a package for Sage and have a few questions I would
like to ask on ask.sagemath, but I am unable to create an account. When
attempting to do so, either via an existing Google account or by
providing a password, I get the following error:

  Internal server error
  System error log is recorded, error will be fixed as soon as possible
  Please report the error to the site administrators


Is there currently an issue with ask.sagemath?



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/bd8a845f-6994-abe1-3a1b-a1489b84c8e2%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Re: problem with matrix over finite field

2019-07-12 Thread Vincent Delecroix

Le 12/07/2019 à 11:56, Harald Schilly a écrit :

I've no idea why this is happening on CoCalc. My first guess is there is an
optional package installed, which is causing this.


As Simon already said, there is meataxe installed. While


Interestingly, this works:

matrix(GF(16), [[1,0], [0, 1]]) while matrix(GF(25), [[1,0], [0, 1]]) fails
with the above error.


This makes sense as their are tons of various implementations for
matrices.

sage: type(matrix(GF(16),[1]))

sage: type(matrix(GF(25),[1]))


The last one would be different with meataxe installed.

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/cab4542a-daae-675f-14bb-b73c4d6de5c0%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] problem with matrix over finite field

2019-07-12 Thread Vincent Delecroix

Dear Hal,

For the time being, you can use the following workaround

matrix(GF(25, a), [[1,0], [0, 1]], implementation='generic')

Le 11/07/2019 à 23:20, Hal Snyder a écrit :

This works on sage-8.5:

sage: a = var('a')
: matrix(GF(25, a), [[1,0], [0, 1]])
:
[1 0]
[0 1]

but not on sage-8.6 or later:

sage: a = var('a')
: matrix(GF(25, a), [[1,0], [0, 1]])
:
p025.zzz: No such file or directory
---
RuntimeError  Traceback (most recent call last)
 in ()
   1 a = var('a')
> 2 matrix(GF(Integer(25), a), [[Integer(1),Integer(0)], [Integer(0),
Integer(1)]])

/ext/sage/sage-8.8_1804/local/lib/python2.7/site-packages/sage/matrix/constructor.pyx
in sage.matrix.constructor.matrix
(build/cythonized/sage/matrix/constructor.c:2417)()
 623   :class:`MatrixArgs`, see :trac:`24742`
 624 """
--> 625 return MatrixArgs(*args, **kwds).matrix()
 626
 627

/ext/sage/sage-8.8_1804/local/lib/python2.7/site-packages/sage/matrix/args.pyx
in sage.matrix.args.MatrixArgs.matrix
(build/cythonized/sage/matrix/args.c:7765)()
 656 break
 657 else:
--> 658 M = self.space(self, coerce=convert)
 659
 660 # Also store the matrix to support multiple calls of
matrix()

/ext/sage/sage-8.8_1804/local/lib/python2.7/site-packages/sage/matrix/matrix_space.pyc
in __call__(self, entries, coerce, copy)
 815 [t]
 816 """
--> 817 return self.element_class(self, entries, copy, coerce)
 818
 819 def change_ring(self, R):

/ext/sage/sage-8.8_1804/local/lib/python2.7/site-packages/sage/matrix/matrix_gfpn_dense.pyx
in sage.matrix.matrix_gfpn_dense.Matrix_gfpn_dense.__init__
(build/cythonized/sage/matrix/matrix_gfpn_dense.c:5245)()
 427 cdef long nc = ma.ncols
 428
--> 429 self.Data = MatAlloc(fl, nr, nc)
 430 self._converter = FieldConverter(ma.base)
 431

RuntimeError: Cannot select field GF(25) in file matcore.c (line 130)

This is on Ubuntu 18.04, on CoCalc.



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/bcbbe604-6a17-69f6-c059-50b52c48865d%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Sage equivalent for GP's "padicappr"?

2019-08-01 Thread Vincent Delecroix

Dear Fernando,

PARI/GP is included in Sage so that you can at least do

sage: R = PolynomialRing(ZZ, 'x')
sage: x = R.gen()
sage: p = x^2 - 2
sage: pari.padicappr(p, pari('4 + O(7)'))
[4 + O(7)]~

There might be some more convenient functions using the Sage
native implementations of p-adic numbers.

Best
Vincent

Le 01/08/2019 à 22:02, Fernando Gouvea a écrit :



Hi, everyone.


I'm an old user of GP and a very raw beginner when it comes to Sage, so
please forgive the naiveté!


For a new edition of my book on the p-adics I am trying to add pointers to
how to do things on a computer with p-adic numbers. Everything in the book
is very elementary, so I'd like to avoid complications and use only short
bits of code that can be computed with the Sage Cell Server.


So, for the section on Hensel's Lemma I want to know how to find an
approximate p-adic root of a polynomial. In GP, this is padicappr(pol,a),
where pol is a polynomial and a is a p-adic number which is a root mod p.
Is there anything like that in Sage?


Fernando



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/81024ef2-9330-15c3-6d50-de9b6e9d94f5%40gmail.com.


Re: [sage-support] Problem with factor in SymbolicRing

2019-08-04 Thread Vincent Delecroix

I confirm the bug on 8.9.beta5. It is most probably a bug in Pynac. Note
that if you multiply by 2 it "works"

sage: (2*num).factor()
(16*r^6 - 32*r^4*x^2 + 16*r^2*x^4 + 32*r^4*y^2 + 32*r^2*x^2*y^2 + 
16*r^2*y^4 + 80*r^2*x^2 + 16*x^4 + 16*r^2*y^2 + 32*x^2*y^2 + 16*y^4 - 
16*x^2 - 16*y^2)*r^4/(r^6 + 6*r^4*x^2 + r^2*x^4 + 2*r^4*y^2 + 
2*r^2*x^2*y^2 + r^2*y^4 - 2*r^2*x^2 + x^4 + 2*r^2*y^2 + 2*x^2*y^2 + y^4)^2



Le 24/07/2019 à 13:31, Enrique Artal a écrit :

I have encountered a problem with factor in SR which can be avoided but it
shows a problem. If I run this code:

var('t',domain='complex')
var('r,x,y',domain='real')
h= r^6+r^4*t^2 + 4*r^4*t*conjugate(t) + r^4*conjugate(t)^2 +
r^2*t^2*conjugate(t)^2  - r^2*t^2 - r^2*conjugate(t)^2 + t^2*conjugate(t)^2
H=h(t=x+I*y).factor()
num=1/2*(H.derivative(x)/H).derivative(x)+1/2*(H.derivative(y)/H).derivative(y)
num.factor()

I get the following error

---ValueError  
  Traceback (most recent call last) in 
()  6 H=h(t=x+I*y).factor()  7 
num=Integer(1)/Integer(2)*(H.derivative(x)/H).derivative(x)+Integer(1)/Integer(2)*(H.derivative(y)/H).derivative(y)>
 8 num.factor()
/home/artal/sage/local/lib/python2.7/site-packages/sage/symbolic/expression.pyx in 
sage.symbolic.expression.Expression.factor 
(build/cythonized/sage/symbolic/expression.cpp:57759)()  11107 cdef GEx x  
11108 cdef bint b> 11109 if dontfactor or not 
self.is_rational_expression():  0 m = self._maxima_()  1   
  name = m.name()
/home/artal/sage/local/lib/python2.7/site-packages/sage/symbolic/expression.pyx in 
sage.symbolic.expression.Expression.is_rational_expression 
(build/cythonized/sage/symbolic/expression.cpp:15368)()   2030 False   2031 
"""-> 2032 return all(part.is_polynomial(v)   2033
for part in (self.numerator(), self.denominator())   2034for v in 
part.variables())
/home/artal/sage/local/lib/python2.7/site-packages/sage/symbolic/expression.pyx in genexpr 
(build/cythonized/sage/symbolic/expression.cpp:15110)()   2031 """   2032  
   return all(part.is_polynomial(v)-> 2033for part in 
(self.numerator(), self.denominator())   2034for v in part.variables())   2035
/home/artal/sage/local/lib/python2.7/site-packages/sage/symbolic/expression.pyx in 
sage.symbolic.expression.Expression.numerator 
(build/cythonized/sage/symbolic/expression.cpp:48252)()   9377 
sig_on()   9378 try:-> 9379 ex = self._gobj.numer() 
  9380 finally:   9381 sig_off()
ValueError: divide: arguments must be polynomials over the rationals


This error does not happen if I erase some terms of h; and some times it gives 
the error only if I did not restart the jupyter notebook. Any ideas? Enrique.



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/2a0acf72-82e8-3ac7-a306-c820786d75c6%40gmail.com.


Re: [sage-support] sage crash report

2019-09-02 Thread Vincent Delecroix

Dear Oscar,

You should tell precisely what is your installation of Sage that
is broken. Looking at the crash report, I assume that you use
Sage from the system. In this situation, you would better address
your question to some Debian help forum or mailing list.

For the bug you encountered, it has already been reported and
apparently fixed

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=932367

Good luck
Vincent

Le 02/09/2019 à 20:39, o.castillo.felis...@gmail.com a écrit :

Dear community,

I've worked extensively with Sage on Debian, either source compiled or
installed from the repository. Last month I update my system to Debian
Bullseye, and since then I've been unable of using sage!

I'm attaching the automatically generated crash report.

I thank you in advance all possible help, since this is one of the programs
I use in my daily work.



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/9533d412-2819-4b41-928d-6947e754f04d%40gmail.com.


Re: [sage-support] Cannot load session create in another version of sage

2019-09-02 Thread Vincent Delecroix




Le 30/08/2019 à 12:54, Simon King a écrit :

Hi Steve,

On Friday, August 30, 2019 at 11:55:45 AM UTC+2, Dima Pasechnik wrote:


On Fri, Aug 30, 2019 at 12:48 PM 'SteveJJ' via sage-support
> wrote:


I saved a session when using sage 8.0.

When I try to load that session into sage 8.8, I get errors such as:

RuntimeError: invalid pickle data
ValueError: unknown matrix implementation 'flint' over Symbolic Ring

The full error output is below.

Am I missing some packages or do I need to somehow convert the session

file?

I don't think that sage/load_session is guaranteed w.r.t. any kind of
backward/forward compatibility.
It relies on internals being unchanged, which is certainly not the
case from one Sage version to another.



If I understand correctly, saving/loading individual objects is supposed to
be backwards compatible.


This is not correct. Saving individual object is not supposed to
be backward compatible. See

https://trac.sagemath.org/ticket/28302

Vincent

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/839097c3-719f-25fd-4684-b4c9b41545dc%40gmail.com.


Re: [sage-support] Re: Cannot load session create in another version of sage

2019-09-03 Thread Vincent Delecroix

Le 03/09/2019 à 09:07, Simon King a écrit :

Hi Vincent,

On 2019-09-03, Vincent Delecroix <20100.delecr...@gmail.com> wrote:

If I understand correctly, saving/loading individual objects is supposed to
be backwards compatible.


This is not correct. Saving individual object is not supposed to
be backward compatible. See

https://trac.sagemath.org/ticket/28302


Thank you for the pointer.

I believe a CAS which doesn't even *attempt* to offer a way to store user
data permanently and reliably is a failure. I'll rant more on it on the
ticket.


I strongly agree that this is a needed feature! But, I was told on the
ticket that pickling is not the way to do it... I am not Python expert
enough to judge this.

Vincent

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/36286bf2-abb0-2092-0db1-502502946038%40gmail.com.


Re: [sage-support] Re: Cannot load session create in another version of sage

2019-09-03 Thread Vincent Delecroix




Le 03/09/2019 à 11:28, Simon King a écrit :

Hi Vincent,

On 2019-09-03, Vincent Delecroix <20100.delecr...@gmail.com> wrote:

I believe a CAS which doesn't even *attempt* to offer a way to store user
data permanently and reliably is a failure. I'll rant more on it on the
ticket.


I strongly agree that this is a needed feature! But, I was told on the
ticket that pickling is not the way to do it... I am not Python expert
enough to judge this.


Then I misunderstood. By your comment on the ticket, you found that
Python actually states that the pickle protocol IS supposed to be
compatible.


compatible up to pickling protocol versions and datastructure changes
between Python2 and Python3. See also the related Julien Puydt answer
on sage-devel.


In fact it isn't compatible, but that of course means it must be
attempted to make it compatible.


It is already compatible. You just need to specify which kind of
data has been pickled ('bytes' vs 'str') and which protocol to use
(at pickling and unpickling time).

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/ea5fc0db-002a-5847-54de-9ed4a492658a%40gmail.com.


Re: [sage-support] optional packages and binder

2019-10-29 Thread Vincent Delecroix

Dear Enrique,

It would be helpful to have the complete error message and the log
of the failed build. And if you know how to do that, you can open
a trac ticket.

Also, it would be nice to have docker images for Sage with most (if
not all) optional packages installed.

Vincent

Le 29/10/2019 à 05:13, Enrique Artal a écrit :

I want to make available some of my notebooks in binder. I found very
useful sage-binder-env but I ran into problems in a case where I needed an
optional package, namely gap_packages. As stated I installed make package
using the Dockerfile but the installation stops with an error in make
all-toolchain. I guess I need to install more packages but I do not know
which ones. Best regards, Enrique.



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/54f6bd1a-92f7-afc1-8fc4-04c3d7e5df55%40gmail.com.


Re: [sage-support] optional packages and binder

2019-10-30 Thread Vincent Delecroix

Estimado Enrique,

If you want to compile anything, you should be using development
docker image, that is

   sagemath/sagemath-dev

(you can tag if 8.8 if you wish). Be careful that the image is
twice bigger. See the documentation at

https://hub.docker.com/u/sagemath/sagemath

Vincent

Le 30/10/2019 à 09:11, Enrique Artal a écrit :

Cher Vincent,

I hope to add now enough additional info. I am using mybinder.org (I did
not find another address); my Dockerfile is adapted from a file in
sage-binder-env:

FROM sagemath/sagemath:8.8
USER root
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends gcc build-essential make \
&& apt-get -qq clean
USER sage
RUN sage -i gap_packages
# Make sure the contents of the repository is in ${HOME}
COPY --chown=sage:sage . ${HOME} In the original file the version was 8.6;
8.9 did not work. The whole log is:

Waiting for build to start...
Picked Git content provider.
Cloning into '/tmp/repo2dockerarcwd43e'...
HEAD is now at a95a550 Update Dockerfile
Using DockerBuildPack builder
Step 1/6 : FROM sagemath/sagemath:8.8
  ---> 8826a965812be...
Step 2/6 : USER root
  ---> Running in 5de1f0b3cfbb
Removing intermediate container 5de1f0b3cfbb
  ---> c39c95bbdcff
Step 3/6 : RUN apt-get -qq update  && apt-get -qq install -y
--no-install-recommends gcc build-essential make  && apt-get -qq clean
  ---> Running in fe5e1e365ff8
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libgdbm3:amd64.
(Reading database ... 7609 files and directories currently installed.)
Preparing to unpack .../libgdbm3_1.8.3-13.1_amd64.deb ...
Unpacking libgdbm3:amd64 (1.8.3-13.1) ...
Selecting previously unselected package perl-modules-5.22.
Preparing to unpack .../perl-modules-5.22_5.22.1-9ubuntu0.6_all.deb ...
Unpacking perl-modules-5.22 (5.22.1-9ubuntu0.6) ...
Preparing to unpack .../libbz2-1.0_1.0.6-8ubuntu0.2_amd64.deb ...
Unpacking libbz2-1.0:amd64 (1.0.6-8ubuntu0.2) over (1.0.6-8) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Setting up libbz2-1.0:amd64 (1.0.6-8ubuntu0.2) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Selecting previously unselected package libperl5.22:amd64.
(Reading database ... 8846 files and directories currently installed.)
Preparing to unpack .../libperl5.22_5.22.1-9ubuntu0.6_amd64.deb ...
Unpacking libperl5.22:amd64 (5.22.1-9ubuntu0.6) ...
Selecting previously unselected package perl.
Preparing to unpack .../perl_5.22.1-9ubuntu0.6_amd64.deb ...
Unpacking perl (5.22.1-9ubuntu0.6) ...
Selecting previously unselected package bzip2.
Preparing to unpack .../bzip2_1.0.6-8ubuntu0.2_amd64.deb ...
Unpacking bzip2 (1.0.6-8ubuntu0.2) ...
Selecting previously unselected package make.
Preparing to unpack .../archives/make_4.1-6_amd64.deb ...
Unpacking make (4.1-6) ...
Selecting previously unselected package libdpkg-perl.
Preparing to unpack .../libdpkg-perl_1.18.4ubuntu1.6_all.deb ...
Unpacking libdpkg-perl (1.18.4ubuntu1.6) ...
Selecting previously unselected package xz-utils.
Preparing to unpack .../xz-utils_5.1.1alpha+20120614-2ubuntu2_amd64.deb ...
Unpacking xz-utils (5.1.1alpha+20120614-2ubuntu2) ...
Selecting previously unselected package patch.
Preparing to unpack .../patch_2.7.5-1ubuntu0.16.04.2_amd64.deb ...
Unpacking patch (2.7.5-1ubuntu0.16.04.2) ...
Selecting previously unselected package dpkg-dev.
Preparing to unpack .../dpkg-dev_1.18.4ubuntu1.6_all.deb ...
Unpacking dpkg-dev (1.18.4ubuntu1.6) ...
Selecting previously unselected package build-essential.
Preparing to unpack .../build-essential_12.1ubuntu2_amd64.deb ...
Unpacking build-essential (12.1ubuntu2) ...
Setting up libgdbm3:amd64 (1.8.3-13.1) ...
Setting up perl-modules-5.22 (5.22.1-9ubuntu0.6) ...
Setting up libperl5.22:amd64 (5.22.1-9ubuntu0.6) ...
Setting up perl (5.22.1-9ubuntu0.6) ...
update-alternatives: using /usr/bin/prename to provide /usr/bin/rename
(rename) in auto mode
Setting up bzip2 (1.0.6-8ubuntu0.2) ...
Setting up make (4.1-6) ...
Setting up libdpkg-perl (1.18.4ubuntu1.6) ...
Setting up xz-utils (5.1.1alpha+20120614-2ubuntu2) ...
update-alternatives: using /usr/bin/xz to provide /usr/bin/lzma (lzma) in
auto mode
Setting up patch (2.7.5-1ubuntu0.16.04.2) ...
Setting up dpkg-dev (1.18.4ubuntu1.6) ...
Setting up build-essential (12.1ubuntu2) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Removing intermediate container fe5e1e365ff8
  ---> fa9dc2999b1d
Step 4/6 : USER sage
  ---> Running in d86e77e74948
Removing intermediate container d86e77e74948
  ---> 6535d64a4eae
Step 5/6 : RUN sage -i gap_packages
  ---> Running in e012d50d35ae
make: *** No rule to make target 'all-toolchain'.  Stop.
Removing intermediate container e012d50d35ae
The command '/bin/sh -c sage -i gap_packages' returned a non-zero code: 2

I think the non-zero code is variable. Thanks, Enrique.


El miércoles, 30 de octubre de 2019, 4:44:27 (UTC+1), vdelecroix escribió:


Dear Enrique,

It would be helpful to have the compl

Re: [sage-support] Mixing GP and @interact inside Sage Cell

2020-01-13 Thread Vincent Delecroix

If you want to interact with PARI/GP it is much better (= faster and
more reliable) to use the cypari interface. Namely

sage: s = pari('square(x)=x^2')
sage: s(20)
400

If you want to convert the output of s(20) (a "Gen") then use

sage: s(20).sage()
400
sage: type(s20)

sage: type(s(20).sage())


Vincent

Le 13/01/2020 à 08:31, Pedja Terzic a écrit :

Thank you, it works!

On Sun, Jan 12, 2020 at 7:54 PM Dima Pasechnik  wrote:


e.g. something like

sage: gp.eval("square(x)=x^2")
'(x)->x^2'
sage: gp.function_call("square",[20]).sage()
400

So one can have

def foo(x):
 return gp.function_call("square",[x]).sage()

to create a Sage function that will square a number using GP

On Sun, Jan 12, 2020 at 2:26 PM Dima Pasechnik  wrote:


this way Python does not know anything about GP functions.
You need to pass the input/output from/to Python.

On Sun, 12 Jan 2020, 14:06 Pedja,  wrote:


Why the following code doesn't work inside Sage Cell?

gp("""
square(x)=x^2;
""")

@interact
def _(x=2):
 print(square(x))

--
You received this message because you are subscribed to the Google

Groups "sage-support" group.

To unsubscribe from this group and stop receiving emails from it, send

an email to sage-support+unsubscr...@googlegroups.com.

To view this discussion on the web visit

https://groups.google.com/d/msgid/sage-support/25a5f980-f93d-4721-94d4-e5f1677b285d%40googlegroups.com
.

--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sage-support/CAAWYfq0rwwUEQFxmexC9vn8PaLczFSBFGSekYQFQMKi5bTPFFw%40mail.gmail.com
.





--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/1c312d8b-2a30-2295-8c2a-39276d8920c1%40gmail.com.


Re: [sage-support] sagemath 9 + Graph

2020-01-25 Thread Vincent Delecroix

Dear Jean-Francois,

When you do report an error having to do with the SageMath
installation (and not about "how to use SageMath"), it is
strongly advised to state precisely what is your setup.
SageMath installs on dozens of operating systems in half
dozen ways. Each installation setup comes with its own
troubles. More precisely, your problem has a chance to
be solved if you state clearly

1. what is your operating system
2. which SageMath version (here you said clearly 9.0)
3. Which steps did you follow to install SageMath

Assuming that for 3 you use the windows binary (please
confirm), I reported the issue on

https://github.com/sagemath/sage-windows/issues/42

It would be nice to know 1 as well.

Best
Vincent

Le 18/01/2020 à 11:00, Jean-François Ingenbleek a écrit :

G = Graph({'A':['B','C']})
G.show()

give this strange message

/opt/sagemath-9.0/local/lib/python3.7/site-packages/matplotlib/font_manager.py:281:
 UserWarning: Matplotlib is building the font cache using fc-list. This may 
take a moment.
   'Matplotlib is building the font cache using fc-list. '



help is welcome

Big thanks



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/e8bd868c-aa35-f51a-1d22-f9ea6c18de82%40gmail.com.


Re: [sage-support] Output in characteristic 2

2020-02-03 Thread Vincent Delecroix

The command

sage: P. = GF(2)[]

is *not* declaring variables x0, x1, etc to be elements in GF(2)
but rather *assigns* x0, x1, etc to be generators of a poynomial
algebra.

sage: P. = GF(2)[]
sage: (x0 * x1 + x3 + 1)^2
x0^2*x1^2 + x3^2 + 1

If you want to use elements of GF(2) simply do

sage: K = GF(2)
sage: x3 = K(0)
sage: x2 = K(1)
sage: x1 = K(0)
sage: x0 = K(1)

Then

sage: s1= x0*x2*x3 + x0*x2 + x0 + x1*x2 + x2
sage: s0= x0*x1*x3 + x0*x2 + x0*x3 + x1 + 1
sage: print(s1,s0)
1 0

Vincent

PS: the command

sage: x3 = 0

assigns x3 the number 0 (which is an integer). There is no such thing as
"typing a variable" in Python. You can do

sage: x3 = 0  # defines x3 as an integer
sage: x3 = [0, 1, 3]  # redefines x3 as a list
sage: x3 = "hello"# redefines x3 as a string


Le 03/02/2020 à 08:31, Samanta a écrit :

I have defined the input variables in characteristic 2. But when I assign a
particular value to the input, output gives the result in simple algebra
not in characteristic 2. Here is my code:
sage: P. = GF(2)[]
: x3=0
: x2=1
: x1=0
: x0=1
: s1= x0*x2*x3 + x0*x2 + x0 + x1*x2 + x2
: s0= x0*x1*x3 + x0*x2 + x0*x3 + x1 + 1
: print s1,s0
:
3 2

Here I want s1, s0 as 1,0. If I don't assign any value to the input, the
output will gives value in charateristic 2 like
sage: P. = GF(2)[]
: print x0+x1+x0
:
x1
Can anyone guide me how to get the output values in characteristic 2 if I
assign a value to the input?
Thanks in advance



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/5afdc622-f081-5f0e-8707-83098d94df5b%40gmail.com.


Re: [sage-support] TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

2020-02-16 Thread Vincent Delecroix

Dear Bertrand,

Where is "the code below"?

Vincent

Le 16/02/2020 à 15:44, Bertrand Cayzac a écrit :

Hello,

The code below worked happlily each time I launched it in SageMathCell
until recently. It now exits with the error below in a call to
scipy.optimize.newton while I didn't make any change;

I gathered that the casting rules have changed but it seems that ufunc doesn't take a 
"casting" argument in version 1.16 and I can't seem to fin a way to override

the safe rule. I don't know how to import or install a different version in a 
cell.

Any idea?



Last lines of the trace :

/home/sc_serv/sage/local/lib/python2.7/site-packages/numpy/core/numeric.pyc in 
isclose(a, b, rtol, atol, equal_nan)   2519 y = array(y, dtype=dt, copy=False, 
subok=True)   2520 -> 2521 xfin = isfinite(x)   2522 yfin = isfinite(y) 
  2523 if all(xfin) and all(yfin):
TypeError: ufunc 'isfinite' not supported for the input types, and the inputs 
could not be safely coerced to any supported types according to the casting 
rule ''safe''



The curent versions in SageMathCell are the following (I don't know what
they used to be when the code was working)

Python : 2.7.15 (default, Oct  6 2019, 03:20:16) [GCC 7.4.0]
Numpy : 1.16.1
Scipy : 1.2.0


I gathered that the casting rules have changed but it seems that ufunc doesn't take a 
"casting" argument in version 1.16 and I can't seem to fin a way to override

the safe rule. I don't know how to import or install a different version in a 
cell.

Any idea?


Thanks and regards,

Bertrand Cayzac bnhmcay...@gmail.com



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/de7bfd77-7f73-e52b-8ac0-68d75a68949d%40gmail.com.


Re: [sage-support] TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

2020-02-16 Thread Vincent Delecroix
= nipple_x
areo_y = nipple_y-r
# Store the circles
tuplebreast= breastarc_x, 0, breastarc_r
tupleareo = areo_x, areo_y, areo_r
# Draw the breast arc
var('m,n')
arcbreast = (m-breastarc_x)^2 + (n-0) ^2 == breastarc_r^2
U=implicit_plot(arcbreast, (m, offset,r*2),
(n,-r,nipple_y-r),color='black',linewidth=thk)
S=S+U
# Find areola low intersection point with circle
geom = Geometry()
getint = geom.circle_intersection(circle1=tuplebreast, circle2=tupleareo)
areoint_x = getint[0][0]
# Find areola intersection point with Versiera
function ('xt') (t)
function ('yt') (t)
function ('f') (t)
function ('df') (t)
xt(t) = 2*t
yt(t) = d/(t^2+1)-r
f(t)= (xt(x=t)-areo_x)^2 + (yt(x=t)-areo_y)^2 - areo_r^2
#st = solve([f(t) == 0],t)
df(t) = f(x=t).derivative()
# Use Newton-Raphson approximation
var ('xstart')
xstart=nipple_x/3.3
iter = 100
son = scipy.optimize.newton(f,xstart,df, maxiter= iter)
dyvp=(yt(son))
# Draw the areola circle between intersection points
var ('o,p')
arcareo = (o-areo_x)^2 + (p-areo_y)^2 == areo_r^2
V=implicit_plot(arcareo, (o,0,areoint_x),
(p,-r,dyvp),color='black',linewidth=thk)
S=S+V
# Draw the vertical line perpendicular to x axis at Versiera's positive
point of inflexion
L=line( [ (ptinf , -r), (ptinf, r) ], color="purple", thickness=1,
linestyle="-.")
S=S+L
# Plot the whole shebang
if showinvisible :
IPV=plot(versiera-r,nipple_x,wi,fill=0,rgbcolor='black',fillcolor='white',linestyle='dotted')

S=S+IPV
IPV2 = plot(versiera-r,-wi,
offset+0.12,fill=0,rgbcolor='black',fillcolor='white',linestyle='dotted')
S=S+IPV2
IPC = implicit_plot(arcbreast, (m, -r,r*2), (n,-r,r),color='black',
linestyle='dotted')
S=S+IPC
IPA = implicit_plot(arcareo, (o,0,wi), (p,-0.5,1),color='black',
linestyle='dotted')
S=S+IPA
S.show (axes=true,aspect_ratio=1)
if showmaths :
show ('nipple coordinates : x = ', nipple_x, ' y = ', nipple_y-r)
show ('areola / breast circle intersection coordinates : x = ', areoint_x,
' y = ', nipple_y-r)
show ('areola / Versiera intersection coordinates : x = ', xt(son), ' y =
', dyvp)
show ('numerical resolution : ')
show (' f(t) : ', f(t))
show (' dérivée df(t) : ', df)
show (' t approximation for f(t) = 0 (Newton-Raphson method) : ', son)
#show ('df(t) = 0 : ', st)
return






On Sun, Feb 16, 2020 at 8:51 PM Vincent Delecroix <20100.delecr...@gmail.com>
wrote:


Dear Bertrand,

Where is "the code below"?

Vincent

Le 16/02/2020 à 15:44, Bertrand Cayzac a écrit :

Hello,

The code below worked happlily each time I launched it in SageMathCell
until recently. It now exits with the error below in a call to
scipy.optimize.newton while I didn't make any change;

I gathered that the casting rules have changed but it seems that ufunc

doesn't take a "casting" argument in version 1.16 and I can't seem to fin a
way to override


the safe rule. I don't know how to import or install a different version

in a cell.


Any idea?



Last lines of the trace :



/home/sc_serv/sage/local/lib/python2.7/site-packages/numpy/core/numeric.pyc
in isclose(a, b, rtol, atol, equal_nan)   2519 y = array(y, dtype=dt,
copy=False, subok=True)   2520 -> 2521 xfin = isfinite(x)   2522
  yfin = isfinite(y)   2523 if all(xfin) and all(yfin):

TypeError: ufunc 'isfinite' not supported for the input types, and the

inputs could not be safely coerced to any supported types according to the
casting rule ''safe''




The curent versions in SageMathCell are the following (I don't know what
they used to be when the code was working)

Python : 2.7.15 (default, Oct  6 2019, 03:20:16) [GCC 7.4.0]
Numpy : 1.16.1
Scipy : 1.2.0


I gathered that the casting rules have changed but it seems that ufunc

doesn't take a "casting" argument in version 1.16 and I can't seem to fin a
way to override


the safe rule. I don't know how to import or install a different version

in a cell.


Any idea?


Thanks and regards,

Bertrand Cayzac bnhmcay...@gmail.com



--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sage-support/de7bfd77-7f73-e52b-8ac0-68d75a68949d%40gmail.com
.





--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/24f45bd0-9ef2-d11d-6987-80c881d50d4b%40gmail.com.


Re: [sage-support] TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

2020-02-16 Thread Vincent Delecroix

It seems that sympy is picky about the input. You can use the following
workaround. Replace

son = scipy.optimize.newton(f, xstart, df, maxiter= iter)

By

f2 = lambda s: float(f(s))
xstart2 = float(xstart)
df2 = lambda s: float(df(s))
son = scipy.optimize.newton(f2, xstart2, df2, maxiter= iter)

I open https://trac.sagemath.org/ticket/29210 to track the issue.

Vincent

Le 16/02/2020 à 23:59, Vincent Delecroix a écrit :

As a start you can notice that SageMath cell has switch to Python 3. To
see that, run the following two lines in a cell

import sys
print(sys.version)

In particular you need to modify the print statements from

print whatever

to

print(whatever)

The change from Python 2 to Python 3 impacts more than just the print
statements, see http://python-future.org/compatible_idioms.html

After making the appropriate change, I can at least reproduce the
error

TypeError: ufunc 'isfinite' not supported for the input types, and
the inputs could not be safely coerced to any supported types
according to the casting rule ''safe''

... which is a good start: the bug is reproducible!

Vincent

Le 16/02/2020 à 22:32, Bertrand Cayzac a écrit :

Dear Vincent,

Sorry I did not paste it...Here it goes. You'll also find it in 
attachment.


It is to be noted that I just ran the code again after a lo,g while 
and it

now exits upon a "print" instruction instruction supposedly in line 33.
My guess is that the code is more and more compatible with the SageMath
celle interpreter version... I'll dig on that. If you have any idea they
are welcome.

KInd regards,
B











">


 VmA 
https://sagecell.sagemath.org/static/embedded_sagecell.js"</a>;>


// Make the div with id 'mycell' a Sage cell
sagecell.makeSagecell({inputLocation: '#mycell',
template: sagecell.templates.minimal,
evalButtonText: 'Let there be breasts !'});



 Versiera meets arcs 
Click the button below to make Maria Gaetana Agnesi's Versiera and arcs
meet in beauty

from __future__ import division
import numpy as np
import scipy.optimize
"""
circle-circle intersection
credit: Xaedes (Github)
"""
#!/usr/bin/env python2
#-*- coding: utf-8 -*-
#from __future__ import division
#import numpy as np
from math import cos, sin, pi, sqrt, atan2
d2r = pi/180
class Geometry(object):
def circle_intersection(self, circle1, circle2):
'''
@summary: calculates intersection points of two circles
@param circle1: tuple(x,y,radius)
@param circle2: tuple(x,y,radius)
@result: tuple of intersection points (which are (x,y) tuple)
'''
# return self.circle_intersection_sympy(circle1,circle2)
x1,y1,r1 = circle1
x2,y2,r2 = circle2
# <a  rel="nofollow" href="http://stackoverflow.com/a/3349134/798588">http://stackoverflow.com/a/3349134/798588</a>
dx,dy = x2-x1,y2-y1
d = sqrt(dx*dx+dy*dy)
if d > r1+r2:
print "#1"
return None # no solutions, the circles are separate
if d < abs(r1-r2):
print "#2"
</pre><tt>return None # no solutions because one circle is contained within the 
</tt><tt>other
</tt><pre style="margin: 0em;">
if d == 0 and r1 == r2:
print "#3"
return None # circles are coincident and there are an infinite number of
solutions
a = (r1*r1-r2*r2+d*d)/(2*d)
h = sqrt(r1*r1-a*a)
xm = x1 + a*dx/d
ym = y1 + a*dy/d
xs1 = xm + h*dy/d
xs2 = xm - h*dy/d
ys1 = ym - h*dx/d
ys2 = ym + h*dx/d
return (xs1,ys1),(xs2,ys2)
def circle_intersection_sympy(self, circle1, circle2):
from sympy.geometry import Circle, Point
x1,y1,r1 = circle1
x2,y2,r2 = circle2
c1=Circle(Point(x1,y1),r1)
c2=Circle(Point(x2,y2),r2)
intersection = c1.intersection(c2)
if len(intersection) == 1:
intersection.append(intersection[0])
p1 = intersection[0]
p2 = intersection[1]
xs1,ys1 = p1.x,p1.y
xs2,ys2 = p2.x,p2.y
return (xs1,ys1),(xs2,ys2)
"""
Interaction in the sagemath cell
"""
@interact
def VmA(nipple_x=(1,1.7)):
# recommended values for r = 1 : x=(1, 1.5+)
var ('u,v,w,x,y,z')
var ('breastarc_x,nipple_x,nipple_y')
#presentation parameters
showmaths = True #print maths
</pre><tt>showinvisible = True #Above and beyond breast, print curves in dotted 
</tt><tt>line
</tt><pre style="margin: 0em;">
thk = 2 # thickness of the visible
wi = 5 # width of the frame
#geometry parameters
r = 1 # Versiera radius
d=2*r # Versiera diameter
ptinf= (2*r)/sqrt(3) # Versiera positive point of inflexion
breastarc_r=0.9 # breast circle radius
areo_ratio=4.4 # ratio breast circle / areola circle
# Versiera curve
versiera = 8*(r^3)/((x^2) + 4*(r^2))
# Versiera curve (parametric)
t= var ('t')
xvp = d*t
yvp = d/(t^2+1)
#W=parametric_plot((xvp,yvp-r),(t,0,1))
# Find the y coordinate of the target intersection between versiera and
breast arc when x 

Re: [sage-support] Re: Approximating integral with infinite bounds

2020-02-29 Thread Vincent Delecroix

Le 29/02/2020 à 21:41, Emmanuel Charpentier a écrit :


You may try to separate the real and imaginary part of your function, and
sample from these part. Look at Stan  and the
companion R package bridgesampling
  (which
could compute the integral from a pseudo-random sample obtained via Stan).


You can do Monte-Carlo in Sage (via GSL)

sage: f(x,y,z,t) = x^2*y*t + 3*x*y^2 - x*y*z + t
sage: monte_carlo_integral(f, [-1,-1,-1,-1], [1,1,1,1], 10^6)
(0.0155081492100384, 0.015914524378217675)

But you can not specify manually the order of the variables
which is a bit confusing.

Vincent

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/9fd1d205-da32-4f99-c3e6-75a37eb289e2%40gmail.com.


Re: [sage-support] Optional package cunningham_tables unavailable (version 9.0)

2020-03-12 Thread Vincent Delecroix

What is your setup?

Le 12/03/2020 à 14:15, 'Peter Mueller' via sage-support a écrit :

Calling the example
from sage.rings.factorint import factor_cunningham
factor_cunningham(2^257-1)
from the docs yields the message that the Cunningham tables should be
installed  via ``sage -i cunningham_tables``. Trying this, however, yields
a `not found' message, and suggests to try the option `-p' instead of '-i'.
This, in turn results in an error message.

-- Peter Mueller



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/88ac2776-8c90-70d5-9a66-dad244c3b98b%40gmail.com.


Re: [sage-support] Problem of Sage 9.0 and Maxima powerseries

2020-03-24 Thread Vincent Delecroix

What is this syntax maxima(f, x) intended for? Just use

sage: maxima(f).powerseries(x,0)
'sum(_SAGE_VAR_x^i3,i3,0,inf)

I hardly understand why it worked in previous versions.

Le 24/03/2020 à 14:13, mendes a écrit :

Dear all,

In previous versions of Sagemath, this worked fine:

f= 1/(1-x)
print( maxima(f,x).powerseries(x,0) )

Now, in Sage 9.0, this raises  the error:

TypeError: new_name must be a string


I would be very grateful for any help.



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/94015397-961a-9a90-1652-5dfd0e7257de%40gmail.com.


Re: [sage-support] Re: Slow Computations in Quotient Rings

2020-04-06 Thread Vincent Delecroix

Dear rana-aere,

If you think this is an issue, then *you* should be working on it.
Every SageMath developers is a volunteer that does not take orders
and think by herself or himself what is relevant to do. Note that
helping others is indeed a concern for most of them.

As a start:

- you can check whether there is already an existing ticket
  on https://trac.sagemath.org/ for this problem, and if not
  open one which tracks down the problem to its essence (for
  example it has nothing to do with elliptic curves).

- If you have a *concrete suggestion* in favor of an improvement
  but does not know how to implement it, this could be discussed
  on the sage-devel mailing list.

SageMath developers are mature enough to read the messages on this
list and figure out what is relevant to do without your call.

Best
Vincent

Le 05/04/2020 à 17:38, rana-aere a écrit :

I think it is an issue to be reported.
So, I wait for someone to respond this question.

To developers of the SageMath module of rings:
Please verify the program in this question, with debugging messages I added.
we ran into a weakness of SageMath either
  in formula processing producing too complicated denominators
  or in SageMath module of quotient of rings, which fail to reduce the
element of the ring.
I believe the code reported here is an important entry for new students to
SageMath.
Please program what is going for this program.

2020年4月5日日曜日 5時56分25秒 UTC+9 finotti:


Thanks for the reply!

On Saturday, April 4, 2020 at 1:00:12 PM UTC-4, rana-aere wrote:


I modified the code and tried to trace computation.

I think you stepped over the weakness of Sagemath.



I was afraid that that would be the case...
  



The modified code is quoted below.
The line with many minus signs is meant to separate the program in
different cells of jupyter notebook.
My impression is that the program computes R, P + Q, LHS = (P + Q) + R
and then Q + R for RHS.
After that the data for the outer call of P + (Q + R) becomes too big so
that Sagemath cannot pass the parameters to add_EC.



Thanks for taking the time to do that! I really appreciate.  I wonder if
this is an issue that I should report or if it simply "how it is"...

I think we will just stick with Magma for now.  I try to use (and teach
with) Sage whenever possible, but in this case I think I will have to stick
with Magma.

Thanks again!





--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/574305a9-2107-286e-44c1-61fc381b6195%40gmail.com.


Re: [sage-support] sage compilation: Error running the postinst script for pplpy-0.8.4

2020-04-11 Thread Vincent Delecroix

Thanks for your report.

The postinstall script for pplpy just compiles and installs
the documentation. For now, you can use the workaround

 $ export SAGE_SPKG_INSTALL_DOCS="no"
 $ make

I don't quite understand what is happening. From your log

usage: sphinx-build [OPTIONS] SOURCEDIR OUTPUTDIR [FILENAMES...]
sphinx-build: error: cannot find files ['https://omega0.xyz/omega8008']

Do you have any idea where this url

   https://omega0.xyz/omega8008

might come from!?

Best
Vincent

Le 11/04/2020 à 00:04, Carlos Rodriguez a écrit :

Running:

crod569@crod569-VirtualBox:~$ uname -a
Linux crod569-VirtualBox 5.3.0-46-generic #38~18.04.1-Ubuntu SMP Tue Mar 31
04:17:56 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux




--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/99b2ac34-a7c7-47dc-e276-b506deff4b71%40gmail.com.


Re: [sage-support] sage compilation: Error running the postinst script for pplpy-0.8.4

2020-04-11 Thread Vincent Delecroix

Hi Carlos,

There is indeed some interference between sphinx (the
software used to compile the documentation) and your
website. Though, I don't think that git is involved in
any way here.

One possibility is that the some of following environment
variables are set SPHINXBUILD, BUILDDIR, SPHINXOPTS. They
modify the behavior of sphinx. Could you check whether
they are set to something referring to your website url?

Vincent

Le 11/04/2020 à 12:57, Carlos Rodriguez a écrit :

Hi Vincent,
thanks a lot for your quick response.
omega0.xyz is my site at aws.
I also use git with it so you think that maybe interfering?

I am eager to get this working. I am trying to add my Sim
plificator to the symbolic package.

--Carlos.

On Sat, Apr 11, 2020 at 5:56 AM Vincent Delecroix <20100.delecr...@gmail.com>
wrote:


Thanks for your report.

The postinstall script for pplpy just compiles and installs
the documentation. For now, you can use the workaround

   $ export SAGE_SPKG_INSTALL_DOCS="no"
   $ make

I don't quite understand what is happening. From your log

usage: sphinx-build [OPTIONS] SOURCEDIR OUTPUTDIR [FILENAMES...]
sphinx-build: error: cannot find files ['https://omega0.xyz/omega8008']

Do you have any idea where this url

 https://omega0.xyz/omega8008

might come from!?

Best
Vincent

Le 11/04/2020 à 00:04, Carlos Rodriguez a écrit :

Running:

crod569@crod569-VirtualBox:~$ uname -a
Linux crod569-VirtualBox 5.3.0-46-generic #38~18.04.1-Ubuntu SMP Tue Mar

31

04:17:56 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux




--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sage-support/99b2ac34-a7c7-47dc-e276-b506deff4b71%40gmail.com
.





--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/d74643c7-2a22-7f8c-9f5b-12761f16e9ca%40gmail.com.


Re: [sage-support] sage compilation: Error running the postinst script for pplpy-0.8.4

2020-04-11 Thread Vincent Delecroix

Could you also check if $MAKE is in the environment?


The log you sent is not verbose enough. It would help if you
would manually run the sphinx command with more verbosity. That
is

1. Switch to the sage environment

 $ $SAGE_ROOT/sage -sh

2. Go to the temporary build directory

 $ cd /home/crod569/sage/local/var/tmp/sage/build/pplpy-0.8.4/src/docs

3. Then run sphinx with verbose option and save it

  $ make clean
  $ SPHINXOPTS="-v -v" make html | tee /tmp/sphinx-build.log

then send the file /tmp/sphinx-build.log

4. exit sage environment

 $ exit

Vincent

Le 11/04/2020 à 13:15, Carlos Rodriguez a écrit :

No.
I did a "printenv | grep omega0"
and "printenv | grep SPHINX" and nothing showed up.

On Sat, Apr 11, 2020 at 7:06 AM Vincent Delecroix <20100.delecr...@gmail.com>
wrote:


Hi Carlos,

There is indeed some interference between sphinx (the
software used to compile the documentation) and your
website. Though, I don't think that git is involved in
any way here.

One possibility is that the some of following environment
variables are set SPHINXBUILD, BUILDDIR, SPHINXOPTS. They
modify the behavior of sphinx. Could you check whether
they are set to something referring to your website url?

Vincent

Le 11/04/2020 à 12:57, Carlos Rodriguez a écrit :

Hi Vincent,
thanks a lot for your quick response.
omega0.xyz is my site at aws.
I also use git with it so you think that maybe interfering?

I am eager to get this working. I am trying to add my Sim
plificator to the symbolic package.

--Carlos.

On Sat, Apr 11, 2020 at 5:56 AM Vincent Delecroix <

20100.delecr...@gmail.com>

wrote:


Thanks for your report.

The postinstall script for pplpy just compiles and installs
the documentation. For now, you can use the workaround

$ export SAGE_SPKG_INSTALL_DOCS="no"
$ make

I don't quite understand what is happening. From your log

usage: sphinx-build [OPTIONS] SOURCEDIR OUTPUTDIR [FILENAMES...]
sphinx-build: error: cannot find files ['https://omega0.xyz/omega8008']

Do you have any idea where this url

  https://omega0.xyz/omega8008

might come from!?

Best
Vincent

Le 11/04/2020 à 00:04, Carlos Rodriguez a écrit :

Running:

crod569@crod569-VirtualBox:~$ uname -a
Linux crod569-VirtualBox 5.3.0-46-generic #38~18.04.1-Ubuntu SMP Tue

Mar

31

04:17:56 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux




--
You received this message because you are subscribed to the Google

Groups

"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send

an

email to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit


https://groups.google.com/d/msgid/sage-support/99b2ac34-a7c7-47dc-e276-b506deff4b71%40gmail.com

.





--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sage-support/d74643c7-2a22-7f8c-9f5b-12761f16e9ca%40gmail.com
.





--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/3b1f-9ca6-7926-5084-fde768c08b9c%40gmail.com.


Re: [sage-support] sage compilation: Error running the postinst script for pplpy-0.8.4

2020-04-11 Thread Vincent Delecroix

Le 11/04/2020 à 13:28, Vincent Delecroix a écrit :

Could you also check if $MAKE is in the environment?


and $O as well (this is a shortcut used by sphinx default Makefile)

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/7a2d0663-0e97-fe5e-13c9-f223763d452c%40gmail.com.


Re: [sage-support] sage compilation: Error running the postinst script for pplpy-0.8.4

2020-04-11 Thread Vincent Delecroix

Because you skipped building pplpy documentation Sage can not
build its documentation... that a bug in the build system!

At the current stage, your sage should just work (except the
documentation which will not be available).

Le 11/04/2020 à 16:02, Carlos Rodriguez a écrit :

after HOURS running
the compilation failed again!
something about in dochtml.log
(attached)

I'll try what you suggested also...

am I going to be able to compile this beast?


On Sat, Apr 11, 2020 at 7:29 AM Vincent Delecroix <20100.delecr...@gmail.com>
wrote:


Could you also check if $MAKE is in the environment?


The log you sent is not verbose enough. It would help if you
would manually run the sphinx command with more verbosity. That
is

1. Switch to the sage environment

   $ $SAGE_ROOT/sage -sh

2. Go to the temporary build directory

   $ cd /home/crod569/sage/local/var/tmp/sage/build/pplpy-0.8.4/src/docs

3. Then run sphinx with verbose option and save it

$ make clean
$ SPHINXOPTS="-v -v" make html | tee /tmp/sphinx-build.log

then send the file /tmp/sphinx-build.log

4. exit sage environment

   $ exit

Vincent

Le 11/04/2020 à 13:15, Carlos Rodriguez a écrit :

No.
I did a "printenv | grep omega0"
and "printenv | grep SPHINX" and nothing showed up.

On Sat, Apr 11, 2020 at 7:06 AM Vincent Delecroix <

20100.delecr...@gmail.com>

wrote:


Hi Carlos,

There is indeed some interference between sphinx (the
software used to compile the documentation) and your
website. Though, I don't think that git is involved in
any way here.

One possibility is that the some of following environment
variables are set SPHINXBUILD, BUILDDIR, SPHINXOPTS. They
modify the behavior of sphinx. Could you check whether
they are set to something referring to your website url?

Vincent

Le 11/04/2020 à 12:57, Carlos Rodriguez a écrit :

Hi Vincent,
thanks a lot for your quick response.
omega0.xyz is my site at aws.
I also use git with it so you think that maybe interfering?

I am eager to get this working. I am trying to add my Sim
plificator to the symbolic package.

--Carlos.

On Sat, Apr 11, 2020 at 5:56 AM Vincent Delecroix <

20100.delecr...@gmail.com>

wrote:


Thanks for your report.

The postinstall script for pplpy just compiles and installs
the documentation. For now, you can use the workaround

 $ export SAGE_SPKG_INSTALL_DOCS="no"
 $ make

I don't quite understand what is happening. From your log

usage: sphinx-build [OPTIONS] SOURCEDIR OUTPUTDIR [FILENAMES...]
sphinx-build: error: cannot find files ['https://omega0.xyz/omega8008

']


Do you have any idea where this url

   https://omega0.xyz/omega8008

might come from!?

Best
Vincent

Le 11/04/2020 à 00:04, Carlos Rodriguez a écrit :

Running:

crod569@crod569-VirtualBox:~$ uname -a
Linux crod569-VirtualBox 5.3.0-46-generic #38~18.04.1-Ubuntu SMP Tue

Mar

31

04:17:56 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux




--
You received this message because you are subscribed to the Google

Groups

"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send

an

email to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit




https://groups.google.com/d/msgid/sage-support/99b2ac34-a7c7-47dc-e276-b506deff4b71%40gmail.com

.





--
You received this message because you are subscribed to the Google

Groups

"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send

an

email to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit


https://groups.google.com/d/msgid/sage-support/d74643c7-2a22-7f8c-9f5b-12761f16e9ca%40gmail.com

.





--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sage-support/3b1f-9ca6-7926-5084-fde768c08b9c%40gmail.com
.





--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/1ddb0ff1-b482-894b-a00b-895b3bf73513%40gmail.com.


  1   2   3   4   >