On 5/17/17 10:50 AM, Nissim Derdiger wrote:
> Hi,
> In my script, I need to compare big NumPy arrays (2D or 3D), and return
> a list of all cells with difference bigger than a defined threshold.
> The compare itself can be done easily done with "allclose" function,
> like that:
> Threshold = 0.1
>
On Wed, May 17, 2017 at 9:50 AM, Nissim Derdiger
wrote:
> Hi,
> In my script, I need to compare big NumPy arrays (2D or 3D), and return a
> list of all cells with difference bigger than a defined threshold.
> The compare itself can be done easily done with "allclose" function, like
> that:
> Thre
I would do something like:
diff_is_large = (array1 - array2) > threshold
index_at_large_diff = numpy.nonzero(diff_is_large)
array1[index_at_large_diff].tolist()
On Wed, May 17, 2017 at 9:50 AM, Nissim Derdiger
wrote:
> Hi,
> In my script, I need to compare big NumPy arrays (2D or 3D), and retu
Hi,
In my script, I need to compare big NumPy arrays (2D or 3D), and return a list
of all cells with difference bigger than a defined threshold.
The compare itself can be done easily done with "allclose" function, like that:
Threshold = 0.1
if (np.allclose(Arr1, Arr2, Threshold, equal_nan=True)):