Skip to content

Commit

Permalink
fix #3931
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
  • Loading branch information
NikolajBjorner committed Apr 12, 2020
1 parent c85113a commit 51eaf84
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/api/python/z3/z3.py
Original file line number Diff line number Diff line change
Expand Up @@ -3060,7 +3060,8 @@ def IntVector(prefix, sz, ctx=None):
>>> Sum(X)
x__0 + x__1 + x__2
"""
return [ Int('%s__%s' % (prefix, i)) for i in range(sz) ]
ctx = _get_ctx(ctx)
return [ Int('%s__%s' % (prefix, i), ctx) for i in range(sz) ]

def FreshInt(prefix='x', ctx=None):
"""Return a fresh integer constant in the given context using the given prefix.
Expand Down Expand Up @@ -3112,7 +3113,8 @@ def RealVector(prefix, sz, ctx=None):
>>> Sum(X).sort()
Real
"""
return [ Real('%s__%s' % (prefix, i)) for i in range(sz) ]
ctx = _get_ctx(ctx)
return [ Real('%s__%s' % (prefix, i), ctx) for i in range(sz) ]

def FreshReal(prefix='b', ctx=None):
"""Return a fresh real constant in the given context using the given prefix.
Expand Down

0 comments on commit 51eaf84

Please sign in to comment.