Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
adrhill committed Apr 9, 2024
1 parent 121fef8 commit fdd0bc9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
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

0 comments on commit fdd0bc9

Please sign in to comment.