#!/usr/bin/python # -*- coding: utf-8 -*- n = 4 mi_lista = [0] * n print(mi_lista) mi_lista = [1, 4, 6, 3] print(mi_lista) print(mi_lista * 2) import numpy as np mi_array = np.array(mi_lista) print(mi_array) print(mi_array * 2) import numpy as np # Use numpy.allclose() to check if two arrays are equal # to each other within a tolerance. print(np.allclose([1e10, 1e-7], [1.00001e10, 1e-8])) print(np.allclose([1e10, 1e-8], [1.00001e10, 1e-9])) # Use numpy.isclose() to check if the elements of two arrays # are equal to each other within a tolerance print(np.isclose([1e10, 1e-7], [1.00001e10, 1e-8])) print(np.isclose([1e10, 1e-8], [1.00001e10, 1e-9]))