Skip to content

Commit

Permalink
adjust code and tests to changes in Nemo.jl (#966)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasBreuer authored Feb 16, 2024
1 parent ae2997e commit fb0520e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pkg/JuliaExperimental/gap/zmodnz.g
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ InstallMethod( ContextGAPNemo,
fi;

# Create the Nemo ring.
juliaRing:= Julia.Nemo.residue_ring( Julia.Nemo.ZZ, GAPToJulia( m ) );
juliaRing:= Julia.Nemo.residue_ring( Julia.Nemo.ZZ, GAPToJulia( m ) )[1];

# Create the GAP wrapper.
# Note that elements from different Nemo residue rings cannot be compared,
Expand Down
2 changes: 1 addition & 1 deletion pkg/JuliaExperimental/julia/realcyc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function isPositiveRealPartCyc( coeffs::Vector )
while true
R::Nemo.ArbField = Nemo.ArbField( prec )
x::Nemo.arb = arbCyc( coeffs, R )
if Nemo.ispositive( x )
if Nemo.is_positive( x )
return ( true, prec )
elseif Nemo.is_negative( x )
return ( false, prec )
Expand Down
4 changes: 2 additions & 2 deletions pkg/JuliaExperimental/tst/context.tst
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,13 @@ gap> c:= ContextGAPNemo( f );
gap> gap_elm:= One( f );;
gap> elm:= GAPToNemo( c, gap_elm );;
gap> JuliaTypeInfo( JuliaPointer( elm ) );
"Nemo.nf_elem"
"Nemo.AbsSimpleNumFieldElem"
gap> NemoToGAP( c, elm ) = gap_elm;
true
gap> a:= RootOfDefiningPolynomial( f );;
gap> elm:= GAPToNemo( c, a );;
gap> JuliaTypeInfo( JuliaPointer( elm ) );
"Nemo.nf_elem"
"Nemo.AbsSimpleNumFieldElem"
gap> NemoToGAP( c, elm ) = a;
true
gap> gap_vec:= [ a+1, a-1 ];;
Expand Down
4 changes: 2 additions & 2 deletions pkg/JuliaExperimental/tst/numfield.tst
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ gap> Characteristic( nmat );
gap> tr:= TraceMat( nmat );
<<Julia: 2>>
gap> JuliaTypeInfo( JuliaPointer( tr ) );
"Nemo.nf_elem"
"Nemo.AbsSimpleNumFieldElem"
gap> det:= DeterminantMat( nmat );
<<Julia: 1>>
gap> JuliaTypeInfo( JuliaPointer( det ) );
"Nemo.nf_elem"
"Nemo.AbsSimpleNumFieldElem"
gap> NemoToGAP( c, nmat );
[ [ !1, 1/2*a ], [ !0, !1 ] ]
gap> no:= GAPToNemo( c, One( f ) );
Expand Down
2 changes: 0 additions & 2 deletions pkg/JuliaInterface/tst/wrapper.tst
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ gap> N := Objectify(type, rec());;
gap> SetJuliaPointer(N, n);
gap> Julia.Base.typeof(N);
<Julia: BigInt>
gap> N(1);
Error, MethodError: objects of type BigInt are not callable

## wrap a Julia function
gap> f := Objectify(type, rec());;
Expand Down

0 comments on commit fb0520e

Please sign in to comment.