# [SciPy-user] the meaning of c_ and r_

Gerald Richter richter at hephy.oeaw.ac.at
Thu Oct 21 18:53:47 CDT 2004

```Hi everybody.

Sorry for such a basic question, or maybe two:

shouldn't c_[...] result in something like
array([ [ . ],
[ . ] ])
while r_ results in
array([ ... ])
?

why does:

In [23]: a = r_[1:3:5j]

In [24]: b = c_[2:6:5j]

In [25]: b
Out[25]: array([ 2.,  3.,  4.,  5.,  6.])

In [26]: a
Out[26]: array([ 1. ,  1.5,  2. ,  2.5,  3. ])

In [27]: transpose a
-------> transpose(a)
Out[27]: array([ 1. ,  1.5,  2. ,  2.5,  3. ])

In [28]: transpose b
-------> transpose(b)
Out[28]: array([ 2.,  3.,  4.,  5.,  6.])

not allow transposition in the above mentioned way?

And: if I got some functions that might be useful to others, and want to
contribute them, where do I turn to?

I got some interp2() function, modeled after (translated from) the octave
algorithm, and a polyfit() more or less woven from same wool...
Also I had to implement a Log-likelyhood fitting algorithm, and with some
work it could be generalized to be included in scipy, and there's a
2d-integral() on a grid of given surface.

I'm working in high-energy physics, and found out, what a beatiful tool for
algorithm prototyping scipy can be... AND I think (and one of my colleagues
knows already ;) it will work even better in data-analysis, together with
the bindings to ROOT (PyROOT)
- http://root.cern.ch
where Python can provide a really reasonable shell and scripting
environment, instead of ROOT's C++ interpreter(!!!), and scipy can do the
necessary data manipulations.

Cheers,
Gerald.

--

Gerald Richter
<richter at hephy.oeaw.ac.at>
phone: +43 1 5447328/27

Institute of high energy physics  (HEPHY)
http://wwwhephy.oeaw.ac.at/
Vienna/Austria

```