numpy.max or max ? Which one is faster?

Well from my timings it follows if you already have numpy array a you should use a.max (the source tells it’s the same as np.max if a.max available). But if you have built-in list then most of the time takes converting it into np.ndarray => that’s why max is better in your timings.

In essense: if np.ndarray then a.max, if list and no need for all the machinery of np.ndarray then standard max.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)