Skip to content

Commit

Permalink
src/sage/structure/coerce.pyx (is_mpmath_type): Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed May 30, 2024
1 parent e9c8870 commit 73a9d52
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sage/structure/coerce.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -468,10 +468,10 @@ cpdef bint is_numpy_type(t) noexcept:
return True
return False


cpdef bint is_mpmath_type(t) noexcept:
r"""
Check whether the type ``t`` is a type whose name starts with either
``mpmath.`` or ``sage.libs.mpmath.``.
Check whether the type ``t`` is a type whose name starts with ``mpmath.``
EXAMPLES::
Expand All @@ -488,7 +488,7 @@ cpdef bint is_mpmath_type(t) noexcept:
True
"""
return isinstance(t, type) and \
strncmp((<PyTypeObject*>t).tp_name, "sage.libs.mpmath.", 17) == 0
strncmp((<PyTypeObject*>t).tp_name, "mpmath.", 17) == 0


cdef class CoercionModel:
Expand Down

0 comments on commit 73a9d52

Please sign in to comment.