Skip to content

Commit

Permalink
Fix #227 - change null_policy default='strict'
Browse files Browse the repository at this point in the history
  • Loading branch information
kinverarity1 committed Mar 18, 2018
1 parent 25abedf commit 0c93028
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 3 additions & 2 deletions lasio/las.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def __init__(self, file_ref=None, **read_kwargs):
self.read(file_ref, **read_kwargs)

def read(self, file_ref,
ignore_data=False, read_policy='default', null_policy='common',
ignore_data=False, read_policy='default', null_policy='strict',
ignore_header_errors=False, mnemonic_case='upper',
**kwargs):
'''Read a LAS file.
Expand All @@ -88,7 +88,8 @@ def read(self, file_ref,
object, or a string containing the contents of a file.
Keyword Arguments:
null_subs (bool): if True, replace invalid values with np.nan
null_policy (str or list): see
http://lasio.readthedocs.io/en/latest/data-section.html#handling-invalid-data-indicators-automatically
ignore_data (bool): if True, do not read in any of the actual data,
just the header metadata. False by default.
ignore_header_errors (bool): ignore LASHeaderErrors (False by
Expand Down
4 changes: 0 additions & 4 deletions tests/test_null_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,3 @@ def test_null_policy_runon_ok_1():
def test_null_policy_runon_ok_2():
las = read(egfn("null_policy_runon.las"), read_policy='default')
assert las['C05'][2] == -19508.961

def test_null_policy_ind():
las = read(egfn('null_policy_ind.las'))
assert las.curves.keys() == ['DEPT', 'GR', 'CN', 'CD']

0 comments on commit 0c93028

Please sign in to comment.