Arrays

  • + 0 comments
    # method 1
    def arrays(arr):
        a = numpy.array(arr,float)
        return a[::-1]
    
    # method 2 using function reverse in list
    def arrays(arr):
        arr.reverse()
        a = numpy.array(arr,float)
        return a
    
    # method 3 using function flip in numpy
    def arrays(arr):
        a = numpy.array(arr,float)
        return numpy.flip(a)