Skip to content

invalid ASCII sequence #24

@baggepinnen

Description

@baggepinnen

I have stumbled upon a bug I can't really explain. I'm trying out autodiff on the pdf for a MvNormal, so I have written a function which takes the parameters of a MvNormal distribution and returns a second function which is the pdf. Autodiff complains at an invalid ASCII-sequence?

using ReverseDiffSource
function fN( m, s)
    k = size(m,1)
    fpdf(x) = begin d = x-m; (sqrt((2*pi)^k*det(s))*exp(-0.5*d'*(inv(s)*d)))[1]; end
end
D = 2
fpdf = fN(zeros(D), eye(D))
dfN = rdiff(fpdf, (zeros(D), ))

julia> dfN = rdiff(fpdf, (zeros(D),))
ERROR: ArgumentError: invalid ASCII sequence
in convert at ./ascii.jl:107
in setindex! at array.jl:314
in show at /local/home/fredrikb/.julia/v0.4/ReverseDiffSource/src/graph.jl:55
in print at strings/io.jl:8
in print_to_string at ./strings/io.jl:36
in myeval at /local/home/fredrikb/.julia/v0.4/ReverseDiffSource/src/graph.jl:322
in evaluate at /local/home/fredrikb/.julia/v0.4/ReverseDiffSource/src/graph.jl:354
in calc! at /local/home/fredrikb/.julia/v0.4/ReverseDiffSource/src/graph.jl:410
in rdiff at /local/home/fredrikb/.julia/v0.4/ReverseDiffSource/src/rdiff.jl:34
in rdiff at /local/home/fredrikb/.julia/v0.4/ReverseDiffSource/src/frdiff.jl:23

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions