Skip to content

Commit

Permalink
change Int64 to Int where possible, fix dispatch test
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoinemarteau committed Jan 8, 2025
1 parent 10bab17 commit 5eaf076
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Polynomials/ChebyshevBases.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ High level constructors of [`ChebyshevBasis`](@ref).
ChebyshevBasis(args...; kind=:T) = UniformPolyBasis(Chebyshev{kind}, args...)

function UniformPolyBasis(
::Type{Chebyshev{:U}}, ::Val{D}, ::Type{V}, ::Int64) where {D, V}
::Type{Chebyshev{:U}}, ::Val{D}, ::Type{V}, ::Int) where {D, V}

@notimplemented "1D evaluation for second kind need to be implemented here"
end
Expand Down
10 changes: 5 additions & 5 deletions test/TensorValuesTests/TypesTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ a = [11.0 21.0; NaN 22.0]
@test convert(SymTensorValue{2,Float64},a) == SymTensorValue{2,Float64,3}(11.0, 21.0, 22.0)

# Constructors (SymTracelessTensorValue)
q_none = SymTracelessTensorValue{0, Int64, 0}()
q_none = SymTracelessTensorValue{0, Int, 0}()
q = SymTracelessTensorValue()
@test q == q_none
q = SymTracelessTensorValue{0}()
Expand Down Expand Up @@ -681,26 +681,26 @@ a = SymTensorValue(11,21,22)
@test change_eltype(SymTensorValue{2,Float64},Int) == SymTensorValue{2,Int}
@test isa(Tuple(a),Tuple)
@test Tuple(a) == a.data
b = Matrix{Int64}(undef,2,2)
b = Matrix{Int}(undef,2,2)
b[1,1] = a[1,1]
b[1,2] = a[1,2]
b[2,1] = a[2,1]
b[2,2] = a[2,2]
a = SymTensorValue(11,21,22)
bt = SymTensorValue{2,Int64}(b)
bt = SymTensorValue{2,Int}(b)
@test all(bt .== a)

a = SymTracelessTensorValue(11,21)
@test change_eltype(a,Float64) == SymTracelessTensorValue{2,Float64,3}
@test change_eltype(SymTracelessTensorValue{2,Float64},Int) == SymTracelessTensorValue{2,Int}
@test isa(Tuple(a),Tuple)
@test Tuple(a) == a.data
b = Matrix{Int64}(undef,2,2)
b = Matrix{Int}(undef,2,2)
b[1,1] = a[1,1]
b[1,2] = a[1,2]
b[2,1] = a[2,1]
b[2,2] = a[2,2]
bt = SymTracelessTensorValue{2,Int64}(b)
bt = SymTracelessTensorValue{2,Int}(b)
@test all(bt .== a)

a = SymFourthOrderTensorValue(1111,1121,1122, 2111,2121,2122, 2211,2221,2222)
Expand Down

0 comments on commit 5eaf076

Please sign in to comment.