Reconstruction-and-Compression-of-Color-Images icon indicating copy to clipboard operation
Reconstruction-and-Compression-of-Color-Images copied to clipboard

Bug Fixes : Unable to perform Python Broadcast due to rank array

Open keshav1245 opened this issue 4 years ago • 0 comments

Error Encountered :

ValueError : operands could not be broadcast together with shapes (4000,6000) (4000,)

Fix : The np.mean function used during cov_mat = image_2d - np.mean()... and recon = np.dot ..... resulted in a rank array instead of dimensional 1 D vector, due to which python broadcasting failed and ValueError was encountered. The code has been fixed by adding the keepdims = True parameter which then results in (4000,1) vector and not (4000,) rank.

Status : Issue Resolved

Regards, Keshav Tangri errorGithub

keshav1245 avatar Jun 03 '20 12:06 keshav1245