Ask Your Question

Adrian soto's profile - activity

2021-08-28 10:55:01 +0200 received badge  Famous Question (source)
2021-05-28 12:13:52 +0200 received badge  Notable Question (source)
2021-05-28 12:13:52 +0200 received badge  Popular Question (source)
2020-09-21 11:28:25 +0200 received badge  Notable Question (source)
2020-09-21 11:28:25 +0200 received badge  Popular Question (source)
2019-10-04 17:40:28 +0200 commented answer Request: Have the len function output a Sage Integer instead of a Python int

I just checked and zip correctly zips with the proper types.

What I just realized is that len outputs a Python int, and not a Sage Integer. I personally think this is dangerous, and I fell for it. As you mentioned, Sage, correcly changes the types accordingly, unless both types are ints, in which case it leaves them alone.

I think len should output a Sage Integer instead, but I do not know what the rationale of having len outupt an int is, assuming this was done on purpose.

So I guess, I should not label this as a bug, but rather as a request: Have len output an Integer, instead of an int.

Thank you very much for your patience. I learned a lot.

-A.

2019-10-04 17:19:00 +0200 commented answer Request: Have the len function output a Sage Integer instead of a Python int

As you can check, srange already had produced sage Integers, and not ints... so the problem is rather in the zip command, I think.

I will study how zip behaves a bit further.

2019-10-04 06:00:55 +0200 commented answer Request: Have the len function output a Sage Integer instead of a Python int

Thank you very much for the clarifications, the quick response, and for the suggestions, which solved the problems in the code I had.

However, the same behaviour occurs if I change range by srange. The problem seems to be that zip reverts sage Integer to Python int.

See https://sagecell.sagemath.org/?q=iyqcsn

Is that intended?

2019-10-03 00:37:53 +0200 commented answer Request: Have the len function output a Sage Integer instead of a Python int

I think python int's should be converted to sage's; but it is a good workaround. I still think it is a bug.

2019-10-02 16:02:50 +0200 asked a question Request: Have the len function output a Sage Integer instead of a Python int

In the following code (See https://sagecell.sagemath.org/?q=cctcfj ):

a=[4,5,6]

b=[0,1,2]

for i in zip([0,1,2],a):

    print i[0],"divided by",len(a),"is equal to",i[0]/len(a)


a=[4,5,6]

b=range(len(a))

print(b)

for i in zip(b,a):

    print i[0],"divided by",len(a),"is equal to",i[0]/len(a)

Gives the following output

0 divided by 3 is equal to 0

1 divided by 3 is equal to 1/3

2 divided by 3 is equal to 2/3

[0, 1, 2]
0 divided by 3 is equal to 0

1 divided by 3 is equal to 0

2 divided by 3 is equal to 0

Greetings

-A

2019-10-01 06:49:01 +0200 received badge  Self-Learner (source)
2019-10-01 06:48:49 +0200 received badge  Student (source)
2019-10-01 06:15:20 +0200 answered a question Ho do I uninstall sagemath in Windows

I just uninstalled it with "remove programs" in Control panel, followed by removing the .sage directory. Apparently there was a file uninst.exe in the directory where I installed sagemath.

It would be nice to add that option in the Windows Start menu. I guess there is no more to it.

2019-10-01 06:02:11 +0200 asked a question Ho do I uninstall sagemath in Windows

I installed sagemath 8.8 in Windows using the .exe installer from https://github.com/sagemath/sage-wind...

There does not seem to be an uninstaller.

I accidentally installed it in the wrong folder, and I want to repeat the process, but first I need to uninstall it.

Any suggestions?

2018-01-24 12:03:51 +0200 received badge  Editor (source)
2018-01-24 12:01:57 +0200 answered a question Math document containing some Sage calculations

There is a plugin for sage in TeXmacs. It needs some work to make it have the same functionality as that for Python, and to have it work both in Windows as in LInux or Mac.

In the meantime, inside the following link you could download the file adriansage2.tar.gz.

If you use LInux, you may try to uncompress and download the file in the plugins directory of your .TeXmacs directory to see if it recognizes your sage instalation (assuming sage is discoverable from the path) and perhaps this allows you to practice a bit.

http://lists.texmacs.org/wws/arc/texm...

2011-06-09 01:58:53 +0200 received badge  Supporter (source)
2011-06-01 16:20:47 +0200 answered a question problem during install sage ubuntu python

I started to get this in sage 4.6.2, and I got it again with sage 4.7

It got solved by going to software center, in ubuntu, and install libgfortran3

or do sudo apt-get install libgfortran3

This is what I had: ImportError: libgfortran.so.3: cannot open shared object file: No such file or directory Error importing ipy_profile_sage - perhaps you should run %upgrade? WARNING: Loading of ipy_profile_sage failed.

Peace. -Adrian.

2011-04-25 22:00:46 +0200 received badge  Teacher (source)
2011-04-25 22:00:46 +0200 received badge  Necromancer (source)
2011-04-23 17:58:36 +0200 answered a question Solution to a long running jsmath/notebook problem

Yes you need the package jsmath-fonts; but in my case (Ubuntu 10.10 Maverick Meerkat) you need, in addition to jsmath-fonts, the package ttf-jsmath.

Now, matrices bigger than 2 by 2 look nice in the notebook.