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

Function _fix_defaults

numpy/lib/recfunctions.py:344–355  ·  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

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

Callers 2

stack_arraysFunction · 0.85
join_byFunction · 0.85

Calls 1

itemsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…