Mutually exclusive to the previously added 'order=' argument, this should serve the same crowd, i.e. people who occasionally need a dense copy of their sparse matrix but *really* can't afford to be allocating an array that size over and over again. Refactored a bit into the base class so as to not duplicate code between lil.py and coo.py. Tests included.
This adds an 'order' keyword to select the memory layout of the resulting array when using toarray() to create a dense array from a sparse matrix type. The default remains a C-contiguous array. Tests are also updated to test both the default and explicit 'C' and 'F' modes. Generated output of SWIG will follow in a separate commit, so that this one can be easily cherry-picked if what I generated is unsatisfactory.