[sage-devel] Re: Assumptions with complex variables (possible BUG)

2020-03-18 Thread Markus Wageringel
You are probably using Sage with Python 2. In Python 2, a list expression 
involving an index variable `a` like

assume([U_asm[a] for a in [0, 1, 3]])

overwrites the previous content of the variable `a`. At the end of the 
loop, `a` will have the value `3`, which leads to the output you obtained. 
If you rename the loop index to something other than a,b,c,d, the problem 
goes away.

With Python 3, this problem does not exist either, as loop variables are 
local as one would expect. Therefore, I suggest to switch to using Sage 
with Python 3.

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


[sage-devel] Re: Assumptions with complex variables (possible BUG)

2020-03-18 Thread Janusz Przewocki
Thank you, I did not notice it in my code. 

Regards
  Janusz

W dniu środa, 18 marca 2020 10:10:55 UTC+1 użytkownik Markus Wageringel 
napisał:
>
> You are probably using Sage with Python 2. In Python 2, a list expression 
> involving an index variable `a` like
>
> assume([U_asm[a] for a in [0, 1, 3]])
>
> overwrites the previous content of the variable `a`. At the end of the 
> loop, `a` will have the value `3`, which leads to the output you obtained. 
> If you rename the loop index to something other than a,b,c,d, the problem 
> goes away.
>
> With Python 3, this problem does not exist either, as loop variables are 
> local as one would expect. Therefore, I suggest to switch to using Sage 
> with Python 3.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/1c502c8f-a79a-4beb-a5b2-30333ccb503f%40googlegroups.com.


[sage-devel] lcalc.analytic_rank fails

2020-03-18 Thread Barinder Banwait
MWE:

sage: A = -17737878703644595885728157881856/2195118875780412735240966796875
sage: B = 
76386743039924534000525642916220282669332545616695170155741184/4818546878807463076444691815463494370294881403446197509765625
sage: E = EllipticCurve([A,B])
sage: lcalc.analytic_rank(E)

This produces "***   overflow in t_INT-->t_INT assignment.Segmentation 
fault (core dumped), followed by "TypeError: unable to convert '' to an 
integer". It looks like line 385 of sage/lfunctions/lcalc.py is returning 
the empty string, i.e., 'rank-compute' is failing to compute, probably 
because of the overflow.

This elliptic curve comes from Elkies and Klagsbrun's recent paper 
(https://arxiv.org/abs/2003.00077); it is the rank 20 curve with torsion 
Z/2Z.

Other info:

OS: Ubuntu 18.04.2 LTS, 64bit
Sage installation: Downloaded and unzipped the top link here: 
http://www.mirrorservice.org/sites/www.sagemath.org/linux/64bit/index.html
SageMath version 9.0, release date 2020-01-01
Using Python 3.7.3

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/15743c40-6434-477e-ac27-12ff73af5286%40googlegroups.com.


[sage-devel] Counterexample of Fubini - Strange Result with Maxima

2020-03-18 Thread Michael Jung

Dear fellow developers,
I've encountered a really strange result in Sage while using Maxima.

|
sage:f(x,y)=(x^2-y^2)/(x^2+y^2)^2
sage:integrate(integrate(abs(f(x,y)),x,0,1),y,0,1)

-1/4*pi

|

This is really weird. At least, the result should be positive! SymPy 
however yields the correct result:


|
sage: |integrate(integrate(abs(f(x,y)),x,0,1, 
algorithm='sympy'),y,0,1, algorithm='sympy'||)|


+Infinity

||
|

What is the issue here? Did I do something wrong, or is this a bug with 
Maxima?


Best
Michael

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/9b9699e1-9c91-0348-a8bc-b4c86b075178%40uni-potsdam.de.


[sage-devel] Counterexample of Fubini - Strange Result with Maxima

2020-03-18 Thread Michael Jung
Dear fellow developers,
I've encountered a really strange result in Sage while using Maxima.

sage: f(x,y) = (x^2-y^2)/(x^2+y^2)^2
sage: integrate(integrate(abs(f(x,y)), x, 0, 1), y, 0, 1) 

-1/4*pi   


This is really weird. At least, the result should be positive! SymPy 
however yields the correct result:

sage: integrate(integrate(abs(f(x,y)), x, 0, 1, algorithm='sympy'), y, 0, 1, 
algorithm='sympy')

+Infinity


What is the issue here? Did I do something wrong, or is this a bug with 
Maxima?

Best
Michael 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/f3f70ef3-3bf4-4fdf-a750-8ac91b696998%40googlegroups.com.


Re: [sage-devel] Re: Error Building on Slackware 14.2

2020-03-18 Thread Christopher Duston
I ran those two commands, and piped the output to a file, attached here.

Thanks.

On Tue, Mar 17, 2020 at 5:53 PM Matthias Koeppe 
wrote:

> On Tuesday, March 17, 2020 at 3:56:49 PM UTC-4, Christopher Duston wrote:
>>
>> I've got an error when compiling SageMath 9.0 from source on a Slackware
>> 14.2 machine.
>>
>
> I have set up a test environment for Slackware (tox -e
> docker-slackware-14.2) at https://trac.sagemath.org/ticket/29354
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "sage-devel" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/sage-devel/WshDn3e_l3k/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> sage-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-devel/53f714b5-be91-4a06-9a4d-640363820e1d%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAPDCXq2y%2BSB4wgZ5WFpeoLysJvem1DqL%2BJEfWOsefnq6N7cEgw%40mail.gmail.com.
ConsoleKit2
Cython
GConf
LibRaw
M2Crypto
MPlayer
ModemManager
NetworkManager
PyQt
QScintilla
Thunar
a2ps
a52dec
aaa_base
aaa_elflibs
aaa_terminfo
aalib
acct
acl
acpid
adwaita-icon-theme
akonadi
alpine
alsa-lib
alsa-oss
alsa-plugins
alsa-utils
amarok
amor
amp
analitza
anthy
appres
apr
apr-util
ark
artikulate
ash
aspell
aspell-en
at
at-spi2-atk
at-spi2-core
atk
atkmm
attica
attr
audacious
audacious-plugins
audiocd-kio
audiofile
autoconf
autofs
automake
automoc4
babl
baloo
baloo-widgets
bash
bc
bdftopcf
beforelight
biff+comsat
bigreqsproto
bin
bind
binutils
bison
bitmap
blackbox
blinken
bluedevil
blueman
bluez
bluez-firmware
bomber
boost
bootp
bovo
bpe
bridge-utils
bsd-finger
bsd-games
btrfs-progs
bzip2
ca-certificates
cairo
cairomm
calligra
calligra-l10n-en_GB
calligra-l10n-ja
calligra-l10n-tr
cantor
ccache
cdparanoia
cdrdao
cdrtools
cervisia
cgmanager
chmlib
cifs-utils
clisp
clucene
cmake
compiz
compositeproto
conntrack-tools
coreutils
cpio
cpufrequtils
crda
cryptsetup
cscope
cups
cups-filters
curl
cvs
cyrus-sasl
damageproto
db42
db44
db48
dbus
dbus-glib
dbus-python
dc3dd
dconf
dconf-editor
dcron
ddd
ddrescue
dejavu-fonts-ttf
desktop-file-utils
dev86
devs
dhcp
dhcpcd
dialog
diffstat
diffutils
dirmngr
distcc
djvulibre
dmapi
dmidecode
dmxproto
dnsmasq
dolphin-plugins
dosfstools
doxygen
dragon
dri2proto
dri3proto
dvd+rw-tools
e2fsprogs
ebook-tools
ebtables
ed
editres
efibootmgr
eigen2
eigen3
eject
electricsheep
elfutils
elilo
elm
elvis
emacs
enchant
encodings
enscript
epic5
esound
etc
ethtool
eudev
evieext
exiv2
exo
expat
expect
fetchmail
fftw
file
filelight
findutils
fixesproto
flac
flex
floppy
fluxbox
font-adobe-100dpi
font-adobe-75dpi
font-adobe-utopia-100dpi
font-adobe-utopia-75dpi
font-adobe-utopia-type1
font-alias
font-arabic-misc
font-bh-100dpi
font-bh-75dpi
font-bh-lucidatypewriter-100dpi
font-bh-lucidatypewriter-75dpi
font-bh-ttf
font-bh-type1
font-bitstream-100dpi
font-bitstream-75dpi
font-bitstream-speedo
font-bitstream-type1
font-cronyx-cyrillic
font-cursor-misc
font-daewoo-misc
font-dec-misc
font-ibm-type1
font-isas-misc
font-jis-misc
font-micro-misc
font-misc-cyrillic
font-misc-ethiopic
font-misc-meltho
font-misc-misc
font-mutt-misc
font-schumacher-misc
font-screen-cyrillic
font-sony-misc
font-sun-misc
font-util
font-winitzki-cyrillic
font-xfree86-type1
fontcacheproto
fontconfig
fontsproto
fonttosfnt
freeglut
freetype
fribidi
fslsfonts
fstobdf
fuse
fvwm
gamin
garcon
gawk
gc
gcc
gcc-g++
gcc-gfortran
gcc-gnat
gcc-go
gcc-java
gcc-objc
gccmakedep
gcr
gd
gdb
gdbm
gdk-pixbuf2
geeqie
gegl
genpower
getmail
gettext
gettext-tools
getty-ps
gftp
ghostscript
ghostscript-fonts-std
giflib
gimp
git
gkrellm
glade3
glew
glib
glib-networking
glib2
glibc
glibc-i18n
glibc-profile
glibc-solibs
glibc-zoneinfo
glibmm
glproto
glu
gmime
gmm
gmp
gnome-keyring
gnome-themes-standard
gnu-cobol
gnu-efi
gnuchess
gnupg
gnupg2
gnuplot
gnutls
gobject-introspection
gpa
gparted
gperf
gpgme
gphoto2
gpm
gptfdisk
granatier
grantlee
grep
groff
grub
gsettings-desktop-schemas
gsl
gst-plugins-base
gst-plugins-base0
gst-plugins-good
gst-plugins-good0
gstreamer
gstreamer0
gtk+
gtk+2
gtk+3
gtk-xfce-engine
gtkmm2
gtkmm3
gtkspell
gucharmap
guile
gutenprint
gv
gvfs
gwenview
gzip
harfbuzz
hdparm
help2man
herqq
hexchat
hfsutils
hicolor-icon-theme
hplip
htdig
htop
httpd
hunspell
hwdata
iceauth
icmpinfo
ico
icon-naming-utils
icu4c
idnkit
iftop
ilmbase
imagemagick
imake
imapd
indent
inetd
infozip
inotify-tools
inputproto
intel-gpu-tools
intltool
iproute2
ipset
iptables
iptraf-ng
iputils
ipw2100-fw
ipw2200-fw
irssi
iso-

[sage-devel] Inherit Method but keep Documentation?

2020-03-18 Thread Michael Jung
Dear developers,
to reduce redundancies in the SageManifolds code, we plan to inherit most 
methods and classes from a (mathematically) more general setup. 
Still, the current documentation is mandatory. Is it possible to establish 
new documentations for inherited methods?

An example:

class Mother(SageObject):
def my_method(self):
r"""
Some Documentation.

return 'Bam!'

class Daughter(Mother):
pass

For the class "Daughter", the method "my_method" shall have a separate 
self-containing documentation.

Best regards
Michael

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/ab7087df-883e-4fe3-bea2-6cc8117abea8%40googlegroups.com.


Re: [sage-devel] Inherit Method but keep Documentation?

2020-03-18 Thread Michael Orlitzky
On 3/18/20 5:04 PM, Michael Jung wrote:
> Dear developers,
> to reduce redundancies in the SageManifolds code, we plan to inherit
> most methods and classes from a (mathematically) more general setup.
> Still, the current documentation is mandatory. Is it possible to
> establish new documentations for inherited methods?

I tried, and I don't think so.

If you don't override the method, then the subclass method will
literally point to the superclass method, implying that they both have
to have the same __doc__.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/52f8895d-858e-337d-06b6-88eb84b94f4a%40orlitzky.com.


Re: [sage-devel] Inherit Method but keep Documentation?

2020-03-18 Thread Michael Jung
Damn it. Then I another question: Would it cause a slow-down if I 
overwrite the method with something like


   def my_method(self):
    r"""
    New Documentation
    """
    Mother.my_method(self)

Best,
Michael

Am 19.03.2020 um 00:41 schrieb Michael Orlitzky:

On 3/18/20 5:04 PM, Michael Jung wrote:

Dear developers,
to reduce redundancies in the SageManifolds code, we plan to inherit
most methods and classes from a (mathematically) more general setup.
Still, the current documentation is mandatory. Is it possible to
establish new documentations for inherited methods?

I tried, and I don't think so.

If you don't override the method, then the subclass method will
literally point to the superclass method, implying that they both have
to have the same __doc__.




--
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/39892653-0f84-5c96-a12f-ac378f8e535b%40uni-potsdam.de.


Re: [sage-devel] Inherit Method but keep Documentation?

2020-03-18 Thread David Roe
On Wed, Mar 18, 2020 at 10:58 PM Michael Jung 
wrote:

> Damn it. Then I another question: Would it cause a slow-down if I
> overwrite the method with something like
>
> def my_method(self):
> r"""
> New Documentation
> """
> Mother.my_method(self)
>
>
This will take small amount of time (on the order of 150ns), but that time
will probably be dwarfed by whatever Mother.my_method is doing.  I don't
see an alternative if you want to have different documentation.
David

Best,
> Michael
> Am 19.03.2020 um 00:41 schrieb Michael Orlitzky:
>
> On 3/18/20 5:04 PM, Michael Jung wrote:
>
> Dear developers,
> to reduce redundancies in the SageManifolds code, we plan to inherit
> most methods and classes from a (mathematically) more general setup.
> Still, the current documentation is mandatory. Is it possible to
> establish new documentations for inherited methods?
>
> I tried, and I don't think so.
>
> If you don't override the method, then the subclass method will
> literally point to the superclass method, implying that they both have
> to have the same __doc__.
>
>
>
>
> 
>  Virenfrei.
> www.avast.com
> 
> <#m_4370060584590146904_m_5189638189139830647_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-devel/39892653-0f84-5c96-a12f-ac378f8e535b%40uni-potsdam.de
> 
> .
>

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


Re: [sage-devel] Inherit Method but keep Documentation?

2020-03-18 Thread John H Palmieri
What about

my_method = Mother.my_method
my_method.__doc__ = "new docstring"


Does that do what you want?


On Wednesday, March 18, 2020 at 9:22:31 PM UTC-7, David Roe wrote:
>
>
>
> On Wed, Mar 18, 2020 at 10:58 PM Michael Jung  > wrote:
>
>> Damn it. Then I another question: Would it cause a slow-down if I 
>> overwrite the method with something like
>>
>> def my_method(self):
>> r"""
>> New Documentation
>> """
>> Mother.my_method(self)
>>
>>
> This will take small amount of time (on the order of 150ns), but that time 
> will probably be dwarfed by whatever Mother.my_method is doing.  I don't 
> see an alternative if you want to have different documentation.
> David
>
> Best,
>> Michael
>> Am 19.03.2020 um 00:41 schrieb Michael Orlitzky:
>>
>> On 3/18/20 5:04 PM, Michael Jung wrote:
>>
>> Dear developers,
>> to reduce redundancies in the SageManifolds code, we plan to inherit
>> most methods and classes from a (mathematically) more general setup.
>> Still, the current documentation is mandatory. Is it possible to
>> establish new documentations for inherited methods?
>>
>> I tried, and I don't think so.
>>
>> If you don't override the method, then the subclass method will
>> literally point to the superclass method, implying that they both have
>> to have the same __doc__.
>>
>>
>>
>>
>> 
>>  Virenfrei. 
>> www.avast.com 
>> 
>>  
>> <#CAChs6_kbivVB03vy7GDzvt6CgdVyi8m715ECkqtYR8D7JVsFxA@mail.gmail.com_m_4370060584590146904_m_5189638189139830647_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "sage-devel" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to sage-...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sage-devel/39892653-0f84-5c96-a12f-ac378f8e535b%40uni-potsdam.de
>>  
>> 
>> .
>>
>

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