We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
To demonstrate your point, I have provided the code below:
defarrays(arr):returnnumpy.array(numpy.flipud(arr),float)#usingnumpy.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)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Arrays
You are viewing a single comment's thread. Return to all comments →
Thanks @sheo_the_uncle
To demonstrate your point, I have provided the code below: