convexengineering / gpkit

Geometric programming for engineers
http://gpkit.readthedocs.org
MIT License
206 stars 40 forks source link

Monomials hashable in py2 but not py3. #1424

Closed 1ozturkbe closed 5 years ago

1ozturkbe commented 5 years ago

This causes issues in tests for robust in py3, but may be problematic for other instances as well. See below for error code. (map_mons is a generic dict, monomials[map_key] is a Monomial.)

======================================================================
ERROR: test_robust_testing_t_two_term_approximation_py_mosek_cli (gpkit.tests.from_paths.TestFiles)
----------------------------------------------------------------------
Traceback (most recent call last):
  ... line 169, in test_bad_relations
    map_mons[monomials[map_key]] = internal_map[map_key]
TypeError: unhashable type: 'Monomial'