1. Help Center
  2. Python Programming

How will you reverse the numpy array using one line of code?

This can be done as shown in the following:
 
reversed_array = arr[::-1]
where arr = original given array, reverse_array is the resultant after reversing all elements in the input.