[SciPy-user] the meaning of c_ and r_
Alan G Isaac
aisaac at american.edu
Fri Oct 22 16:33:34 CDT 2004
On Fri, 22 Oct 2004, Travis Oliphant apparently wrote:
> The idea of r_ was to allow fast creation of arrays similar to what is
> available with MATLAB. I wanted a short, quick way to concatenate and
> generate arrays. For 1-d arrays, r_ and c_ are supposed to be exactly
> the same. It's only when you give them two dimensional arrays that they
> differ. Admittedly, I really like the one-dimensional array creation
> ability of r_ and I use it quite often. The two-dimensional array
> creation is not as good. bmat is intended to improve that some. I am
> open to any ideas about how to improve this. Perhaps, we just kill c_
> and suggest something else (like an improved bmat) for building 2-d
> arrays quickly.
I find both r_ and c_ nice to have around.
I would request a single change:
that for 1-d arrays,
one of them return transpose([x]) instead of x.
(In my view, r_ should do this, but whatever.)
More information about the SciPy-user