DEV Community

Ramya .C
Ramya .C

Posted on

πŸ“ŠNumPy Practice !

πŸ”’ Building Strong Data Analytics Foundations πŸš€

Today I focused on improving my Python skills by practicing NumPy, one of the most powerful libraries used in Data Analytics and Machine Learning.
NumPy makes numerical operations faster, cleaner, and more efficientβ€”especially when working with large datasets.


πŸ” What I Practiced

βœ”οΈ Basic Array Operations

  • Creating arrays: array(), arange(), linspace()
  • Indexing & slicing (1D, 2D, 3D)
  • Mathematical & statistical operations
  • Broadcasting
  • Reshaping arrays with reshape()

βœ”οΈ Intermediate Operations

  • Horizontal & vertical stacking
  • Boolean filtering
  • Using the random module:
  np.random.rand()
  np.random.randn()
  np.random.randint()
Enter fullscreen mode Exit fullscreen mode
  • Vectorization for fast computations

πŸ”₯ Additional Advanced Practice

πŸ“Œ Matrix Multiplication

np.dot(a, b)
np.matmul(a, b)
Enter fullscreen mode Exit fullscreen mode

πŸ“Œ Conditional Selection

np.where(condition, value_if_true, value_if_false)
Enter fullscreen mode Exit fullscreen mode

πŸ“Œ Sorting & Unique Values

np.sort(arr)
np.unique(arr)
Enter fullscreen mode Exit fullscreen mode

πŸ“Œ Loading CSV Files

np.genfromtxt("data.csv", delimiter=",")
Enter fullscreen mode Exit fullscreen mode

πŸ“Œ Performance Practice

  • Compared memory usage of Python lists vs NumPy arrays
  • Used %timeit in Jupyter Notebook for speed comparison

🧠 Why NumPy Matters in Data Analytics?

  • Extremely fast numerical operations
  • Clean, simple, and vectorized code
  • Foundation for Pandas, Matplotlib, Scikit-Learn
  • Widely used in data preprocessing and ML models

πŸ”— GitHub Repository

You can check my NumPy practice code here:
πŸ‘‰ GitHub: https://github.com/ramyacse21/numpy_workspace

Top comments (0)