Skip to content

Commit

Permalink
Replace np.float (numpy.float) by float (#857)
Browse files Browse the repository at this point in the history
* Replace np.float (numpy.float) by float

Replace np.float (numpy.float) by float (np.float is an alias for python float type), since it does not exist anymore in numpy (version 1.24.1).
See #856.

* Replace np.float (numpy.float) by float

Replace np.float (numpy.float) by float (np.float is an alias for python float type), since it does not exist anymore in numpy (version 1.24.1).
See #856.

* Replace np.float (numpy.float) by float

Replace np.float (numpy.float) by float (np.float is an alias for python float type), since it does not exist anymore in numpy (version 1.24.1).
See #856.

* Replace np.float (numpy.float) by float

Replace np.float (numpy.float) by float (np.float is an alias for python float type), since it does not exist anymore in numpy (version 1.24.1).
See #856.
  • Loading branch information
kirimaru-jp committed Jan 29, 2023
1 parent 422b7b2 commit 0d67db0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/imagery/i.sentinel/i.sentinel.import/i.sentinel.import.py
Original file line number Diff line number Diff line change
Expand Up @@ -849,11 +849,11 @@ def _parse_mtd_file(mtd_file):
[
np.array(
ssssn.text.split(" "),
dtype=np.float,
dtype=float,
)
for ssssn in list(sssn)
],
dtype=np.float,
dtype=float,
)
)
meta["MEAN_SUN_ZENITH_GRID_ANGLE"] = mean_zenith
Expand All @@ -865,11 +865,11 @@ def _parse_mtd_file(mtd_file):
[
np.array(
ssssn.text.split(" "),
dtype=np.float,
dtype=float,
)
for ssssn in list(sssn)
],
dtype=np.float,
dtype=float,
)
)
meta[
Expand Down
2 changes: 1 addition & 1 deletion src/raster/r.mess/r.mess.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ def main(options, flags):
"GROUP BY {0} ORDER BY {0}"
).format(coln, tmpf0)
volval = np.vstack(db.db_select(sql=sql3))
volval = volval.astype(np.float, copy=False)
volval = volval.astype(float, copy=False)
a = np.cumsum(volval[:, 1], axis=0)
b = np.sum(volval[:, 1], axis=0)
c = a / b * 100
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def load_data(file_path, labeled=False, skip_header=1, scale=True):
if skip_header != 0:
header = data[0:skip_header, :]
data = data[skip_header:, :] # Remove header
data = data.astype(np.float)
data = data.astype(float)

ID = data[:, 0] # get only row 0s
if labeled:
Expand Down
2 changes: 1 addition & 1 deletion src/vector/v.class.ml/ml_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def plot_extra(cls, labels, fmt="png", **kwargs):
name=name,
label=labels[cl],
)
cnf = np.array(cls["confusion matrix"], dtype=np.float)
cnf = np.array(cls["confusion matrix"], dtype=float)
sc = cnf.sum(axis=0)
norm = sc / sc.sum(axis=1)[:, None]
plot_confusion_matrix(
Expand Down

0 comments on commit 0d67db0

Please sign in to comment.