Vizard 8 » Tutorials & Examples » Python Programming » Addons » NumPy
8.1

NumPy

NumPy is a package that provides support for large multi-dimensional arrays and matrices in Python. This is essential for anyone doing scientific computing with the Python language.

Installation

From the Tools menu, open the Package Manager. Use the Search tab to locate the library and click Install.

Example

from numpy import *

array1 = array([-1.2, 1.2])
array2 = array([1,3])

print('array1: ',array1)
print('array2: ' ,array2)

added_array =  add(array1, array2)
print('The two arrays added together are: ', added_array)

absolute_array = absolute(added_array)
print('Take the absolute value of that and get: ',absolute_array)