Actually it would be nice to have a function `eye(A)` which returns a matrix of the correct type, size and sparsity (or not) as `A`. Having to switch here on `issparse` seems ugly when all other operators and functions are generic w.r.t. sparsity.