From 4f070d9de4bfcf1e766b0166742cc1655670760f Mon Sep 17 00:00:00 2001 From: Colin Snyder <8csnyder@gmail.com> Date: Mon, 15 Jul 2019 19:36:05 -0700 Subject: Removed unnecessary decorators and dispatcher functions --- numpy/lib/recfunctions.py | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'numpy/lib/recfunctions.py') diff --git a/numpy/lib/recfunctions.py b/numpy/lib/recfunctions.py index a2ee19c6b..2f82d01cc 100644 --- a/numpy/lib/recfunctions.py +++ b/numpy/lib/recfunctions.py @@ -207,11 +207,6 @@ def flatten_descr(ndtype): return tuple(descr) -def _zip_dtype_dispatcher(seqarrays, flatten=None): - return seqarrays - - -@array_function_dispatch(_zip_dtype_dispatcher) def _zip_dtype(seqarrays, flatten=False): newdtype = [] if flatten: @@ -228,7 +223,6 @@ def _zip_dtype(seqarrays, flatten=False): return np.dtype(newdtype) -@array_function_dispatch(_zip_dtype_dispatcher) def _zip_descr(seqarrays, flatten=False): """ Combine the dtype description of a series of arrays. @@ -321,11 +315,6 @@ def _izip_fields(iterable): yield element -def _izip_records_dispatcher(seqarrays, fill_value=None, flatten=None): - return seqarrays - - -@array_function_dispatch(_izip_records_dispatcher) def _izip_records(seqarrays, fill_value=None, flatten=True): """ Returns an iterator of concatenated items from a sequence of arrays. @@ -987,11 +976,7 @@ def structured_to_unstructured(arr, dtype=None, copy=False, casting='unsafe'): # finally is it safe to view the packed fields as the unstructured type return arr.view((out_dtype, (sum(counts),))) -def _unstructured_to_structured_dispatcher(arr, dtype=None, names=None, - align=None, copy=None, casting=None): - return (arr,) -@array_function_dispatch(_unstructured_to_structured_dispatcher) def _unstructured_to_structured(arr, dtype=None, names=None, align=False, copy=False, casting='unsafe'): """ -- cgit v1.2.1