[SciPy-Dev] scipy.sparse spdiags/dia_matrix additional calling mode

Denis Laxalde denis.laxalde@mcgill...
Thu Oct 6 09:41:19 CDT 2011

On Thu, 06 Oct 2011 15:26:14 +0200,
Pauli Virtanen wrote:
> Adding a new function for new semantics, rather than using a keyword
> argument, feels to me like a clearer design choice here.
> I think adding a new function called `diags` could be justified here.
> Numpy already has a function called `diag`, and with the new semantics
> one would have
>     diags([a, b, c], [i, j, k]) == diag(a, i) + diag(b, j) + diag(c, k)
> which hangs together nicely.

However this trailing 's' is not so consistent with other sparse matrix
constructors (e.g. eye, kron, identity) which follow NumPy names.

Denis Laxalde

More information about the SciPy-Dev mailing list