Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
soap-plus-plus
Commits
d941ea9c
Commit
d941ea9c
authored
Sep 14, 2017
by
Carl Poelking
Browse files
Backward compatibility fix.
parent
ea6e13c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/soap/soapy/graph.py
View file @
d941ea9c
...
...
@@ -66,11 +66,12 @@ class Graph(object):
data
=
self
.
P
,
compression
=
'gzip'
,
dtype
=
dtype
)
group
.
create_dataset
(
'feature_mat_avg'
,
data
=
self
.
P_avg
,
compression
=
'gzip'
,
dtype
=
dtype
)
if
type
(
self
.
P_avg
)
!=
type
(
None
):
group
.
create_dataset
(
'feature_mat_avg'
,
data
=
self
.
P_avg
,
compression
=
'gzip'
,
dtype
=
dtype
)
else
:
raise
NotImplementedError
(
self
.
P_type_str
)
group
.
create_dataset
(
'position_mat'
,
data
=
self
.
R
)
group
.
create_dataset
(
'connectivity_mat'
,
data
=
self
.
C
)
...
...
@@ -107,7 +108,9 @@ class Graph(object):
self
.
P_avg
[
key
]
=
g0_avg
[
key
].
value
elif
self
.
P_type_str
==
"<type 'numpy.ndarray'>"
:
self
.
P
=
h5f
[
'feature_mat'
].
value
self
.
P_avg
=
h5f
[
'feature_mat_avg'
].
value
if
'feature_mat_avg'
in
h5f
:
self
.
P_avg
=
h5f
[
'feature_mat_avg'
].
value
else
:
self
.
P_avg
=
None
else
:
raise
NotImplementedError
(
self
.
P_type_str
)
self
.
R
=
h5f
[
'position_mat'
].
value
self
.
C
=
h5f
[
'connectivity_mat'
].
value
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment