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
Thomas Kluyver
Pycrystfel
Commits
0d270641
Commit
0d270641
authored
Jan 11, 2021
by
Thomas Kluyver
Browse files
Fix example
parent
e8014739
Changes
2
Hide whitespace changes
Inline
Side-by-side
examples/inspect_geom_class.py
View file @
0d270641
...
...
@@ -4,5 +4,5 @@ from pycrystfel.bindings import Detector
det
=
Detector
.
from_filename
(
sys
.
argv
[
1
])
print
(
f
"
{
det
.
n_panels
}
panels:"
)
for
name
in
det
.
panel_names
:
for
name
in
det
.
panel_names
()
:
print
(
f
"-
{
name
}
"
)
pycrystfel/bindings.pyx
View file @
0d270641
...
...
@@ -105,4 +105,4 @@ cdef class Detector:
return
self
.
_ptr
.
n_panels
if
self
.
_ptr
is
not
NULL
else
0
def
panel_names
(
self
):
return
[
self
.
_ptr
.
panels
[
i
].
name
for
i
in
range
(
self
.
n_panels
)]
return
[
self
.
_ptr
.
panels
[
i
].
name
.
decode
(
'utf-8'
)
for
i
in
range
(
self
.
n_panels
)]
Write
Preview
Markdown
is supported
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