Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
ukbparse
Commits
878c4d8e
Commit
878c4d8e
authored
May 06, 2019
by
Paul McCarthy
🚵
Browse files
RF: isSparse accepts but complains about absolute
parent
71fdd397
Changes
1
Hide whitespace changes
Inline
Side-by-side
ukbparse/processing_functions_core.py
View file @
878c4d8e
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment