Fri, 11 Jun 2010 10:29:28 +0200, Hans Meine wrote: [clip] > Ideally, algorithms would get wrapped in between two additional > pre-/postprocessing steps: > > 1) Preprocessing: After broadcasting, transpose the input arrays such > that they become C order. More specifically, sort the strides of one > (e.g. the first/the largest) input array decreasingly, and apply the > same transposition to the other arrays (in + out if given). > > 2) Perform the actual algorithm, producing a C-order output array. > > 3) Apply the reverse transposition to the output array. [clip]
The post/preprocessing steps are fairly easy to implement in the ufunc machinery. The problem here was that this would result to a subtle semantic change, as output arrays from ufuncs would no longer necessarily be in C order. We need to explicitly to *decide* to make this change, before proceeding. I'd say that we should simply do this, as nobody should depend on this assumption. I think I there was some code ready to implement this shuffling. I'll try to dig it out and implement the shuffling. -- Pauli Virtanen _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion