Re: [Python-ideas] Python list of list matrixes without NumPy

2019-04-06 Thread Juancarlo Añez
On Sat, Apr 6, 2019 at 4:11 AM Steve Barnes wrote: > > ipython > > Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit > (AMD64)] > > Type 'copyright', 'credits' or 'license' for more information > > IPython 7.2.0 -- An enhanced Interactive Python. Type '?' for help. > > >

Re: [Python-ideas] Python list of list matrixes without NumPy

2019-04-06 Thread Christopher Barker
By the way, your reply isn't go to the list --bringing it back on. On Sat, Apr 6, 2019 at 5:03 AM Juancarlo Añez wrote: > Or maybe there is one in PyPi — have you looked? >> > > There's a bunch of "matrix" packages in PyPi, none of them dealing with > the simple use cases I'm talking about. > B

[Python-ideas] Python list of list matrixes without NumPy

2019-04-05 Thread Juancarlo Añez
The semantics of list operators are congruent, but unintuitive sometimes. For example, I've fallen over this many times: >>> truth_matrix = [[False] * n ] * m It doesn't create what you'd want. The only safe way I know to creat an NxM matrix is: >>> truth_matrix = [ [False for _ in range(n) fo