NumPy arrays are not a built-in Python data structure. In a default Python installation, the interpreter includes core types such as int, float, str, list, tuple, dict, and set, plus the standard library. A NumPy array, typically created as numpy.ndarray, is provided by the third-party NumPy library. Therefore, if a “default Python configuration” does not recognize a NumPy array, the most likely cause is thatNumPy is not installed or not available in the active environment. This happens often when a user has multiple Python environments (system Python, virtual environments, conda environments) and installs NumPy into one environment while running code in another.
Option B is incorrect because Python’s standard-library array module is different from NumPy. Importing array does not create or enable NumPy’s ndarray type. Option C is possible in rare cases,but the typical, textbook-aligned explanation is missing dependencies rather than an incorrectly configured interpreter. Option D is also unlikely: while very old Python versions may cause compatibility issues with modern NumPy releases, the symptom described—NumPy arrays not being recognized at all—more directly indicates the package is absent in the running environment.
In practice, verifying import numpy and checking the installed packages for the current interpreter resolves the issue.
Submit