-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
There seems to be a numpy problem in the function adjustResultCoordinates of https://github.com/MaterialEyes/Plot2Spec/blob/main/src/axis_alignment/tick_detection/craft_utils.py:
def adjustResultCoordinates(polys, ratio_w, ratio_h, ratio_net = 2):
if len(polys) > 0:
polys = np.array(polys)
for k in range(len(polys)):
if polys[k] is not None:
polys[k] *= (ratio_w * ratio_net, ratio_h * ratio_net)
return polysThe list variable polys here may consist simultaneously of some 1D arrays and some None values. When it's being converted to a 2D array in the third line polys = np.array(polys), we get an error like this:
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (22,) + inhomogeneous part.
I simply commented out this line and everything seemed to be alright.
Not sure if this is a compatibility issue. My numpy version is 1.24.4.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels