SciRuby/nmatrix — pull request #268 by andrewcsmith (2014-08-10 17:58:30+00:00)
Title: Fixes issue #237.

Array#to_nm previous required the NMatrix shape to be given. However, NMatrix#to_a would return a sequence of nested Arrays. This patch allows an NMatrix to be converted into an Array, then back to an NMatrix.

A couple things are up for discussion in my mind:
* This adds yet another monkey-patch to Array. The alternative is *really* gnarly code in Array#to_nm.
* I added a new spec file.
* The guess_dtype Proc could be moved to a collection of helper methods in an external library, like `NMatrix::MonkeyHelpers`, but I wanted to keep this fix as self-contained as possible.