I am brand new to SageMath and have come across the following error message:
sage: diagonal_matrix([2, 1.3, 5])
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-54-97b135e19796> in <module>
----> 1 diagonal_matrix([Integer(2), RealNumber('1.3'), Integer(5)])
~/Desktop/SageMath/local/lib/python3.9/site-packages/sage/matrix/special.py in diagonal_matrix(arg0, arg1, arg2, sparse)
852
853 # sanity check for entries
--> 854 from numpy import ndarray
855 if not isinstance(entries, (list, tuple, ndarray)):
856 entries = list(entries)
~/Desktop/SageMath/local/lib/python3.9/site-packages/numpy/__init__.py in <module>
146 from .core import *
147 from . import compat
--> 148 from . import lib
149 # NOTE: to be revisited following future namespace cleanup.
150 # See gh-14454 and gh-15672 for discussion.
~/Desktop/SageMath/local/lib/python3.9/site-packages/numpy/lib/__init__.py in <module>
42
43 __all__ = ['emath', 'math', 'tracemalloc_domain', 'Arrayterator']
---> 44 __all__ += type_check.__all__
45 __all__ += index_tricks.__all__
46 __all__ += function_base.__all__
NameError: name 'type_check' is not defined
This input comes directly from the documentation, yet I am lost as to why my out-of-the-box Sage installation is throwing this error. Other possibly relevant information: I am running Sage through the Terminal on a Mac. Any assistance will be greatly appreciated.