Explore the power of NumPy, the essential library for numerical computing in Python, through LabEx's comprehensive tutorials. Learn how to manipulate and analyze data with ease, and unlock the full potential of this versatile tool.

Your First NumPy Lab

Hi there, welcome to LabEx! In this first lab, you'll learn the classic 'Hello, World!' program in NumPy.

NumPyPython

NumPy Upper Function

In this lab, you will learn how to use the upper() function in the char module of the NumPy library. This function is used to convert all lowercase characters of a string to uppercase. If there are no lowercase characters in the given string, it returns the original string. We will cover the syntax required to use this function, its returned values, and provide examples of its use.

PythonNumPy

NumPy STD Function

In this lab, we will cover the numpy.std() function of the NumPy library. We will understand what standard deviation means and how to use numpy.std() to calculate the standard deviation of an array.

PythonNumPy

Numpy Transpose Function

In this lab, we will learn how to use the numpy.transpose() function in Python NumPy library. We will learn how this function is used to permute or reverse the axes of an array. By the end of the lab, you will be able to use numpy.transpose() to modify arrays with ease.

PythonNumPy

Sorting NumPy Arrays with Algorithms

Sorting is a process where elements of an array are arranged in an ordered sequence based on the given criteria. In the NumPy library, there are various functions available that perform sorting operations based on different sorting algorithms such as quicksort, heapsort, and mergesort. In this lab, we will learn how to sort ndarrays in NumPy using different sorting algorithms.

NumPyPython

NumPy Startswith Function

In this lab, you will learn about the NumPy startswith() function. The startswith() function in the char module of the NumPy library returns a boolean array with values that can be either True or False. This function returns True if the given string starts with the specified prefix value in the function. It returns False if it does not start with the specified prefix.

NumPyPython

NumPy Swapcase Function

In this lab, we will cover the step-by-step process of using the Swapcase() function of the char module in the Numpy library. This tutorial is for those who want to manipulate strings in Numpy and change the cases of the characters in their string.

PythonNumPy

Numpy Split Function

In this lab, we will cover the split() function of the char module in the Numpy library. The split() function is used to split an input string into a list of strings based on a specified separator.

PythonNumPy

NumPy Trunc Function

In this lab, we will learn about the NumPy trunc() function in the Python language. We will understand its syntax, parameters, and how to use this function to return the truncated value of input array elements. We will also see some examples to have a better understanding.

NumPyPython

Numpy Multiply Function

In this lab, we will learn about the multiply() function in the Numpy library. This function is used to repeat a string element in an ndarray by n number of times, where n is any integer value. This function performs in an element-wise manner, covering all the array elements.

PythonNumPy

NumPy Right Shift Function

In this lab, we will learn about the right_shift() function in the NumPy library. This function is used to perform the right shift operation on an array-like object. The right_shift() function mainly shifts the bits in the binary representation of an operand to the right, just by the specified positions and appends an equal number of 0s from the left. The internal representation of numbers is in the binary format; thus, the right shift operation is equivalent to dividing a number by 2^x, where x is the number of bits to shift. We will cover the syntax of the right_shift() function, its parameters, and the values returned by this function along with code samples.

PythonNumPy

Numpy Reshape Function

The reshape() function in the NumPy library is mainly used to change the shape of an array without changing its underlying data. It helps in providing a new shape to an array that can be useful based on your use case. In this lab, we will cover the basic usage of the reshape() function and the different parameters and values it uses.

NumPyPython

NumPy Median Function

NumPy is a Python library that is used for working with arrays. It also supports mathematical operations on arrays. One such mathematical operation is finding the median of an array. The median is the middle value of a set of data. It is used to represent the average of a set of numbers and is not affected by outliers. In this lab, we will learn how to use the NumPy median function.

PythonNumPy

Numpy PTP Function

In this lab, you will learn about the numpy.ptp() function in Python. The 'ptp' stands for 'peak to peak.' This function is used to return a range of values along an axis. The range can be calculated using range = maximum_value - minimum_value.

PythonNumPy

NumPy Replace Function

Numpy is one of the most powerful scientific computing libraries in Python. It provides a high-performance multidimensional array object, and tools for working with these arrays.

PythonNumPy

NumPy Array Mean Calculation

NumPy is a Python package for scientific computing that provides a high-performance array object, which is the fundamental building block for mathematical operations. The mean can easily be calculated by adding all the items of an array and dividing them by the total number of array elements. The numpy.mean() function in the NumPy library is used to compute the arithmetic mean across the specified axis of a numpy array. By default, the average is calculated over the flattened array unless the user specifies an axis.

PythonNumPy

NumPy Partition Function

In this lab, you will learn about the numpy.partition() function of the Numpy library. This function is used to split up the input array according to the given arguments, and returns the partitioned copy of the input array. The numpy.partition() function is helpful when we want to quickly find the kth smallest or largest element in an array, without sorting the whole array.

PythonNumPy

Numpy Logspace Function

In this lab, you will learn about the numpy.logspace() function of the Numpy library. This function is used to create an array by using the numbers that are evenly separated on a logarithmic scale.

PythonNumPy

- Prev
- 1
- 2
- 3
- 4
- 5
- Next