Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
alibylite
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
alibylite
Commits
a55d8dea
Commit
a55d8dea
authored
2 years ago
by
Alán Muñoz
Browse files
Options
Downloads
Patches
Plain Diff
fixdep(loaders): getfullargspec and rename math_ut
parent
63dd5c5b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
extraction/core/functions/loaders.py
+11
-5
11 additions, 5 deletions
extraction/core/functions/loaders.py
extraction/core/functions/math_utils.py
+0
-0
0 additions, 0 deletions
extraction/core/functions/math_utils.py
with
11 additions
and
5 deletions
extraction/core/functions/loaders.py
+
11
−
5
View file @
a55d8dea
from
inspect
import
getargspec
,
getmembers
,
isfunction
from
inspect
import
getmembers
,
isfunction
,
getfullargspec
import
numpy
as
np
from
extraction.core.functions
import
cell
,
trap
from
extraction.core.functions.custom
import
localisation
from
extraction.core.functions.distributors
import
trap_apply
from
extraction.core.functions.math
import
div0
from
extraction.core.functions.math
_utils
import
div0
def
load_cellfuns_core
():
...
...
@@ -30,9 +30,11 @@ def load_custom_args():
and
f
[
1
].
__module__
.
startswith
(
"
extraction.core.functions
"
)
}
args
=
{
k
:
getargspec
(
v
).
args
[
2
:]
k
:
get
full
argspec
(
v
).
args
[
2
:]
for
k
,
v
in
funs
.
items
()
if
set
([
"
cell_mask
"
,
"
trap_image
"
]).
intersection
(
getargspec
(
v
).
args
)
if
set
([
"
cell_mask
"
,
"
trap_image
"
]).
intersection
(
getfullargspec
(
v
).
args
)
}
return
(
...
...
@@ -55,7 +57,11 @@ def load_cellfuns():
if
isfunction
(
f
):
def
tmp
(
f
):
return
lambda
m
,
img
:
trap_apply
(
f
,
m
,
img
)
args
=
getfullargspec
(
f
).
args
if
len
(
args
)
==
1
:
return
lambda
m
,
_
:
trap_apply
(
f
,
m
)
else
:
return
lambda
m
,
img
:
trap_apply
(
f
,
m
,
img
)
CELLFUNS
[
k
]
=
tmp
(
f
)
return
CELLFUNS
...
...
This diff is collapsed.
Click to expand it.
extraction/core/functions/math.py
→
extraction/core/functions/math
_utils
.py
+
0
−
0
View file @
a55d8dea
File moved
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