I am reading data from the sensor and its data always change over time, its data are between 0 and 255 as np.array.
I'd like to find min and max values between 3 and 250.
For example:
import numpy as np
a = np.array([0,1, 2, 10, 20, 100, 251, 255])
d = a.min()
c = a.max()
print (d,c)
The output is: (0, 255)
I'd like to be (10, 100)
Sometimes a = np.array([0,1, 3, 10, 20, 100, 249, 255])
I'd like to be (3, 249)
Please, your help.