Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

keshav1245
Copy link

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

In some cases, np.mean function was returning the rank matrix and due to that , python broadcasting was not able to execute, ultimately causing the program to crash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant