From: Travis O. <oli...@ie...> - 2006-09-14 03:56:02
|
Sebastian Haase wrote: > Travis, > what is the "new string directives as the first element of the item > tuple" !? > These have been there for a while, but I recently added a couple of capabilities. > I always liked the idea of having a "shortest possible" way for creating > (or concatenating) > rows with "r_" > *and* > columns with "c_" > ! > > Why did the "c_" have to be removed !? > It wasn't removed, I thought to deprecate it. Owing to your response and the fact that others seem to use c_ quite a bit, I've kept it as a short hand for r_['1,2,0', ...] This means that arrays will be concatenated along the 1st axis after being up-graded to (at-least) 2-dimensional arrays with 1's placed at the end of the new shape. Thus, c_[[1,2,3],[4,5,6] produces array([[1, 4], [2, 5], [3, 6]]) This is a bit different if you were using c_ when you should have been using r_. -Travis |