Commit 878c4d8e authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

RF: isSparse accepts but complains about absolute

parent 71fdd397
......@@ -18,9 +18,9 @@
import logging
import itertools as it
import warnings
import collections
import itertools as it
import numpy as np
import pandas as pd
......@@ -38,7 +38,8 @@ def isSparse(data,
mincat=None,
maxcat=None,
abspres=True,
abscat=True):
abscat=True,
absolute=None):
"""Returns ``True`` if the given data looks sparse, ``False`` otherwise.
Used by :func:`removeIfSparse`.
......@@ -98,6 +99,12 @@ def isSparse(data,
is not sparse.
"""
if absolute is not None:
warnings.warn('The absolute argument to isSparse is deprecated '
'and will be removed in ukbparse 1.0.0. Use abspres/'
'abscat instead.', DeprecationWarning, stacklevel=1)
abspres = absolute
presmask = data.notnull()
present = data[presmask]
ntotal = len(data)
......
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