ENH: Let other data structures through funcs in core/fromnumeric.py #160

wants to merge 2 commits into


None yet

4 participants


The functions choke on data structures that define their own methods of the same name but with a different API such as pandas.


I +1 this sentiment, although I don't know about any adverse effects this may cause.


I'd suggest moving this line up outside of the try/except, as any errors this function raises should not be trapped.

I wasn't sure about this, so I put it here. If asanyarray is called outside the try/except, then if it passes, everything will already have a std method, for example. If it doesn't pass, it will raise an error. But if it's in try, the raised error is caught and then it tries _wrapit.


along the same lines as moving the asanyarray up out of the try/except, this line should probably go down below the except for the same reason. (I know you didn't put this here, probably I did while adding std support for NA)

mwiebe commented on 9d750f6 Sep 17, 2011

This also needs tests which exercise the new code in cases which failed before before it can be merged.

Added a test.

charris commented Oct 2, 2011

The test{s} looks a bit sparse. The object should be to make sure that all the changes work as expected.

jseabold commented Oct 3, 2012

Kicking this can down the road and closing the PR.

@jseabold jseabold closed this Oct 3, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment