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
XRD
darfix
Commits
b0f8dd1d
Commit
b0f8dd1d
authored
May 26, 2021
by
Julia Garriga Ferrer
Browse files
[core][dataset] Check if indices is tuple instead of slice to avoid bug
parent
c9dfb71e
Changes
1
Hide whitespace changes
Inline
Side-by-side
darfix/core/dataset.py
View file @
b0f8dd1d
...
...
@@ -26,7 +26,7 @@
__authors__
=
[
"J. Garriga"
]
__license__
=
"MIT"
__date__
=
"26/0
4
/2021"
__date__
=
"26/0
5
/2021"
import
copy
import
glob
...
...
@@ -1314,7 +1314,7 @@ class Data(numpy.ndarray):
if
len
(
data
.
shape
)
<
3
:
data
=
data
.
view
(
numpy
.
ndarray
)
else
:
if
isinstance
(
indices
[
0
],
slic
e
):
if
isinstance
(
indices
,
tupl
e
):
data
.
urls
=
self
.
urls
[
indices
[
0
]]
data
.
metadata
=
self
.
metadata
[
indices
[
0
]]
else
:
...
...
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