Arulius Savio

Arulius Savio

How to Use Numpy Maximum on Arrays?

How to Use Numpy Maximum on Arrays?

At the second position, np.maximum returns 9 from the pair 8 and 9. That position-by-position result catches my attention: each comparison stays tied to its matching pair instead of reducing the whole array to one maximum. For your two arrays,…

Mastering NumPy’s Powerful einsum_path( ) Function

Mastering NumPy’s Powerful einsum_path( ) Function

Einsum is an almighty function from the numpy library which is the most efficient manipulator of n-dimensional arrays. It can perform umpteen functions such as adding, multiplying or rearranging the input arrays in a jiffy, resulting in multiple x’s faster…