Commit 966441e3 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

RF: Convert missing InternalType entry to nan. Make (deprecated)

convertICD10Codes function work on non-ICD10 variables
parent 70d38e48
......@@ -270,7 +270,7 @@ def convertICD10Codes(dtable, vid):
Converts values which are assumed to contain ICD10 codes into numeric
values.
"""
codeToNumeric(dtable, vid)
codeToNumeric(dtable, vid, 'icd10')
@custom.cleaner()
......
......@@ -93,7 +93,10 @@ def convert_dtype(val):
into a ``dtype`` object.
"""
dtype = getattr(np, val)
if val == '':
return np.nan
dtype = getattr(np, val, None)
if dtype not in np.ScalarType:
raise ValueError('Invalid numpy dtype: {}'.format(dtype))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment