First time here? Check out the FAQ!

Ask Your Question
1

Using GAP in Sage and reusing the results

asked 3 years ago

updated 3 years ago

slelievre gravatar image

I need to run some program in GAP and use the output in another program in Sage.

I tried running gap_console() and then running "a := 1;" in GAP.

After exiting that console and going gack to Sage, my calculations were lost.

When I asked the value of "a" in Sage, I got:

NameError: name "a" is not defined.

Is there any command in Sage to solve this problem?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 3 years ago

slelievre gravatar image

To use GAP within Sage and reuse its results in the Sage session, use libgap.

Example:

sage: a = libgap(1)
sage: a
1
sage: parent(a)
C library interface to GAP
Preview: (hide)
link

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 3 years ago

Seen: 261 times

Last updated: Mar 12 '22