Question #3:
Write a NumPy program to combine the last element with the first element of two given ndarrays with different shapes.
In[0]:
import numpy as np
array1 = ['PHP', 'JS', 'C++']
array2 = ['Python', 'C#', 'NumPy']
print("Original arrays:")
print(array1)
print(array2)
result = # TO DO -- Complete the Code
print("After Combining:")
print(result)
Original arrays:
['PHP', 'JS', 'C++']
['Python', 'C#', 'NumPy']
After Combining:
['C++', 'Python']