Thanks for catching this bug (for scalar values of k & n). This fix is a big improvement (in that it works!) but it still will give surprisingly shaped results: For example, if k and n are both 0-d numpy arrays, I think this will yield a 2-d array (result will not be `squeeze`d) whereas I'd expect a 1-d array. If k is a python float and n is a single-element 1-d array, the result will be a 1-d array, whereas I'd expect a 2-d array. (Correct me if I'm wrong on either of these...)

The later problem can be fixed by testing both `k` and `n` for scalarness and only squeezing if both are scalar. The former problem is less important because who uses 0-d numpy arrays?! Could fix it by explicitly testing for 0-d arrays or by doing `np.asarray()` then testing for dimension > 0.