Skip to content

Conversation

@pijucha
Copy link
Contributor

@pijucha pijucha commented Jul 21, 2016


safe_sort always raises on a mixed int-datetime array. This is the expected behaviour. (But, for numpy >= 1.10 & python2, I still have some doubts whether it's not a manifestation of an undefined behaviour.)

- Change test for Categorical.from_array
- Add test for safe_sort
- Change 2.7 build to latest numpy
expected = np.array([0, 1, 'a', 'b'], dtype=object)
expected_labels = np.array([3, 1, 0, 2, 3, -1, 1])
tm.assert_numpy_array_equal(result, expected)
tm.assert_numpy_array_equal(result_labels, expected_labels)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated. (These three lines where lost in #13514.)

@jreback jreback added the Compat pandas objects compatability with Numpy or Python functions label Jul 21, 2016
@jreback jreback added this to the 0.19.0 milestone Jul 21, 2016
@jreback
Copy link
Contributor

jreback commented Jul 21, 2016

closed by 622297c

thanks!

@jreback
Copy link
Contributor

jreback commented Jul 21, 2016

FYI we have pd._np_under* properties which know about numpy versions

@jreback jreback closed this Jul 21, 2016
@pijucha pijucha deleted the unsortable13714 branch July 22, 2016 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Compat pandas objects compatability with Numpy or Python functions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TST/BUG in test_categorical.py: test_constructor_unsortable breaks after recent commit

2 participants