yumorishita / LiCSBAS2

GNU General Public License v3.0
18 stars 2 forks source link

The conversion of 99999 to int16 will fail in the future. #23

Open yumorishita opened 1 year ago

yumorishita commented 1 year ago
LiCSBAS04op_mask_unw.py ver1.3.5 20210105 Y. Morishita
LiCSBAS04op_mask_unw.py -i GEOCml10 -o GEOCml10mask -c 0.2

Calculate coh_avg and define mask (<=0.2)
/home/morishita/software/LiCSBAS2/bin/LiCSBAS04op_mask_unw.py:196: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of 99999 to int16 will fail in the future.
For the old behavior, usually:
    np.array(value).astype(dtype)`
will give the desired result (the cast overflows).
  n_coh[n_coh==0] = 99999 #to avoid zero division

Mask defined.
yumorishita commented 1 year ago

Change 99999 to 9999 or 32767.