Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved error message for bc_ops argument #542

Merged
merged 3 commits into from
Mar 2, 2024
Merged

Conversation

david-zwicker
Copy link
Member

No description provided.

pde/pdes/pde.py Outdated
bcs = dict(bc_ops)
if "*:*" in bcs and bc != "auto_periodic_neumann":
self._logger.warning("Found default BCs in `bcs` and `bc_ops`")
bcs["*:*"] = bc # append default boundary conditions
else:
raise TypeError('`bc_ops` must be a dictionary')

Choose a reason for hiding this comment

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

You can improve it by adding "but got {type(bc_ope)}"

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea! Thanks

@david-zwicker david-zwicker merged commit 3292f88 into master Mar 2, 2024
15 of 16 checks passed
@david-zwicker david-zwicker deleted the pde_bcsops_arg branch March 2, 2024 08:09
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