sync with numpy's builtin: diagflat