What is the confusion? Use eye(n) if you want a dense identity matrix. Use 
I if you want something that acts like an identity element. Use 
Diagonal(ones(n)) if you want a diagonal identity matrix. I see no reason 
at all why eye should be changed.

On Monday, August 29, 2016 at 4:32:34 PM UTC+2, Chris Rackauckas wrote:
>
> But you don't want a sparse matrix. It would not be an efficient way to 
> actually use it since sparse matrices have a bit of overhead due to their 
> table structure. Even better would be a Diagonal since it's just an array 
> with dispatches to act like a diagonal matrix. But best would be to use the 
> UniformScaling operator `I` which acts like eye in cases like A-λI but 
> isn't actually saving a matrix and doesn't actually require iterating over 
> two arrays at once. I think that amount of confusion in this thread is a 
> good indicator that eye should be changed.
>
> On Monday, August 29, 2016 at 7:25:49 AM UTC-7, Kristoffer Carlsson wrote:
>>
>> You mean a sparse matrix?
>
>

Reply via email to