<SYSTEM_TASK:>
Given the following text problem statement, write Python code to implement the functionality described below in problem statement
<END_TASK>
<USER_TASK:>
Problem:
Is it possible to perform circular cross-/auto-correlation on 1D arrays with a numpy/scipy/matplotlib function? I have looked at numpy.correlate() and matplotlib.pyplot.xcorr (based on the numpy function), and both seem to not be able to do circular cross-correlation.
<ASSISTANT_TASK:>
Python Code:
import numpy as np
a = np.array([1,2,3,4])
b = np.array([5, 4, 3, 2])
result = np.correlate(a, np.hstack((b[1:], b)), mode='valid')
<END_TASK>