Describe the issue:
The latex presentation is automatically used in environments like Jupyter notebook and Spyder. For coefficients of object dtype an exception is generated since np.signbit is not available.
Reproduce the code example:
import fractions
from numpy.polynomial import Polynomial
f=fractions.Fraction(2,3)
p=Polynomial([f, f])
p._repr_latex_()
Error message:
Traceback (most recent call last):
Cell In[2], line 6
p._repr_latex_()
File C:\develop\env311\Lib\site-packages\numpy\polynomial\_polybase.py:468 in _repr_latex_
elif not np.signbit(c):
TypeError: ufunc 'signbit' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
Runtime information:
1.25.1
3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)]
Context for the issue:
No response