-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
When running the examples two examples ['splinepy/examples/show_readme.py', 'splinepy/examples/show_microstructures.py'] fail both at the same part:
Traceback (most recent call last):
File "splinepy/examples/show_readme.py", line 276, in <module>
splinepy.microstructure.tiles.show(alpha=0.7, background=bg)
File "xxx/envs/testsplinepy/lib/python3.12/site-packages/splinepy/microstructure/tiles/__init__.py", line 174, in show
to_show.append([key, Multipatch(value().create_tile()[0])])
^^^^^^^^^^^^^^^^^^^^^
File "xxx/envs/testsplinepy/lib/python3.12/site-packages/splinepy/microstructure/tiles/hollow_cube.py", line 75, in create_tile
(parameters[:, 2:] > _np.deg2rad(-30))
ValueError: The truth value of an empty array is ambiguous. Use `array.size > 0` to check that an array is not empty.
and
^[Traceback (most recent call last):
File "splinepy/examples/show_microstructures.py", line 45, in <module>
splinepy.microstructure.tiles.show(
File "xxx/envs/testsplinepy/lib/python3.12/site-packages/splinepy/microstructure/tiles/__init__.py", line 174, in show
to_show.append([key, Multipatch(value().create_tile()[0])])
^^^^^^^^^^^^^^^^^^^^^
File "xxx/envs/testsplinepy/lib/python3.12/site-packages/splinepy/microstructure/tiles/hollow_cube.py", line 75, in create_tile
(parameters[:, 2:] > _np.deg2rad(-30))
ValueError: The truth value of an empty array is ambiguous. Use `array.size > 0` to check that an array is not empty.
I am not sure where this directly comes from. @markriegler, you are currently the one with the most expertise in the microstructure code. Could you take a look at this?
This also does not show up in the tests.
Metadata
Metadata
Assignees
Labels
No labels