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

Function _fix_output

numpy/lib/recfunctions.py:325–339  ·  view source on GitHub ↗

Private function: return a recarray, a ndarray, a MaskedArray or a MaskedRecords depending on the input parameters

(output, usemask=True, asrecarray=False)

Source from the content-addressed store, hash-verified

323
324
325def _fix_output(output, usemask=True, asrecarray=False):
326 """
327 Private function: return a recarray, a ndarray, a MaskedArray
328 or a MaskedRecords depending on the input parameters
329 """
330 if not isinstance(output, MaskedArray):
331 usemask = False
332 if usemask:
333 if asrecarray:
334 output = output.view(MaskedRecords)
335 else:
336 output = ma.filled(output)
337 if asrecarray:
338 output = output.view(recarray)
339 return output
340
341
342def _fix_defaults(output, defaults=None):

Callers 5

drop_fieldsFunction · 0.85
_keep_fieldsFunction · 0.85
append_fieldsFunction · 0.85
stack_arraysFunction · 0.85
join_byFunction · 0.85

Calls 2

viewMethod · 0.45
filledMethod · 0.45

Tested by

no test coverage detected