Ask Your Question
1

Having trouble importing the lazy_laurent_series module

asked 2019-11-04 17:56:54 -0600

masseygirl gravatar image

updated 2019-11-04 17:57:21 -0600

I am trying to import and use lazy Laurent series rings in sage, documented here: (http://doc.sagemath.org/html/en/refer...). I have the latest version of sage installed, and yet when I attempt to import/install the package it is nowhere to be found.

 from sage.rings.lazy_laurent_series_ring import LazyLaurentSeriesRing
    ---------------------------------------------------------------------------
    ImportError                               Traceback (most recent call last)
    <ipython-input-1-db0f55e1138b> in <module>()
    ----> 1 from sage.rings.lazy_laurent_series_ring import LazyLaurentSeriesRing

    ImportError: No module named lazy_laurent_series_ring

I then tried to download it, perhaps I am not downloading the correct package? Where is it hiding?

sage -i lazy_laurent_series
Error: package 'lazy_laurent_series' not found
Note: if it is an old-style package, use -p instead of -i to install it
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2019-11-05 01:51:46 -0600

Emmanuel Charpentier gravatar image

updated 2019-11-05 01:52:45 -0600

WorksForMe(TM). On a Python 3-based 9.0.beta3 :

sage: from sage.rings.laurent_series_ring import *
sage: L.<z> = LazyLaurentSeriesRing(QQ)
sage: L.category()
Category of magmas and additive magmas
sage: 1/(1 - z)
1 + z + z^2 + z^3 + z^4 + z^5 + z^6 + ...
sage: 1/(1 - z) == 1/(1 - z)

NOTE : from the doc:

The definition of Laurent series rings is not initially imported into the global namespace. You need to import it explicitly to use it.

HTH,

edit flag offensive delete link more

Comments

It's unfortunately still not working, even after importing the package you mention. I'm running SageMath version 8.1.

sage: from sage.rings.laurent_series_ring import *
sage: L.<z> = LazyLaurentSeriesRing(QQ);
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-9-6587116685f3> in <module>()
----> 1 L = LazyLaurentSeriesRing(QQ, names=('z',)); (z,) = L._first_ngens(1);

NameError: name 'LazyLaurentSeriesRing' is not defined
masseygirl gravatar imagemasseygirl ( 2019-11-06 10:06:40 -0600 )edit
1

Your Sage is too old (8.1 is quite old by today's standards...). From the doc:

AUTHORS: Kwankyu Lee (2019-02-24): initial version

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2019-11-06 12:37:42 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-11-04 17:56:54 -0600

Seen: 16 times

Last updated: Nov 05