Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes #12

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions src/connectivity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,3 @@ function connectivity_sparsematrixcsc(
end
return sparse(I, J, V, m, n)
end

function connectivity_bitmatrix(xt::AbstractArray{Tracer}, yt::AbstractArray{<:Number})
# Construct connectivity matrix of size (ouput_dim, input_dim)
n, m = length(xt), length(yt)
C = BitArray(undef, m, n)
for i in axes(C, 1)
if yt[i] isa Tracer
for j in axes(C, 2)
C[i, j] = j ∈ yt[i].inputs
end
else
C[i, :] .= 0
end
end
return C
end
4 changes: 3 additions & 1 deletion src/operators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ ops_2_to_1 = (
:div, :fld, :cld,
# modulo
:mod, :rem,
# trigonometric functions
:atan, :atand,
# exponentials
:ldexp,
# sign
Expand Down Expand Up @@ -83,7 +85,7 @@ for fn in (:eps, :nextfloat, :floatmin, :floatmax, :maxintfloat, :typemax)
@eval Base.$fn(::Tracer) = EMPTY_TRACER
end

## Rounding
## Rounding with RoundingMode
Base.round(t::Tracer, ::RoundingMode; kwargs...) = t

## Random numbers
Expand Down
Loading