I am having a problem with subtracting two large 2Darrays. Most of the time it gives the right answer but its adding a juck values in between. here is my code

/

import numpy as np

import yuvio

import csv

yuv_frames = yuvio.mimread(“test.yuv”, 3840, 2160, ‘yuv420p16le’,1,1)

yuv_frame_temp =yuvio.mimread(“test.yuv”, 3840, 2160, ‘yuv420p16le’,1+30,1)

x=np.array(yuv_frames[0].y)

y=np.array(yuv_frame_temp[0].y)

s=(2160, 3840)

z=np.zeros(s)

z=np.subtract(x,y)

/

I need to take the mean of z and its giving a very large number and i tried to log the array to CSV and found out its adding some juck values like 6500 , 8000 in some cells where is supposed to be much smaller values like 8 ,10. This problem is only in few cells and rest of them got right difference. I would be thankfull if someone couls help me this.