idxmax, idxmin inconsistency
Don't know if this is a bug or my code...

python 2.7.5
anaconda 1.8.0
pandas 12.0
numpy 1.7.1

What seems to be occurring: DataFrame.idxmax/idxmin functions work or not depending on how the DataFrame object is created...

This works:   **************************************
In [2]: df = pandas.DataFrame( {1:[1,2,3], 2:[4,5,6], 3:[7,8,9]}, index=[5,6,7])
In [3]: df
Out[3]:
   1  2  3
5  1  4  7
6  2  5  8
7  3  6  9

In [4]: df.idxmax()
Out[4]:
1    7
2    7
3    7
dtype: int64

---

(the above also works for float values as well...)

This does not:   ****************************************
def priors(self, tree):                                          # most of code that creates object 
        priors = pandas.DataFrame(index=vps, columns=nps)    # instantiate pandas.DataFrame...
        for np in nps:                                                            # calculate its values...
            for vp in vps:
                np_prob = stats.beta.cdf(np / chs, self._sb_alpha, self._sb_beta) - \
                        stats.beta.cdf((np-1) / chs, self._sb_alpha, self._sb_beta)
                vp_prob = stats.beta.cdf(vp / chs, self._vb_alpha, self._vb_beta) - \
                        stats.beta.cdf((vp-1) / chs, self._vb_alpha, self._vb_beta)
                priors[np][vp] = np_prob \* vp_prob
        norm = priors.sum().sum()
        for np in nps:
            for vp in vps:
                priors[np][vp] = priors[np][vp] / norm
        return priors                                                               # return it

In [15]: pr = st.priors(trees[1])
In [16]: pr                             # there is definitely a DataFrame object there
Out[16]:
          1          2           7            11
3  0.4865759  0.2130292  0.06304571    0.0164135
8  0.1379886  0.0604132   0.0178792  0.004654722

In [18]: type(pr)                      # its type is correct
Out[18]: pandas.core.frame.DataFrame
In [20]: type(pr[1][3])               # the type of its values is correct
Out[20]: numpy.float64
In [29]: pr.max()                      # other related functions work
Out[29]:
1     0.486576
2     0.213029
7     0.063046
11    0.016413
dtype: float64

In [23]: pr.idxmax()                   # but idxmax (and idxmin) result in this error
TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

---
