Skip to content

Commit

Permalink
logistic & zeta test
Browse files Browse the repository at this point in the history
  • Loading branch information
glou-nes committed Dec 2, 2024
1 parent be1b423 commit 666c9b6
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions test/ops.jl
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,11 @@ end
@test log.(Array(x)) @jit Ops.log(x)
end

@testset "logistic" begin end
@testset "logistic" begin
x = ConcreteRArray([0.0, 1.0, 2.0, 3.0])
l(x) = 1 / (1 + exp(-x))
@test l.(Array(x)) @jit Ops.logistic(x)
end

@testset "maximum" begin
x = ConcreteRArray([false, false, true, true])
Expand Down Expand Up @@ -798,4 +802,8 @@ end
@test (; values=[4, 3], indices=[3, 2]) == @jit Ops.top_k(x, 2)
end

@testset "zeta" begin end
@testset "zeta" begin
s = ConcreteRArray([1.0, 2.0, 50.0])
z = ConcreteRArray([1e-8, 0.001, 2.0])
@test SpecialFunctions.zeta.(Array(s), Array(z)) @jit Ops.zeta(s, z)
end

0 comments on commit 666c9b6

Please sign in to comment.