MCPcopy Index your code
hub / github.com/numpy/numpy / _fix_output

Function _fix_output

numpy/lib/recfunctions.py:327–341  ·  view source on GitHub ↗

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

(output, usemask=True, asrecarray=False)

Source from the content-addressed store, hash-verified

325
326
327def _fix_output(output, usemask=True, asrecarray=False):
328 """
329 Private function: return a recarray, an ndarray, a MaskedArray
330 or a MaskedRecords depending on the input parameters
331 """
332 if not isinstance(output, ma.MaskedArray):
333 usemask = False
334 if usemask:
335 if asrecarray:
336 output = output.view(mrec.MaskedRecords)
337 else:
338 output = ma.filled(output)
339 if asrecarray:
340 output = output.view(np.recarray)
341 return output
342
343
344def _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

Used in the wild real call sites across dependent graphs

searching dependent graphs…