- changed title to PetscBool not mapped to Python <class 'bool'>
PetscBool not mapped to Python <class 'bool'>
Issue #63
resolved
See http://lists.mcs.anl.gov/pipermail/petsc-users/2017-April/032413.html for description.
Cython appears to have trouble mapping PetscBool
to Python <class 'bool'>
via bint
. Maybe a toBool
function is required as the same lines and toReal
?
C int
types appear to be cast correctly when using bint
.
This issue is pretty serious because the Pythonic syntax a is True
leads to erroneous results.
Comments (5)
-
reporter -
A quick fix would be to add a
toBool()
utility routine to make the proper conversionPetscBool
->bool
. What do you think? After grepping, it seems there are no so many places in the code where we need to apply this fix. -
reporter Sounds good to me.
-
-
- changed status to resolved
- Log in to comment