@@ -207,7 +207,7 @@ def take_1d(arr, indexer, out=None, fill_value=np.nan):
207
207
if not out_passed :
208
208
out = np .empty (n , dtype = arr .dtype )
209
209
else :
210
- out = _ndtake (arr , indexer , out = out )
210
+ out = ndtake (arr , indexer , out = out )
211
211
if mask .any ():
212
212
if out_passed :
213
213
raise Exception ('out with dtype %s does not support NA' %
@@ -219,7 +219,7 @@ def take_1d(arr, indexer, out=None, fill_value=np.nan):
219
219
out = np .empty (n , dtype = arr .dtype )
220
220
take_f (arr , _ensure_int64 (indexer ), out = out , fill_value = fill_value )
221
221
else :
222
- out = _ndtake (arr , indexer , out = out )
222
+ out = ndtake (arr , indexer , out = out )
223
223
mask = indexer == - 1
224
224
if mask .any ():
225
225
if out_passed :
@@ -283,7 +283,7 @@ def take_2d(arr, indexer, out=None, mask=None, needs_masking=None, axis=0,
283
283
284
284
if needs_masking :
285
285
# upcasting may be required
286
- result = _ndtake (arr , indexer , axis = axis , out = out )
286
+ result = ndtake (arr , indexer , axis = axis , out = out )
287
287
result = _maybe_mask (result , mask , needs_masking , axis = axis ,
288
288
out_passed = out is not None ,
289
289
fill_value = fill_value )
@@ -309,13 +309,13 @@ def take_2d(arr, indexer, out=None, mask=None, needs_masking=None, axis=0,
309
309
if out is not None and arr .dtype != out .dtype :
310
310
arr = arr .astype (out .dtype )
311
311
312
- result = _ndtake (arr , indexer , axis = axis , out = out )
312
+ result = ndtake (arr , indexer , axis = axis , out = out )
313
313
result = _maybe_mask (result , mask , needs_masking , axis = axis ,
314
314
out_passed = out is not None ,
315
315
fill_value = fill_value )
316
316
return result
317
317
318
- def _ndtake (arr , indexer , axis = 0 , out = None ):
318
+ def ndtake (arr , indexer , axis = 0 , out = None ):
319
319
return arr .take (_ensure_platform_int (indexer ), axis = axis , out = out )
320
320
321
321
def mask_out_axis (arr , mask , axis , fill_value = np .nan ):
@@ -331,7 +331,7 @@ def take_fast(arr, indexer, mask, needs_masking, axis=0, out=None,
331
331
needs_masking = needs_masking ,
332
332
axis = axis , fill_value = fill_value )
333
333
indexer = _ensure_platform_int (indexer )
334
- result = _ndtake (arr , indexer , axis = axis , out = out )
334
+ result = ndtake (arr , indexer , axis = axis , out = out )
335
335
result = _maybe_mask (result , mask , needs_masking , axis = axis ,
336
336
out_passed = out is not None , fill_value = fill_value )
337
337
return result
0 commit comments