You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I find when apply oversample to an array, the original array will be changed.
A minimum test case:
fromisce3.cal.point_target_infoimportoversampleimportnumpyasnpa=np.random.rand(10,10)+1j*np.random.rand(10,10)
a_copy=a.copy()
np.testing.assert_array_equal(a,a_copy) # it passed with no errora_oversampled=oversample(a,nov=5)
np.testing.assert_array_equal(a,a_copy) # it failed
Thanks for the report! I don't really mind shift_frequency operating in-place, but it should probably return None in order to prevent this sort of confusion. I agree it's surprising that oversample would modify the input array and will try to include a patch in the next release.
isce3 version 0.13.0, installed from conda-forge
I find when apply
oversample
to an array, the original array will be changed.A minimum test case:
I suspect the problem is in
isce3/python/packages/isce3/cal/point_target_info.py
Lines 42 to 47 in cc62efc
The
*=
is in-place operator. It shouldn't be used here. But I haven't do any test on it.The text was updated successfully, but these errors were encountered: