Skip to content

Commit

Permalink
checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
bqpd committed Apr 17, 2021
1 parent ec2871b commit 7309c34
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions gpkit/repr_conventions.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

def lineagestr(lineage, modelnums=True):
"Returns properly formatted lineage string"
return ""
if not isinstance(lineage, tuple):
lineage = getattr(lineage, "lineage", None)
return ".".join(["%s%i" % (name, num) if (num and modelnums) else name
Expand Down
2 changes: 1 addition & 1 deletion gpkit/small_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class FixedScalarMeta(type):
"Metaclass to implement instance checking for fixed scalars"
def __instancecheck__(cls, obj):
return hasattr(obj, "hmap") and len(obj.hmap) == 1 and not obj.vks
return getattr(obj, "hmap", None) and len(obj.hmap) == 1 and not obj.vks


class FixedScalar(metaclass=FixedScalarMeta): # pylint: disable=no-init
Expand Down
2 changes: 1 addition & 1 deletion gpkit/solution_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ def subinto(self, posy):
return NomialArray([self.atindex(i).subinto(posy)
for i in range(len(self))])

return posy.sub(self["variables"])
return posy.sub(self["variables"], require_positive=False)

def _parse_showvars(self, showvars):
showvars_out = set()
Expand Down

0 comments on commit 7309c34

Please sign in to comment.