Search code examples
pythonnumpyminimum

Minimum value from two arrays


I have two arrays

a=([2,3,5]) 

and

b=([-2,3.2,10])

How can I get minimum value from these two arrays?

Expected answer is -2


Solution

  • if a = [2, 3, 5] and b = [-2, 3.2, 10] then in Python:

    result = min(min(a),min(b))