Skip to content

Commit

Permalink
Format code of branch "main" (#296)
Browse files Browse the repository at this point in the history
Co-authored-by: mofeing <[email protected]>
  • Loading branch information
github-actions[bot] and mofeing authored Nov 20, 2024
1 parent d719530 commit 542e553
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/TracedRNumber.jl
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,9 @@ struct TypeCast{T<:ReactantPrimitive} <: Function end

(::TypeCast{T})(x::TracedRNumber{T2}) where {T,T2} = promote_to(TracedRNumber{T}, x)

Base.fill(x::TracedRNumber, dims::NTuple{N,Integer}) where {N} = Reactant.broadcast_to_size(x, dims)
function Base.fill(x::TracedRNumber, dims::NTuple{N,Integer}) where {N}
return Reactant.broadcast_to_size(x, dims)
end

Base.float(x::TracedRNumber{T}) where {T} = promote_to(TracedRNumber{float(T)}, x)

Expand Down
4 changes: 2 additions & 2 deletions test/basic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -539,8 +539,8 @@ end

@testset "concrete number with fill" begin
x = ConcreteRNumber(10)
x_ra = @jit fill(x, (10,10))
@test fill(x, (10,10)) == Array(x_ra)
x_ra = @jit fill(x, (10, 10))
@test fill(x, (10, 10)) == Array(x_ra)
end

@testset "clamp" begin
Expand Down

0 comments on commit 542e553

Please sign in to comment.