1 | initial version |
Set
is known to be buggy for mutable (non-hashable) objects. If you plan to form a set of matrices, you need to declare those matrices as immutable. A simple workaround would be using Set(map(lambda m: Matrix(m,immutable=True),L[0][1:]))
instead of Set(L[0][1:])
. Alternatively, you can declare all matrices immutable, or call .set_immutable()
method on the elements of L
upfront.
2 | No.2 Revision |
Set
is known to be buggy buggy for mutable (non-hashable) objects. If you plan to form a set of matrices, you need to declare those matrices as immutable. A simple workaround would be using Set(map(lambda m: Matrix(m,immutable=True),L[0][1:]))
instead of Set(L[0][1:])
. Alternatively, you can upfront declare all matrices immutable, or call .set_immutable()
method on the elements of L
upfront..