I am getting an error while running the makemap function of the package. Here are the details:
Model calibration and validation
.. Model 0: window size = 5, slicing method = ei.
AttributeError Traceback (most recent call last)
in <cell line: 1>()
----> 1 results_makemap = rmj.makemap(
2 fcc_file=output_raster_path,
3 time_interval=[3, 3],
4 output_dir=out_dir,
5 clean=False,
4 frames
/usr/local/lib/python3.10/dist-packages/riskmapjnr/makemap.py in makemap(fcc_file, time_interval, output_dir, clean, dist_bins, win_sizes, ncat, methods, csize, no_quantity_error, parallel, ncpu, figsize, dpi, blk_rows, verbose)
411 for i in range(n_ws):
412 s = win_sizes[i]
--> 413 ii, wRMSE_list, ncell, csize_km = makemap_ws(
414 i, s, fcc_file, time_interval,
415 dist_file, dist_v_file,
/usr/local/lib/python3.10/dist-packages/riskmapjnr/makemap.py in makemap_ws(i, win_size, fcc_file, time_interval, dist_file, dist_v_file, dist_edge_thresh, calval_dir, ncat, methods, meth, n_m, csize, nqe, figsize, dpi, blk_rows, verbose)
115 verbose=False)
116 # Validation
--> 117 val = validation(
118 fcc_file=fcc_file,
119 time_interval=time_interval[1],
/usr/local/lib/python3.10/dist-packages/riskmapjnr/validation.py in validation(fcc_file, time_interval, riskmap_file, tab_file_defrate, csize, no_quantity_error, tab_file_pred, fig_file_pred, figsize, dpi, verbose)
111
112 # Make square
--> 113 squareinfo = make_square(fcc_file, csize)
114 nsquare = squareinfo[0]
115 nsquare_x = squareinfo[1]
/usr/local/lib/python3.10/dist-packages/riskmapjnr/misc/miscellaneous.py in make_square(rasterfile, square_size)
145 nsquare = nsquare_x * nsquare_y
146 # Upper-left coordinates of each square
--> 147 x = np.arange(0, ncol, square_size, dtype=np.int).tolist()
148 y = np.arange(0, nrow, square_size, dtype=np.int).tolist()
149 # Size (number of col and row) of each square
/usr/local/lib/python3.10/dist-packages/numpy/init.py in getattr(attr)
317
318 if attr in former_attrs:
--> 319 raise AttributeError(former_attrs[attr])
320
321 if attr == 'testing':
AttributeError: module 'numpy' has no attribute 'int'.
np.int
was a deprecated alias for the builtin int
. To avoid this error in existing code, use int
by itself. Doing this will not modify any behavior and is safe. When replacing np.int
, you may wish to use e.g. np.int64
or np.int32
to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations