Hi everyone,
I am an R and MATLAB user who is moving to Julia.   I am trying the Numeric 
Extensions package. In the documentation (
http://numericextensionsjl.readthedocs.org/en/latest/functors.html), they 
show an example of how to define a new functor:

type SqrDiff <: Functor{2} end

 

NumericExtensions.evaluate(::SqrDiff, x, y) = abs2(x - y)


However, when I try to apply this new functor, I get this result:

*julia> **type SqrDiff <: Functor{2} end*

*julia> **NumericExtensions.evaluate(::SqrDiff, x, y) = abs2(x - y)*

*evaluate (generic function with 143 methods)*

*julia> **x=ones(4)*5*

*julia> **y=ones(4)*2*

*julia> **map(SqrDiff(),x,y)*

*ERROR: SqrDiff not defined*

*julia> **map(NumericExtensions.SqrDiff(),x,y)*

*ERROR: SqrDiff not defined*


Any ideas about what the problem is?  I have no problem with


*julia> **map(NumericExtensions.Multiply(),x,y)*


Reply via email to