File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -343,6 +343,7 @@ Performance improvements
343343- Performance improvement in :meth: `DataFrame.replace ` when provided a list of values to replace (:issue: `28099 `)
344344- Performance improvement in :meth: `DataFrame.select_dtypes ` by using vectorization instead of iterating over a loop (:issue: `28317 `)
345345- Performance improvement in :meth: `Categorical.searchsorted ` and :meth: `CategoricalIndex.searchsorted ` (:issue: `28795 `)
346+ - Performance improvement when searching for a scalar in a :meth: `Categorical ` and the scalar is not found in the categories (:issue: `29750 `)
346347
347348.. _whatsnew_1000.bug_fixes :
348349
Original file line number Diff line number Diff line change @@ -133,9 +133,9 @@ def f(self, other):
133133 return ret
134134 else :
135135 if opname == "__eq__" :
136- return np .repeat ( False , len (self ))
136+ return np .zeros ( len (self ), dtype = bool )
137137 elif opname == "__ne__" :
138- return np .repeat ( True , len (self ))
138+ return np .ones ( len (self ), dtype = bool )
139139 else :
140140 msg = (
141141 "Cannot compare a Categorical for op {op} with a "
You can’t perform that action at this time.
0 commit comments