I am trying to plot large data (50 million values) but I am getting a MemoryError. Now I am trying to clear my dataset from redundant values. In my case, these are all values below 1 and above -1. One thing to keep in mind is that the plot should look the same as the original, but without the noise. Is there a better way to do this than using loops or list comprehensions?
Original Plot:

Edit:
Thank you for the replies. If I use the proposed approach:
daty = daty[(-1 > daty) | (daty > 1)]
It results in this:

If your array is named data:
clipped_data = data[(-1 > data) | (data > 1)]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With