Foundations-of-Computer-Science practice question 6 of 15
Which aspect is excluded from a NumPy array’s structure?
Full set: 71 questionsA NumPy ndarray object is a data structure that consists of a pointer to a contiguous block of memory (the data) and metadata used to interpret that data. This metadata fundamentally includes the data type (dtype), the array's dimensions (shape), and information on how to traverse the data (strides). An encryption key is not a standard component of the NumPy array's internal structure. While a NumPy array's data can be encrypted through external libraries or custom implementations, encryption is not an intrinsic property or attribute of the ndarray object itself.
A. The data pointer is a core component, pointing to the memory location where the array's elements are actually stored.
B. The shape of the array is essential metadata, defining the size of the array in each dimension as a tuple of integers.
C. The data type or dtype is a fundamental attribute that describes the type of data (e.g., int32, float64) stored in the array.
1. NumPy v1.26 Manual, "NumPy fundamentals," Section: "The N-dimensional array (ndarray)." The documentation describes the internal memory layout and essential attributes of an ndarray, which include ndarray.shape, ndarray.dtype, and a pointer to the data buffer, but makes no mention of an encryption key. (Source: Official Vendor Documentation)
2. Harris, C. R., Millman, K. J., van der Walt, S. J., et al. (2020). Array programming with NumPy. Nature, 585, 357–362. https://doi.org/10.1038/s41586-020-2649-2. The paper describes the NumPy array as a "multidimensional, homogeneous array of fixed-size items" and discusses its core components like shape and dtype.
3. Stanford University, CS231n: "Convolutional Neural Networks for Visual Recognition," Python/Numpy Tutorial. The tutorial explains the ndarray object, highlighting its key attributes like shape, dtype, and size, without any mention of encryption as a built-in feature. (Source: University Courseware)
Keep practicing
Take the free Foundations-of-Computer-Science practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other Foundations-of-Computer-Science practice questions
- Question 1What is the purpose of a parameter in a function definition?
- Question 2What is the primary purpose of an operating system?
- Question 3Which action is taken if the first number is the lowest value in a selection sort?
- Question 4What will the expression fam[3:6] return?
- Question 5What will the output be of this line?
- Question 7Which of the following best defines an algorithm?
