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
Ying-Qiu Zheng
fsleyes
Commits
6c10a210
Commit
6c10a210
authored
Feb 19, 2021
by
Paul McCarthy
🚵
Browse files
MNT: Avoid deprecation warnings
parent
ffa8fba3
Changes
4
Hide whitespace changes
Inline
Side-by-side
fsleyes/about.py
View file @
6c10a210
...
...
@@ -73,7 +73,10 @@ class AboutDialog(wx.Dialog):
mod
=
getattr
(
mod
,
n
)
if
lib
==
'PIL'
:
swVer
=
str
(
mod
.
PILLOW_VERSION
)
try
:
swVer
=
str
(
mod
.
__version__
)
except
Exception
:
swVer
=
str
(
mod
.
PILLOW_VERSION
)
else
:
swVer
=
str
(
mod
.
__version__
)
except
Exception
:
...
...
fsleyes/actions/importdataseries.py
View file @
6c10a210
...
...
@@ -58,7 +58,7 @@ class ImportDataSeriesAction(base.Action):
# Assuming that the data series
# to plot are stored as columns
data
=
np
.
loadtxt
(
filePath
,
dtype
=
np
.
float
).
T
data
=
np
.
loadtxt
(
filePath
,
dtype
=
float
).
T
# Make sure the data is 2D, to
# make code below easier and
...
...
@@ -116,8 +116,7 @@ class ImportDataSeriesAction(base.Action):
xdata
=
data
[
0
,
:]
ydata
=
data
[
1
:,
:]
else
:
xdata
=
np
.
arange
(
0
,
data
.
shape
[
1
]
*
xscale
,
xscale
,
dtype
=
np
.
float
)
xdata
=
np
.
arange
(
0
,
data
.
shape
[
1
]
*
xscale
,
xscale
,
dtype
=
float
)
ydata
=
data
for
i
,
ydata
in
enumerate
(
ydata
):
...
...
fsleyes/colourmaps.py
View file @
6c10a210
...
...
@@ -943,7 +943,7 @@ def loadLookupTableFile(fname):
f
,
usecols
=
(
0
,
1
,
2
,
3
),
dtype
=
{
'formats'
:
(
np
.
int
,
np
.
float
,
np
.
float
,
np
.
float
),
'formats'
:
(
int
,
float
,
float
,
float
),
'names'
:
(
'label'
,
'r'
,
'g'
,
'b'
)})
# Save the label ordering -
...
...
fsleyes/views/plotpanel.py
View file @
6c10a210
...
...
@@ -877,8 +877,8 @@ class PlotPanel(viewpanel.ViewPanel):
ds
.
overlay
.
name
,
len
(
xdata
),
len
(
ydata
)))
return
(
0
,
0
),
(
0
,
0
)
xdata
=
np
.
asarray
(
xdata
,
dtype
=
np
.
float
)
ydata
=
np
.
asarray
(
ydata
,
dtype
=
np
.
float
)
xdata
=
np
.
asarray
(
xdata
,
dtype
=
float
)
ydata
=
np
.
asarray
(
ydata
,
dtype
=
float
)
log
.
debug
(
'Drawing {} for {}'
.
format
(
type
(
ds
).
__name__
,
ds
.
overlay
))
...
...
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