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

Check for Euler's number #1028

Merged
merged 1 commit into from
Nov 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Check for Euler's number
Updated is_literal in openscenario_parser.py so that it check for Euler's number.

OpenScenario files exported from RoadRunner contains values with Euler's number.
haabe authored Oct 17, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit bcb8a3783505038091d32350dcf5b87a3d83a390
2 changes: 1 addition & 1 deletion srunner/tools/openscenario_parser.py
Original file line number Diff line number Diff line change
@@ -105,7 +105,7 @@ def is_literal(self) -> bool:
"""
Returns: True when text is a literal/number
"""
return self._is_matching(pattern=r"(-)?\d+(\.\d*)?")
return self._is_matching(pattern=r"(-)?\d+(\.\d*)?(e[+-]\d*)?")

def is_parameter(self) -> bool:
"""