Skip to content

Commit

Permalink
Fix TDISP parsing for floating numbers
Browse files Browse the repository at this point in the history
iFix #16006.
  • Loading branch information
saimn committed Feb 8, 2024
1 parent 0b0c62d commit b5ded3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion astropy/io/fits/column.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
# TDISPn for both ASCII and Binary tables
TDISP_RE_DICT = {}
TDISP_RE_DICT["F"] = re.compile(
r"(?:(?P<formatc>[F])(?:(?P<width>[0-9]+)\.{1}(?P<precision>[0-9])+)+)|"
r"(?:(?P<formatc>[F])(?:(?P<width>[0-9]+)\.{1}(?P<precision>[0-9]+))+)|"
)
TDISP_RE_DICT["A"] = TDISP_RE_DICT["L"] = re.compile(
r"(?:(?P<formatc>[AL])(?P<width>[0-9]+)+)|"
Expand Down
1 change: 1 addition & 0 deletions astropy/io/fits/tests/test_connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,7 @@ def test_scale_error():
[
("EN10.5", ("EN", "10", "5", None)),
("F6.2", ("F", "6", "2", None)),
("F12.10", ("F", "12", "10", None)),
("B5.10", ("B", "5", "10", None)),
("E10.5E3", ("E", "10", "5", "3")),
("A21", ("A", "21", None, None)),
Expand Down

0 comments on commit b5ded3c

Please sign in to comment.