Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.io.base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
bob
bob.io.base
Commits
6601f669
Commit
6601f669
authored
2 years ago
by
Tiago de Freitas Pereira
Browse files
Options
Downloads
Plain Diff
Merge branch 'deprecation' into 'master'
Deprecation See merge request
!38
parents
e8c1fcfd
300308bb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!38
Deprecation
Pipeline
#60598
passed
2 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/io/base/__init__.py
+8
-3
8 additions, 3 deletions
bob/io/base/__init__.py
with
8 additions
and
3 deletions
bob/io/base/__init__.py
+
8
−
3
View file @
6601f669
...
...
@@ -88,12 +88,17 @@ def open_file(filename):
if
extension
in
hdf5_extensions
:
with
h5py
.
File
(
filename
,
"
r
"
)
as
f
:
if
"
array
"
not
in
f
.
keys
():
keys
=
list
(
f
.
keys
())
if
len
(
keys
)
==
1
:
key
=
keys
[
0
]
else
:
key
=
"
array
"
if
key
not
in
keys
:
raise
RuntimeError
(
"
The file
'
%s
'
does not contain the key
'
array
'"
%
filename
f
"
The file
{
filename
}
does not contain the key
{
key
}
"
)
return
np
.
array
(
f
[
"
array
"
])
return
np
.
array
(
f
[
key
])
elif
extension
in
image_extensions
:
img
=
imageio
.
imread
(
filename
)
...
...
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