> > If you are curious as to the application where this arises, I am using > > TAO to solve a machine learning problem. TAO expects the optimization > > parameters to be a vector, but when I evaluate the objective function I > > need to reshape them into a matrix. > > > > Do you mean a two dimensional array or do you mean a matrix -- that is the > representation of a linear operator that applies to a vector giving a new > vector?
I mean a two dimensional array. Basically my parameter vector is of the form vec = (vec1^t, vec2^t, vec3^t,...veck^t)^t which I represent as a Petsc Vector. In my objective function calculation I am given a matrix X and need to compute fx = (X.vec1, X.vec2, ..., X.veck)^t vishy
