-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix flatten_timepoint_specific_output_overrides
... again. Fixes an error when trying to apply re.sub to numeric values: ``` petab.flatten_timepoint_specific_output_overrides(problem) build/venv/lib/python3.9/site-packages/petab/core.py:290: in flatten_timepoint_specific_output_overrides observable[target] = re.sub( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pattern = 'observableParameter([0-9]+)_obs_a' repl = 'observableParameter\\1_obs_a__10__c0', string = 1, count = 0, flags = 0 def sub(pattern, repl, string, count=0, flags=0): """Return the string obtained by replacing the leftmost non-overlapping occurrences of the pattern in string by the replacement repl. repl can be either a string or a callable; if a string, backslash escapes in it are processed. If it is a callable, it's passed the Match object and must return a replacement string to be used.""" > return _compile(pattern, flags).sub(repl, string, count) E TypeError: cannot use a string pattern on a bytes-like object /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/re.py:210: TypeError ```
- Loading branch information
Showing
2 changed files
with
41 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters