I have created a multi-dimensional array, whose information is shown as follows.
It can be seen that there a lot of values that are quite small. In fact, they all should be equal to zero. Are there any quick ways, to replace those very small values (e.g., <=e-10) with 0. Thanks.
you can use the round method with the following parameters:
arr[j][i] = round(arr[j][i], 10)
to round to 10 digits (e^-10)
numpy also has a method for this as well to round the whole array
numpy.around(a,10,a)