File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 55import io
66import json
77import math
8+ import os
89import re
910import warnings
10- from pathlib import Path
1111from typing import (
1212 Any ,
1313 Dict ,
2828
2929
3030def parse_stan_csv_comments_and_draws (
31- stan_csv : Union [str , Path , Iterator [bytes ]],
31+ stan_csv : Union [str , os . PathLike , Iterator [bytes ]],
3232) -> Tuple [List [bytes ], List [bytes ]]:
3333 """Parses lines of a Stan CSV file into comment lines and draws lines, where
3434 a draws line is just a non-commented line.
@@ -47,7 +47,7 @@ def split_comments_and_draws(
4747 draws_lines .append (line )
4848 return comment_lines , draws_lines
4949
50- if isinstance (stan_csv , (str , Path )):
50+ if isinstance (stan_csv , (str , os . PathLike )):
5151 with open (stan_csv , "rb" ) as f :
5252 return split_comments_and_draws (f )
5353 else :
You can’t perform that action at this time.
0 commit comments