Introduction to NumPy
Introduction to NumPy
NumPy (“Numerical Python” or Numeric Python”) is an open source module of Python that provides functions for fast mathematical computation on arrays and matrices.
To use NumPy, it is needed to import. Syntax for that is:
>>>import numpy as np
here np, is an alias for numpy which is optional
NumPy arrays come in two forms:
- 1-D array – also known as Vectors.
- Multidimensional arrays – Also known as Matrices.
Qus. 1 : NumPY stands for?
- Numbering Python
- Number in Python
- Numerical Python
- Number for Python
- Indexed
- Sliced
- Iterated
- All of the mentioned above
- We can find the dimension of the array
- Size of array
- Operational activities on Matrix
- None of the mentioned above
- Guido van Rossum
- Travis Oliphant
- Wes McKinney
- Jim Hugunin
- Mathematical and logical operations on arrays.
- Fourier transforms and routines for shape manipulation.
- Operations related to linear algebra.
- All of the above
- np.array([4,5,6])
- np.create_array([4,5,6])
- np.createArray([4,5,6])
- np.numpyArray([4,5,6])
- from numpy import *
- import numpy
- import numpy as my_numpy
- All of above
- Size, shape
- memory consumption
- data type of array
- All of these
- Indexing
- Slicing
- Reshaping
- None of the above
- Indexing
- Slicing
- Reshaping
- None of the above
- rank
- dtype
- shape
- None of these
- NumPy arrays have contiguous memory location
- They are more speedy to work with
- They are more convenient to deal with
- All of the above
- int32
- int
- float
- none of these
- To make a Matrix with all element 0
- To make a Matrix with all diagonal element 0
- To make a Matrix with first row 0
- None of the above
- Numbering Python
- Number In Python
- Numerical Python
- None of the above
- 0
- 1
- 2
- 3
- A machine learning library
- A web development framework
- A numerical computing library in Python
- A data visualization tool
- Array
- List
- Matrix
- Tuple
- It creates a new Python list.
- It creates a NumPy array.
- It performs element-wise addition.
- It calculates the mean of an array.
- Web development
- Machine learning and scientific computing
- Game development
- Database management
- unlimited length
- all private members must have leading and trailing underscores
- Preferred Installer Program
- None of the above
Programs
Create a numpy array having two dimensions and shape(3,3) and perform the following operations on array elements:
Write a program to find the intersection of two arrays