Skip to content

Conversation

@difurka
Copy link

@difurka difurka commented Apr 29, 2025

add globals() - this works for ubuntu

Comment on lines -2276 to 2277
for ii in range(1, self.width[0][0] + 1):
exec(f"x{ii} = sympy.Symbol('x_{ii}')")
exec(f"x{ii} = sympy.Symbol('x_{ii}')", globals())
exec(f"x.append(x{ii})")
Copy link

@joshua-cogliati-inl joshua-cogliati-inl May 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just out of curiosity, why is this code not just:

                x.append(sympy.Symbol(f"x_{ii}"))

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it works for Ubuntu too

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, then either this pull request or #545 can solve the problem.

@joshua-cogliati-inl
Copy link

Note that this would close #533 and #543

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants