In this HackerRank Arrays in python problem solution, You are given a space-separated list of numbers. Your task is to print a reversed NumPy array with the element type float.
HackerRank Arrays in python problem solution
import numpy
L = list(map(float, input().split()))[::-1]
print(numpy.array(L, float))
import numpy as np
N= np.array(map(float, reversed(raw_input().split())))
print N
0 Comments