[MATRIX-SIG] Newbie Q.

Andrew P. Mullhaupt amullhau@ix.netcom.com
Mon, 30 Jun 1997 20:46:02 -0400


At 07:17 PM 6/30/97 -0400, Hoon Yoon - IPT Quant wrote:
>Hello,

> I am new to NumPy and there has to be a easy way to do this than I can
think of.
>>>> a
>array([1, 2, 3])
>>>> b
>array([2, 4, 6])
>>>> c
>array([[1, 2, 3],
>       [2, 4, 6]])
>>>> concatenate((c,a))

This works for me:

concatenate([c, reshape(a, [-1, len(a)])])

The point is that the a that you have has only one dimension. Some
languages will handle this for you, but NumPy doesn't.

>In addition, in Gauss
>Horizontal would be e = a~b
>Transposing c would have been 
>t = c'
>dot product would be
>d = a .* b'
>This to me faster than writing transpose(c) or concatenate((a,b)1), etc...
>Is there shorter method in Python? I guess I could write a emacs key. Does
>anyone have one already?

A lot of different scientific interpreters are around. In Matlab, S, APL,
Maple, etc. all these functions have different spellings, and they all
look like nonsense to people coming from the other languages - quick -
what would %o% mean?

Later,
Andrew Mullhaupt

_______________
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
_______________