Any way to program custom syntax to python prompt? >> I want to edit matrices.
sturlamolden
sturlamolden at yahoo.no
Mon Dec 10 19:59:19 EST 2007
On 11 Des, 01:54, mosi <skawan... at gmail.com> wrote:
> Python matrices are usually defined with numpy scipy array or similar.
> e.g.>>> matrix1 = [[1, 2], [3, 4], [5, 6]]
That is a list of Python lists, not a NumPy array or matrix.
> For example:>>> matrix + 2
>
> [ 3, 4;
> 5, 6;
> 7, 8;]
>
> Possibly with operator overloading?
Go and get NumPy: www.scipy.org
Then buy Travis Oliphant's book.
More information about the Python-list
mailing list