Python Basics - Numpy Arrays
(Part-1) - Question and Answers
CBSE Class 11 - Informatics Practices
Q1: What is NumPy?
Answer:
1. NumPy stands for Numerical Python.
2. It is the core library for scientific computing in Python.
3. A NumPy array (also called ndarray) is a homogeneous multidimensional array of data objects.
4. A NumPy array is a table of elements (usually numbers), all of the same type, indexed by a tuple of positive integers.
5. Numpy module provides a set of methods and tools for working with these arrays.
6. In Numpy dimensions are called axes. The number of axes is rank.
Q2: What is the command line option to install NumPy module?
Answer: Run the following command at the command prompt.
pip install numpy
Q3: What is one dimensional (1D) array?
Answer: A one-dimensional array or 1D array is a named group of a contiguous set of elements having the same data type. 1D arrays are also called vectors.
Q4: What is a multi-dimensional array?
Answer: A multidimensional array is an array of arrays. Multi-dimensional arrays are also known as matrices. For example, a two-dimensional array (2D array) has two axes i.e. rows and columns.