Hi Michael,
I tried your code and got a different error:
julia> map(SqrDiff(),x,y)
ERROR: `result_type` has no method matching result_type(::SqrDiff,
::Type{Float64}, ::Type{Float64})
in map at /Users/sam/.julia/v0.3/NumericExtensions/src/map.jl:28
Defining a method of result_type worked though:
julia> NumericExtensions.result_type{T1,T2}(::SqrDiff,::Type{T1},
::Type{T2}) = typeof(NumericExtensions.evaluate(SqrDiff(), one(T1),
one(T2)))
result_type (generic function with 100 methods)
julia> map(SqrDiff(),x,y)
4-element Array{Float64,1}:
9.0
9.0
9.0
9.0
If I recall correctly, there were some changes to NumericExtensions that
were not reflected in the docs. Not sure where your error is coming from.
Sam
On Friday, December 19, 2014 5:04:21 PM UTC-8, Michael Wojnowicz wrote:
>
>
> OK, thanks.
>
> On Friday, December 19, 2014 4:27:31 PM UTC-8, Dahua Lin wrote:
>>
>> NumericExtensions.jl was a stopgap.
>>
>> Now that we have callable syntax and much more optimized map function in
>> Julia Base (v0.4), using that package is no longer recommended.
>>
>> Dahua
>>
>>
>> On Saturday, December 20, 2014 7:07:10 AM UTC+8, Michael Wojnowicz wrote:
>>>
>>> Hi Ivar,
>>>
>>> Thanks for your thoughts and ideas. Unfortunately, none of those
>>> leads seem to be the the root of the problem:
>>>
>>> * I just reloaded a second session -- and also tried a different name,
>>> "SqrDiff2()", but got the same error message when trying to apply map.
>>>
>>> * I was pasting everything into REPL, but tried running from script, and
>>> got the same error message.
>>>
>>> -Mike
>>>
>>>
>>