Make Diag Matrix serialize.