MCPcopy Create free account
hub / github.com/numpy/numpy / _izip_records

Function _izip_records

numpy/lib/recfunctions.py:301–322  ·  view source on GitHub ↗

Returns an iterator of concatenated items from a sequence of arrays. Parameters ---------- seqarrays : sequence of arrays Sequence of arrays. fill_value : {None, integer} Value used to pad shorter iterables. flatten : {True, False}, Whether to

(seqarrays, fill_value=None, flatten=True)

Source from the content-addressed store, hash-verified

299
300
301def _izip_records(seqarrays, fill_value=None, flatten=True):
302 """
303 Returns an iterator of concatenated items from a sequence of arrays.
304
305 Parameters
306 ----------
307 seqarrays : sequence of arrays
308 Sequence of arrays.
309 fill_value : {None, integer}
310 Value used to pad shorter iterables.
311 flatten : {True, False},
312 Whether to
313 """
314
315 # Should we flatten the items, or just use a nested approach
316 if flatten:
317 zipfunc = _izip_fields_flat
318 else:
319 zipfunc = _izip_fields
320
321 for tup in itertools.zip_longest(*seqarrays, fillvalue=fill_value):
322 yield tuple(zipfunc(tup))
323
324
325def _fix_output(output, usemask=True, asrecarray=False):

Callers 1

merge_arraysFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected