Arrays

  • + 0 comments

    Thanks @sheo_the_uncle

    To demonstrate your point, I have provided the code below:

    def arrays(arr):
        return numpy.array(numpy.flipud(arr), float) # using numpy.flipud ("flip up-down")
    
        # return numpy.array(arr[::-1], float) # using slicing
    
        # arr.reverse() # slow, cannot be used inline - needs two lines of code
        # return numpy.array(arr, float)