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
Daniel Scheffler
arosics
Commits
0e272c93
Commit
0e272c93
authored
Mar 11, 2021
by
Daniel Scheffler
Browse files
Replaced deprecated np.object type.
Signed-off-by:
Daniel Scheffler
<
danschef@gfz-potsdam.de
>
parent
aa691427
Pipeline
#20510
passed with stages
in 16 minutes and 17 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
arosics/Tie_Point_Grid.py
View file @
0e272c93
...
...
@@ -403,7 +403,7 @@ class Tie_Point_Grid(object):
'SSIM_IMPROVED'
,
'RELIABILITY'
,
'LAST_ERR'
])
# merge DataFrames (dtype must be equal to records.dtypes; We need np.object due to None values)
GDF
=
GDF
.
astype
(
np
.
object
).
merge
(
records
.
astype
(
np
.
object
),
on
=
'POINT_ID'
,
how
=
"inner"
)
GDF
=
GDF
.
astype
(
object
).
merge
(
records
.
astype
(
object
),
on
=
'POINT_ID'
,
how
=
"inner"
)
GDF
=
GDF
.
replace
([
np
.
nan
,
None
],
int
(
self
.
outFillVal
))
# fillna fails with geopandas==0.6.0
GDF
.
crs
=
crs
# gets lost when using GDF.astype(np.object), so we have to reassign that
...
...
@@ -555,8 +555,8 @@ class Tie_Point_Grid(object):
# set title and adjust tick labels
ax
.
set_title
(
title
,
fontsize
=
fontsize
)
[
tick
.
label
.
set_fontsize
(
fontsize
)
for
tick
in
ax
.
xaxis
.
get_major_ticks
()]
[
tick
.
label
.
set_fontsize
(
fontsize
)
for
tick
in
ax
.
yaxis
.
get_major_ticks
()]
[
tick
.
label
1
.
set_fontsize
(
fontsize
)
for
tick
in
ax
.
xaxis
.
get_major_ticks
()]
[
tick
.
label
1
.
set_fontsize
(
fontsize
)
for
tick
in
ax
.
yaxis
.
get_major_ticks
()]
plt
.
xlabel
(
'x-shift [%s]'
%
'meters'
if
unit
==
'm'
else
'pixels'
,
fontsize
=
fontsize
)
plt
.
ylabel
(
'y-shift [%s]'
%
'meters'
if
unit
==
'm'
else
'pixels'
,
fontsize
=
fontsize
)
...
...
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