You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is the shortest example I could come up with. It occurs with v0.1.2 and a just updated Julia.
module DualNumbers
import Base.show, Base.cat, Base.vcat, Base.hcat
export DualNum,dualnum
typealias FloatNum Union(Float64, Vector{Float64})
# This is the main new type declared here. The two components can be scalar, vector or matrix, # but must agree in type and shape.
type DualNum{T<:FloatNum}
st::T# standard part
di::T# differential partendfunctiondualnum{T<:FloatNum}(s::T,d::T)
returnDualNum(s,d) # construction given float types that agreeenddualnum{T<:FloatNum}(s::T) =dualnum(s,zero(s))
functioncat(k::Integer,x::DualNum,y::DualNum)
ST =cat(k,x.st,y.st)
DI =cat(k,x.di,y.di)
D =dualnum(ST,DI)
@show D
return D
endvcat(x::DualNum,y::DualNum) =cat(1,x,y)
hcat(x::DualNum,y::DualNum) =cat(2,x,y)
end# module# Example
a = DualNumbers.dualnum(1.0)
b = DualNumbers.dualnum(2.0)
d = [a,b]
@show d # shouldn't be Nothing
The text was updated successfully, but these errors were encountered:
Here is an example where the return object from a function gets lost after it is called. The result ends up being
Nothing
.This was found by @bsxfan who also reported that this is similar to #2161 and #2562:
Here is the shortest example I could come up with. It occurs with v0.1.2 and a just updated Julia.
The text was updated successfully, but these errors were encountered: