This is an easy way to compute the "correct" (and backwards compatible) result in the degenerate cases, without creating the spurious warning that the 0.12.0 version generates.

    >>> chisquare([])
    (0.0, nan)
    >>> null = np.array([[],[],[]])
    >>> chisquare(null)
    (array([], dtype=float64), array([], dtype=float64))
    >>> chisquare(null.T)
    (array([ 0.,  0.,  0.]), array([ nan,  nan,  nan]))