Skip to content

Commit

Permalink
Replaced deprecated np.object type.
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Scheffler <[email protected]>
  • Loading branch information
danschef committed Mar 11, 2021
1 parent aa69142 commit 0e272c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arosics/Tie_Point_Grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ def get_CoRegPoints_table(self):
'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

Expand Down Expand Up @@ -555,8 +555,8 @@ def plot_shift_distribution(self, include_outliers=True, unit='m', interactive=F

# 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.label1.set_fontsize(fontsize) for tick in ax.xaxis.get_major_ticks()]
[tick.label1.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)

Expand Down

0 comments on commit 0e272c9

Please sign in to comment.