New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change gen.python() to return Python objects #21808
Comments
Dependencies: #21820 |
comment:2
I would like to implement a I guess the best solution would be to support only |
comment:3
Why not:
|
Changed keywords from none to atelierpari2017 |
This comment has been minimized.
This comment has been minimized.
comment:6
why not |
This comment has been minimized.
This comment has been minimized.
comment:7
Replying to @defeo:
Indeed. And |
This comment has been minimized.
This comment has been minimized.
Commit: |
Author: Vincent Delecroix |
Branch: u/vdelecroix/21808 |
comment:11
rebased on the correct #21807 |
comment:13
rebased on #21807 and all tests pass in |
This comment has been minimized.
This comment has been minimized.
comment:15
(Edit: wrong ticket) |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
This comment has been minimized.
This comment has been minimized.
comment:27
all tests pass on my computer |
Changed branch from u/vdelecroix/21808 to u/defeo/21808 |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:30
And now patchbot is happy ;-) |
comment:31
I'm happy, Patchbot's happy, everyone's happy! |
Reviewer: Luca De Feo |
Changed branch from u/defeo/21808 to |
Currently,
gen.python()
is the same asgen.sage()
which returns Sage objects. There should be a pure Python version, returning Python objects.We implement the following conversions inside a
gen_to_python
functiont_INT
->int
orlong
t_REAL
->float
t_COMPLEX
->complex
t_FRAC
-> fractiont_INFINITY
->float
t_STR
->str
t_VEC
,t_COL
->list
t_MAT
->list
oflist
sFor all other types, the function raises a
NotImplementedError
.Depends on #21807
CC: @defeo
Component: interfaces
Keywords: atelierpari2017
Author: Vincent Delecroix
Branch/Commit:
ee54f07
Reviewer: Luca De Feo
Issue created by migration from https://trac.sagemath.org/ticket/21808
The text was updated successfully, but these errors were encountered: