Skip to content

In this repository, I have provided all the basic to advance Numpy functions, which will help for Data Science and Machine Learning field.

Notifications You must be signed in to change notification settings

sneh20122001/Numpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Numpy Project

Overview

This project demonstrates the usage of NumPy, a fundamental package for scientific computing with Python. NumPy provides support for large, multi-dimensional arrays and matrices, along with a collection of mathematical functions to operate on these arrays efficiently.

Features

  • Multi-dimensional array creation and manipulation
  • Vectorized mathematical operations
  • Linear algebra, statistics, and Fourier transform support
  • Efficient broadcasting and slicing operations
  • Integration with other Python libraries like Pandas, Matplotlib, and SciPy

Installation

You can install NumPy using pip:

pip install numpy

Usage

Here are some basic examples of NumPy usage:

Importing NumPy

import numpy as np

Creating Arrays

# 1D array
arr1 = np.array([1, 2, 3, 4, 5])

# 2D array
arr2 = np.array([[1, 2], [3, 4], [5, 6]])

Array Operations

# Element-wise addition
arr_sum = arr1 + 10

# Multiplication
arr_mul = arr1 * 2

# Dot product
result = np.dot(arr1, arr1)

Array Slicing and Indexing

# Accessing elements
print(arr2[0, 1])  # Output: 2

# Slicing
print(arr1[1:4])  # Output: [2 3 4]

Array Functions

# Statistical operations
mean_val = np.mean(arr1)
max_val = np.max(arr1)
min_val = np.min(arr1)

# Reshape
reshaped = arr2.reshape(2, 3)

Advantages of NumPy

  • Speed: Efficient operations on large datasets using optimized C code.
  • Memory Efficiency: Uses less memory than Python lists.
  • Vectorization: Eliminates the need for explicit loops, improving performance.
  • Community Support: Widely used in data science, machine learning, and scientific computing.

References

License

This project is open-source and available under the MIT License.

About

In this repository, I have provided all the basic to advance Numpy functions, which will help for Data Science and Machine Learning field.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published