This suggestion came up some time ago but I can't put my hands on exactly where the discussion originated. Methods for scale! for an Array and a scalar are defined in linalg/generic.jl and linalg/dense.jl. The effect of the diagmm method for a matrix and a vector can be regarded as scaling the rows or columns of the matrix (rows if the first argument is the vector, columns if the first arg is the matrix). The suggestion is to rename diagmm! as scale! and diagmm as scale.
Part of my motivation for this suggestion is from the CHOLMOD module. The C function cholmod_scale has the capability of
and it makes sense to me to use multiple dispatch in Julia for a similar purpose.
This is a great idea - I never really liked the name diagmm. Should we call this scalem, along the lines of expm and such? scale can still refer to element-wise scaling in matrices, and scalem to matrix scaling.
There's no need for a new name since you know what to do from the type of the argument – scalar or vector.
Agree. We should just use scale. @dmbates Would you be able to make this change and create a pull request?
@ViralBShah I will make the change and create a pull request. Just to be clear, what I intend to do is to
I have a question about deprecating. When doing so do you remove the old method definitions? It appears so from the definition of the deprecate macro but I wanted to confirm this.
That's right - for deprecation, remove the old methods altogether.
Closed by #2918