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

Function _fix_defaults

numpy/lib/recfunctions.py:342–353  ·  view source on GitHub ↗

Update the fill_value and masked data of `output` from the default given in a dictionary defaults.

(output, defaults=None)

Source from the content-addressed store, hash-verified

340
341
342def _fix_defaults(output, defaults=None):
343 """
344 Update the fill_value and masked data of `output`
345 from the default given in a dictionary defaults.
346 """
347 names = output.dtype.names
348 (data, mask, fill_value) = (output.data, output.mask, output.fill_value)
349 for (k, v) in (defaults or {}).items():
350 if k in names:
351 fill_value[k] = v
352 data[k][mask[k]] = v
353 return output
354
355
356def _merge_arrays_dispatcher(seqarrays, fill_value=None, flatten=None,

Callers 2

stack_arraysFunction · 0.85
join_byFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected