Explore information related to numpy


Python Arrays in Linux - Explained with examples

This article covers how to use Array in Python. In fact, An array is a special variable, which can hold more than one value at a time.


Python Lists Vs Arrays

In Python, we can treat lists as arrays. However, we cannot constrain the type of elements stored in a list. 

For example:

# elements of different types
a = [1, 3.5, "Hello"] 
If you create arrays using the array module, all elements of the array must be of the same numeric type.
import array as arr
# Error
a = arr.array('d', [1, 3.5, "Hello"])

Output will give:

Traceback (most recent call last):
  File "<string>", line 3, in <module>
    a = arr.array('d', [1, 3.5, "Hello"])
TypeError: must be real number, not str

Read More



Install NumPy on Ubuntu 20.04 LTS - Step by step guide ?

This article covers how to install Numpy on Ubuntu 20.04. In fact, NumPy(Numerical Python) is a library for the Python programming language, adding support for large, multi-dimensional arrays and matrices, along with a large collection of high-levelmathematicalfunctions to operate on these arrays.

Read More



Python abs() function in Linux

This article covers how to use Python abs() function. In fact, The Python abs() method calculates the absolute value of a number. The abs() method takes in one parameter: the number whose absolute value you want to calculate.

Read More




For Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on LinuxAPT.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com