A simple collection of NumPy universal function (ufunc) examples to understand element-wise operations, broadcasting, and creating custom ufuncs in Python.
A ufunc (universal function) in NumPy is a function that operates on ndarrays in an element-wise fashion. They are fast and vectorized, making array operations efficient.
- Basic built-in ufuncs (e.g.,
add
,subtract
,multiply
,divide
) - Applying ufuncs with broadcasting
- Creating custom ufuncs using
frompyfunc
- Python 3.x
- NumPy
-
Clone this repository:
git clone https://github.com/your-username/Numpy-ufunc.git
-
Install NumPy:
pip install numpy
-
Open the Python files or Jupyter notebooks to explore the examples.
Usama Israr Khan.
This project is open source and free to use.