0% found this document useful (0 votes)
7 views6 pages

Ge Project 1976

The document provides an overview of NumPy, a fundamental package for scientific computing in Python, detailing its features such as N-dimensional arrays, mathematical functions, vectorization, and interoperability. It also includes examples of creating NumPy arrays and describes various data types supported by NumPy, including integer, floating-point, complex, boolean, and string types. The content is aimed at students in a data analysis and visualization course.

Uploaded by

Jugal Khanchi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views6 pages

Ge Project 1976

The document provides an overview of NumPy, a fundamental package for scientific computing in Python, detailing its features such as N-dimensional arrays, mathematical functions, vectorization, and interoperability. It also includes examples of creating NumPy arrays and describes various data types supported by NumPy, including integer, floating-point, complex, boolean, and string types. The content is aimed at students in a data analysis and visualization course.

Uploaded by

Jugal Khanchi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Data Analysis and Visualisation Using Python

Name : Jugal khanchi


Roll number : 1976
Course : B. A. (Hons) English
Submitted to : Prof. Jitendra Singh
 NumPy (short for “Numerical Python”) is a powerful and
fundamental package for scientific computing with Python. Numpy can
be used for different features :

1. N-Dimensional Arrays:

1. NumPy provides a high-performance multidimensional array


object that allows efficient manipulation of large datasets.
2. These arrays are the backbone of many scientific and data-
related computations.

2. Mathematical Functions:

1. NumPy offers an extensive collection of mathematical


functions for tasks like trigonometry, linear algebra, Fourier
transforms, and more.
2. These functions are optimized for performance and accuracy.

3. Vectorization and Broadcasting:

1. NumPy’s vectorization and broadcasting concepts are de-facto


standards for array computing.
2. They allow efficient element-wise operations on arrays without
explicit loops.

4. Interoperability:

1. NumPy plays well with other libraries and platforms, including


distributed systems, GPUs, and sparse arrays.
2. It supports a wide range of hardware and computing
environments.

5. Domains and Applications:

1. Nearly every scientist working in Python leverages the power of


NumPy.
Data Analysis and Visualisation Using Python
2. It is used in fields such as data science, machine learning,
visualization, quantum computing, and more.

 Creating Numpy arrays:

1. Using numpy.array():
import numpy as np

arr = np.array((5, 6, 7, 8, 9))

print(arr)

2. Using arrange() function to create a numpy array:


import numpy as np

Arange_array = np.arange((0, 19, 7))

print(arange_array)
Data Analysis and Visualisation Using Python

3. Using zero() function:

import numpy as np

zeros_array = np.zeros(6)
print(zeros_array)

4. Using ones() function:


import numpy as np

ones_array=np.ones(5)

print(ones_array)

 Various data types in NumPy Arrays


Data Analysis and Visualisation Using Python
NumPy provides a rich variety of data types to represent different kinds of
numerical and non-numerical data in arrays. Let’s explore some of the
commonly used data types:

1. Integer Types
a) int8, int16, int32, int64: Signed integer types with varying bit sizes (8, 16,
32, or 64 bits)
b) uint8, uint16, uint32, uint64: Unsigned integer types with varying bit
sizes
2. Floating-point types
a) float32, float64: Floating-point types with different precision levels (single
and double precision)
3. Complex types
a) complex64, complex128: Complex number types with single and double
precision

 Int: Integer Data type.

import numpy as np
arr_int = np.array([1, 2, 3, 4])

print(arr_int.dtype)

 Float : float data type.

arr_float = np.array([1.0, 2.5, 3.7, 4.2])


print(arr_float.dtype)
Data Analysis and Visualisation Using Python

 Bool : boolean data type.

arr_bool = np.array([True, False, True, False])


print(arr_bool.dtype)

 Complex : Complex data type.

arr_complex = np.array([1 + 2j, 3 - 4j, 5 + 6j])


print(arr_complex.dtype)

 String : string data type

arr_string = np.array(['a', 'b', 'c', 'd'])


print(arr_string.dtype)
Data Analysis and Visualisation Using Python

You might also like