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
Bliss
bliss
Commits
42397d34
Commit
42397d34
authored
Jun 09, 2021
by
Valentin Valls
Browse files
Patch numpy array as writtable
parent
510843e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
bliss/flint/flint_api.py
View file @
42397d34
...
...
@@ -304,6 +304,14 @@ class FlintApi:
manager
.
waitFlintReady
()
def
run_method
(
self
,
plot_id
,
method
,
args
,
kwargs
):
# Patch numpy arrays
for
i
,
v
in
enumerate
(
args
):
if
isinstance
(
v
,
numpy
.
ndarray
):
args
[
i
]
=
_aswritablearray
(
v
)
for
k
,
v
in
kwargs
.
items
():
if
isinstance
(
v
,
numpy
.
ndarray
):
kwargs
[
k
]
=
_aswritablearray
(
v
)
plot
=
self
.
_get_plot_widget
(
plot_id
)
silxPlot
=
plot
.
_silxPlot
()
method
=
getattr
(
silxPlot
,
method
)
...
...
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