r/StackoverReddit • u/Bitter-Hope6731 • Aug 03 '24
Python Value error (pls help)
I am coding for a document with multiple graphs on it, so lots of coding for x and y axis's, I don't know why but I am getting an error, 'x and y must have same first dimension, but have shapes (539,) and (544,)', now I know this is something to do with the number of x's matching the number of y's but I don't know how to resolve this issue, any help would be greatly appreciated.
2
Upvotes
View all comments
Show parent comment
1
u/[deleted] Aug 04 '24
Ok then. I found some more posts with similar issues. It seems that their problems were certain variables were 2 different lengths instead of the same length.
https://www.reddit.com/r/learnpython/comments/ohkyl5/exception_has_occurred_valueerror_x_and_y_must/
https://365datascience.com/question/valueerror-x-and-y-must-have-same-first-dimension-but-have-shapes-10-and-11/
If you could provide us with the area it has an exception at, it would be greatly appreciated!