Python matrices are usually defined with numpy scipy array or similar.
e.g.
I would like to have easier way of defining matrices,
for example:
[ 1, 2;
3, 4;
5, 6;]
Any ideas how could this be done? The ";" sign is reserved, the "[ ]"
is used for lists.
Also, how to program custom operations for this new "class?"
matrix ???
For example:
[ 3, 4;
5, 6;
7, 8;]
Possibly with operator overloading?
I appreciate all your comments, directions, pointers.
mosi
e.g.
>>matrix1 = [[1, 2], [3, 4], [5, 6]]
for example:
>>matrix = [1, 2; 3, 4; 5, 6]
>>matrix =
3, 4;
5, 6;]
Any ideas how could this be done? The ";" sign is reserved, the "[ ]"
is used for lists.
Also, how to program custom operations for this new "class?"
matrix ???
For example:
>>matrix + 2
5, 6;
7, 8;]
Possibly with operator overloading?
I appreciate all your comments, directions, pointers.
mosi
Comment