Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
XRD
darfix
Commits
f20cfa57
Commit
f20cfa57
authored
Aug 24, 2021
by
Julia Garriga Ferrer
Browse files
[core][dataset][data] Convert new_shape to tuple
parent
09c0819b
Changes
1
Hide whitespace changes
Inline
Side-by-side
darfix/core/dataset.py
View file @
f20cfa57
...
...
@@ -1482,7 +1482,7 @@ class Data(numpy.ndarray):
self
.
_lock
.
release
()
_file
=
h5py
.
File
(
save
,
'a'
)
dataset_name
=
"dataset"
new_shape
=
self
.
shape
if
new_shape
is
None
else
new_shape
new_shape
=
self
.
shape
if
new_shape
is
None
else
tuple
(
new_shape
)
if
"dataset"
in
_file
:
if
new_shape
!=
_file
[
"dataset"
].
shape
:
...
...
@@ -1547,7 +1547,7 @@ class Data(numpy.ndarray):
_file
=
h5py
.
File
(
path
,
'a'
)
new_shape
=
self
.
shape
if
new_shape
is
None
else
new_shape
new_shape
=
self
.
shape
if
new_shape
is
None
else
tuple
(
new_shape
)
if
"dataset"
not
in
_file
:
_file
.
create_dataset
(
"dataset"
,
self
.
shape
,
dtype
=
self
.
dtype
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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