mlubej / chessboard

1 stars 0 forks source link

The requested array has an inhomogeneous shape after 1 dimensions. #2

Open Levg97 opened 1 year ago

Levg97 commented 1 year ago

I have tried running the run_solution.py that you have provided in examples but I receive this error:

$ python examples/run_solution.py Traceback (most recent call last): File "C:\users\lev\chessboard\examples\run_solution.py", line 9, in center_blocks = np.array([ ^^^^^^^^^^ ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (13,) + inhomogeneous part.

Levg97 commented 1 year ago

I downgraded my verison of numpy from 1.24.3 to 1.22.0 and now I'm getting this error:

File "C:\Users\Lev\chessboard\examples\run_solution.py", line 26, in polygons = create_polygons(center_blocks) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Lev\AppData\Local\Programs\Python\Python311\Lib\site-packages\chessboard\utils.py", line 24, in create_polygons poly.checkers = np.array(block) ^^^^^^^^^^^^^ AttributeError: 'Polygon' object has no attribute 'checkers'