I'm not a github guru, so I just closed and opened a new pull request with
the code altered.

Thanks Carlos!


On Wed, Aug 7, 2013 at 5:38 PM, Carlos Agarie <notifications@github.com>wrote:

> In lib/nmatrix/shortcuts.rb:
>
> > +    # Examples:
> > +    #
> > +    #   NMatrix.diagonals([1,2,3,4]) # => 1.0 0.0 0.0 0.0
> > +    #                                     0.0 2.0 0.0 0.0
> > +    #                                     0.0 0.0 3.0 0.0
> > +    #                                     0.0 0.0 0.0 4.0
> > +    #
> > +    #   NMatrix.diagonals([1,2,3,4], :int32) # => 1 0 0 0
> > +    #                                             0 2 0 0
> > +    #                                             0 0 3 0
> > +    #                                             0 0 0 4
> > +    #
> > +    #
> > +
> > +    def diagonals(arr, dtype = :float64)
> > +      require 'pry'
>
> @ryanmt <https://github.com/ryanmt> you can simply send another commit to
> remove it and that's fine. I never encountered a situation in which this
> method would be really useful -- but I don't see a problem adding it. :)
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/SciRuby/nmatrix/pull/114/files#r5644740>
> .
>