Skip to content

Commit 8cef96b

Browse files
committed
Note for failing numpy.unique and fix for pandas.Series NameError
1 parent 06296b1 commit 8cef96b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

doc/source/comparison_with_r.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ this:
9999
.. ipython:: python
100100
101101
s = pd.Series(np.arange(5),dtype=np.float32)
102-
Series(pd.match(s,[2,4],np.nan))
102+
pd.Series(pd.match(s,[2,4],np.nan))
103103
104104
For more details and examples see :ref:`the reshaping documentation
105105
<indexing.basics.indexing_isin>`.

doc/source/reshaping.rst

+5
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,11 @@ To encode 1-d values as an enumerated type use ``factorize``:
436436
Note that ``factorize`` is similar to ``numpy.unique``, but differs in its
437437
handling of NaN:
438438

439+
.. note::
440+
The following ``numpy.unique`` will fail under Python 3 with a ``TypeError``
441+
because of an ordering bug. See also
442+
`Here <https://github.com/numpy/numpy/issues/641>`__
443+
439444
.. ipython:: python
440445
441446
pd.factorize(x, sort=True)

0 commit comments

Comments
 (0)