Some of Python's linalg commands in HP Prime
|
09-11-2021, 10:36 AM
Post: #9
|
|||
|
|||
RE: Some of Python's linalg commands in HP Prime
(09-11-2021 09:13 AM)robmio Wrote: Since I had to use the "transpose" command in my Python program, I had to write a subroutine to transpose the arrays ... Is matrix simply list of list ? If yes, we can transpose with a 1-liner. >>> transpose = lambda a: [list(r) for r in zip(*a)] >>> transpose([[1,2,3], [4,5,6]]) [[1, 4], [2, 5], [3, 6]] |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)