I'm tempted to suggest the vertorized form:

```
    order = ((window - 1) // 2 ) + 1
    
    nwts = 2 * order + 1
    w = np.zeros([nwts])
    n = nwts / 2
    w[n] = 2 * cutoff
    
    k = np.arange(1., n)
    sigma = np.sin(np.pi * k / n) * n / (np.pi * k)
    firstfactor = np.sin(2. * np.pi * cutoff * k) / (np.pi * k)
    
    w[n-1:0:-1] = firstfactor * sigma
    w[n+1:-1] = firstfactor * sigma
    
    return w[1:-1]
```

I think the two are equivalent (note I've added the integer division in the ```order``` statement)