pyKNEEr
pyKNEEr copied to clipboard
morphology_functions.py question?
HI,
Do you know why I will receive the below error message with 01_cubeQuant_01_prep_fc.mha, there is no problem with 01_DESS_01_prep_fc.mha.
With 01_cubeQuant_01_prep_fc.mha (but not 01_DESS_01_prep_fc.mha), I will see Somewhere around line 218 within morphology_functions.py, temp = np.array(temp)
with the error message of ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
If I use temp = np.array(temp, dtype=object), (which I do not think is the solution), but there will be problems with numpy float error later for both
File "C:\Users\NAME\Downloads\pyKNEEr-master\pyKNEEr-master\pykneer1\venv\Lib\site-packages\pykneer\morphology_functions.py", line 387, in flatten_surface
phi = np.arctan2(pts[:,2], pts[:,1]) # default
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'float' object has no attribute 'arctan2'