`as_tuple` gives uninformative error messages on type error
Closed this issue · 1 comments
danshapero commented
I'm getting an error here that happened from passing a numpy int32 where an int was expected. A numpy int32 is rejected because it is not an instance of plain old int. The error message didn't make this clear.
This error was triggered when passing a tuple of subdomain IDs to the measure ds
in order to integrate over only part of the boundary. The IDs came from a call to mesh.exterior_facets.unique_markers
, which returns a numpy array of numpy.int32 objects. So this error could be especially easy to trigger if users are getting subdomain IDs by querying the mesh.
danshapero commented
Fixed by firedrakeproject/firedrake#1454.