Arrays

Sort by

recency

|

330 Discussions

|

  • + 0 comments
    def arrays(arr):
        return numpy.array(arr[::-1],float)
    
  • + 0 comments
    import numpy
    
    def arrays(arr):
        return numpy.array(arr, float)[::-1]
    
    arr = input().strip().split(' ')
    result = arrays(arr)
    print(result)
    
  • + 0 comments
    import numpy
    def arrays(arr):
        return numpy.array(list(reversed(arr)), float)
    arr = input().strip().split(' ')
    result = arrays(arr)
    print(result)
    
  • + 0 comments

    import numpy

    def arrays(arr): a = [] for i in range(len(arr)): a.append(arr[len(arr)-1-i]) return numpy.array(a, float)

    arr = input().strip().split(' ') result = arrays(arr) print(result)

  • + 0 comments
    import numpy
    
    def arrays(arr):
        l = arr[::-1]
        a = numpy.array(l, float)
        return a 
    
    arr = input().strip().split(' ')
    result = arrays(arr)
    print(result)