Add eye(A) that returns an identity matrix of the correct type,
size and sparsity (or not) as A, as discussed in #4164