Ah, thank you. Any idea if loading packages via libgap.LoadPackage("forms") is 
expected to work?

Jackson
On Thursday, December 5, 2024 at 6:14:49 PM UTC-5 David Roe wrote:

> Yep, that should work.  To find the right import statements, you can do
> sage: import_statements(libgap)
> from sage.libs.gap.libgap import libgap
> David
>
> On Thu, Dec 5, 2024 at 5:37 PM Jackson Walters <jackson...@gmail.com> 
> wrote:
>
>> Perhaps I can just use 
>>
>> from sage.libs.gap.libgap import libgap
>>
>> On Thursday, December 5, 2024 at 5:34:45 PM UTC-5 Jackson Walters wrote:
>>
>>> Hi all,
>>>
>>> Probably pretty obvious, but I need to call libgap for the following 
>>> function:
>>>
>>> def unitary_change_of_basis(U,q):
>>>    if U.nrows() == 1 and U.ncols() == 1:
>>>        return matrix(F,[[factor_scalar(U[0,0])]])
>>>     libgap.LoadPackage("forms")
>>>     return matrix(F,libgap.BaseChangeToCanonical(libgap([list(row) for 
>>> row in U]).HermitianFormByMatrix(F))).inverse()
>>>
>>> It works perfectly fine in a Sage notebook, but throws errors when I try 
>>> to include it in a PR.
>>>
>>> What is the proper way to invoke libgap in, say, 
>>> symmetric_group_algebra.py? Should I go back to using libgap.eval?
>>>
>>> Thank you,
>>> Jackson
>>>
>> -- 
>> 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+...@googlegroups.com.
>> To view this discussion visit 
>> https://groups.google.com/d/msgid/sage-devel/63229f29-ccaa-4f40-aeef-5a7540afd72an%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/sage-devel/63229f29-ccaa-4f40-aeef-5a7540afd72an%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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 visit 
https://groups.google.com/d/msgid/sage-devel/643fca79-88f2-49ee-8e9c-05893da83a1fn%40googlegroups.com.

Reply via email to