Re: [petsc-dev] Matlab writes dense matrices as vectors
On Thu, Apr 19, 2012 at 07:52, Barry Smith <[email protected]> wrote:
On Apr 19, 2012, at 9:06 AM, Jed Brown wrote:
It writes the whole thing as one vector, should we require the caller to reshape to clearly identify it as a vector? Then anything with multiple columns could be written as a matrix (e.g. by internally calling sparse()).
I cannot remember why I defaulted to this behavior. (Probably for people using DMDA and automatically reshaping a read in vector into its DMDA defined shape and then later wanting to save that as a vector). I guess it might be more intuitive to change it as you suggest.
It was a size mismatch in that case anyway, so I chose this rather than an implicit reshape. Dense row and column vectors are both written as vectors. http://petsc.cs.iit.edu/petsc/petsc-dev/rev/03d36104f143
participants (1)
-
Jed Brown