<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def bi_square(xx, idx=None):
 """ The bi-square weight function calculated over values of xx Parameters xx: float array Notes ----- This is the first equation on page 831 of [Cleveland79]. """


    ans = np.zeros(xx.shape)
    ans[idx] = (1-xx[idx]**2)**2
    return ans