-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(binaryread): raise/handle EOFError, deprecate vartype=str (#2226)
This fixes issues while reading some binaryfiles with auto precision detection, and also modernizes a few aspects of flopy.utils.binaryfile left-over from python2. There are two changes to flopy.utils.binaryfile.binaryread(): * Raises EOFError if attempting to read data beyond the end-of-file * Deprecate vartype=str, since bytes is the the return type with Python3 Other refactors: * Simplify conventional ASCII range checks by converting bytes to a list of int, then check if bytes are within range * Remove checks if bytes are not str, and use .encode("ascii") where appropriate
- Loading branch information
Showing
3 changed files
with
108 additions
and
102 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
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