import dascore as dc
patch = dc.get_example_patch()
# Get a patch identical to original but with data array containing
# Only 1s.
one_patch = patch.full(1.0)
# Same thing, except for 0s.
zero_patch = patch.full(0.0)Full
Full(
*args ,
fill_value: Any ,
)-> None
Return an identical patch with the data replaced by fill_value.
Parameters
| Parameter | Description |
|---|---|
| patch | The patch to fill. |
| fill_value | The value in the output patch. |
Examples
Methods
| Name | Description |
|---|---|
| check | Refuse a patch which does not carry what the operation needs. |
| get_metadata |
Return the result’s metadata and the arguments kernel needs.
|
| kernel | Return an array of the data’s shape holding only the fill value. |
| model_copy | Copy the model, dropping cached values the update invalidates. |
| new | Create new instance with some attributed updated. |
| full | Return an identical patch with the data replaced by fill_value. |
| reconcile | Return metadata or a patch holding the final data; default as is. |
| run | Run the operation: check, get_metadata, kernel, reconcile, record. |