Basically I have these arrays
print(img_arr[0].shape)->(returns) (122218,)
print(img_arr1[0].shape)->(returns) (125204,)
so when I did
difference = np.subtract(img_arr[0],img_arr1[0])
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_9596/1605062018.py in <module>
----> 1 difference = np.subtract(img_arr[0],img_arr1[0])
2 #print(img_arr[0].shape)
3 #print(img_arr1[0].shape)
ValueError: operands could not be broadcast together with shapes (122218,) (125204,)
So in order to subtract arrays the shape should be the same. Hence, I did this to find the difference so that I can see the distribution of difference
difference = []
for idx, value in enumerate(img_arr[0]):
difference.append(img_arr[0][idx] - img_arr1[0][idx])
sns.displot(data=difference,kde=True)
So I just need some guidance that is my above approach valid to find the difference?