Agreed: the current ambiguity system has some unfortunate properties.

 — John

On Jan 6, 2014, at 1:41 PM, Dahua Lin <[email protected]> wrote:

> In base/linalg/diagonal.jl: line 24 - 27
> 
> it defines the following functions:
> 
> + (Diagonal, Diagonal)
> - (Diagonal, Diagonal)
> - (Diagonal, AbstractMatrix)
> - (AbstractMatrix, Diagonal)
> 
> So when you write Diagonal - DataMatrix, the compiler doesn't know which 
> method to use. 
> 
> But for +, there is not such a problem ...
> 
> I don't know why they don't define + (Diagonal, AbstractMatrix) and + 
> (AbstractMatrix, Diagonal) ....
> 
> I think these things need a serious cleanup.
> 
> - Dahua
> 
> 
> 
> On Sunday, January 5, 2014 11:13:27 AM UTC-6, John Myles White wrote:
> Anyone have a sense why Diagonal{T} is now ambiguous with DataArray, but only 
> for subtraction? 
> 

Reply via email to