Skip to content

Commit 5efdb53

Browse files
mjrenomjreno
authored andcommitted
write floats in scientific notation
1 parent 6311b73 commit 5efdb53

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

flopy4/mf6/codec/reader/grammar/basic.lark

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ block_name: CNAME [INT]
44
_list: line*
55
line: [WS] item+ _NL+
66
item: word | NUMBER
7-
word: /[a-zA-Z0-9._'~,-\\(\\)]+/
7+
word: /[a-zA-Z0-9._+'~,-\\(\\)]+/
88

99
%import common.NEWLINE -> _NL
1010
%import common.WS

flopy4/mf6/codec/writer/filters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def array2string(value: NDArray) -> str:
115115
format = (
116116
"%d"
117117
if np.issubdtype(value.dtype, np.integer)
118-
else "%.9f"
118+
else "%.9e"
119119
if np.issubdtype(value.dtype, np.floating)
120120
else "%s"
121121
)

0 commit comments

Comments
 (0)