Maximum and Minimum array
Maximum and Minimum array
has anyone neat way to get Maximum and Minimum of array
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Maximum and Minimum array
This is really a generic Python query rather than anything related to MicroPython. But here goes anyway
Code: Select all
>>> from array import array
>>> a = array('i', range(10))
>>> a
array('i', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
>>> max(a)
9
>>> min(a)
0
>>>
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Maximum and Minimum array
thanks Mr.peter i didn't figure it same python numpy module