Learn practical skills, build real-world projects, and advance your career

5 functions numpy you didn't know you needed

What is NumPy?

numpy is a python library used for working with arrays support built-in function that allows to work with numerical data

Adding and removing elements

delete(arr, obj[, axis])

Return a new array with sub-arrays along an axis deleted.

insert(arr, obj, values[, axis])

Insert values along the given axis before the given indices.

append(arr, values[, axis])

Append values to the end of an array.

resize(a, new_shape)

Return a new array with the specified shape.

trim_zeros(filt[, trim])

Trim the leading and/or trailing zeros from a 1-D array or sequence.

The recommended way to run this notebook is to click the "Run" button at the top of this page, and select "Run on Binder". This will run the notebook on mybinder.org, a free online service for running Jupyter notebooks.

!pip install jovian --upgrade -q
import jovian
jovian.commit(project='numpy-array-operations')
[jovian] Updating notebook "montassarsoudani67/numpy-array-operations" on https://jovian.ai [jovian] Committed successfully! https://jovian.ai/montassarsoudani67/numpy-array-operations

Let's begin by importing Numpy and listing out the functions covered in this notebook.