Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
navipy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Olivier Bertrand
navipy
Commits
fc9bc7b2
Commit
fc9bc7b2
authored
7 years ago
by
Luise Odenthal
Browse files
Options
Downloads
Patches
Plain Diff
changes some little things in database init like typeerror to valueerror and so on
parent
2509175a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
navipy/database/__init__.py
+4
-2
4 additions, 2 deletions
navipy/database/__init__.py
with
4 additions
and
2 deletions
navipy/database/__init__.py
+
4
−
2
View file @
fc9bc7b2
...
...
@@ -376,7 +376,7 @@ database
if
rowid
is
np
.
nan
:
raise
ValueError
(
'
rowid must not be nan
'
)
if
(
posorient
is
None
)
and
(
rowid
is
None
):
Exception
(
'
posorient and rowid can not be both None
'
)
raise
Exception
(
'
posorient and rowid can not be both None
'
)
if
posorient
is
not
None
:
rowid
=
self
.
get_posid
(
posorient
)
# Read images
...
...
@@ -466,6 +466,8 @@ database
return
toreturn
def
denormalise_image
(
self
,
image
,
cmaxminrange
):
if
not
isinstance
(
image
,
np
.
ndarray
):
raise
TypeError
(
'
image must be np.array
'
)
if
len
(
image
.
shape
)
!=
3
:
raise
Exception
(
'
image should be 3D array
'
)
if
image
.
shape
[
2
]
!=
len
(
self
.
channels
):
...
...
@@ -473,7 +475,7 @@ database
number of channels {}
'
.
format
(
len
(
self
.
channels
)))
if
not
isinstance
(
cmaxminrange
,
pd
.
Series
):
raise
Exception
(
'
cmaxminrange should be a pandas Series
'
)
raise
TypeError
(
'
cmaxminrange should be a pandas Series
'
)
if
cmaxminrange
.
empty
:
raise
Exception
(
'
cmaxminrange must not be empty
'
)
for
chan_n
in
self
.
channels
:
...
...
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