Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
aliby-mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Swain Lab
aliby
aliby-mirror
Commits
b81bbed4
Commit
b81bbed4
authored
2 years ago
by
Alán Muñoz
Browse files
Options
Downloads
Patches
Plain Diff
refactor(signal): replace np -> bn
parent
e2c40907
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/agora/io/signal.py
+2
-1
2 additions, 1 deletion
src/agora/io/signal.py
with
2 additions
and
1 deletion
src/agora/io/signal.py
+
2
−
1
View file @
b81bbed4
...
...
@@ -2,6 +2,7 @@ import typing as t
from
copy
import
copy
from
pathlib
import
PosixPath
import
bottleneck
as
bn
import
h5py
import
numpy
as
np
import
pandas
as
pd
...
...
@@ -79,7 +80,7 @@ class Signal(BridgeH5):
@staticmethod
def
get_retained
(
df
,
cutoff
):
return
df
.
loc
[
df
.
notna
()
.
sum
(
axis
=
1
)
>
df
.
shape
[
1
]
*
cutoff
]
return
df
.
loc
[
bn
.
nansum
(
df
.
notna
()
,
axis
=
1
)
>
df
.
shape
[
1
]
*
cutoff
]
def
retained
(
self
,
signal
,
cutoff
=
0.8
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment