Determining if an array is monotonically increasing

Question Q6.1.10

Write a one-line statement which returns True if an array is a monotonically increasing sequence or False otherwise.

Hint: numpy.diff returns the difference between consecutive elements of a sequence. For example,

In [x]: np.diff([1,2,3,3,2])
Out[x]: array([ 1,  1,  0, -1])

Solution