new

method of dascore.io.tdms.core.Patch source

new(
    self: Patch ,
    data: None | numpy.__array_like._SupportsArray[numpy.dtype[Any]] | numpy.__nested_sequence._NestedSequence[numpy.__array_like._SupportsArray[numpy.dtype[Any]]] | bool | int | float | <class ’complex | str | <class ’bytes | numpy.__nested_sequence._NestedSequence[bool | int | float | <class ’complex | str | <class ’bytes] ,
    coords: None | dict[str | Sequence[str], numpy.__array_like._SupportsArray[numpy.dtype[Any]] | numpy.__nested_sequence._NestedSequence[numpy.__array_like._SupportsArray[numpy.dtype[Any]]] | bool | int | float | <class ’complex | str | <class ’bytes | numpy.__nested_sequence._NestedSequence[bool | int | float | <class ’complex | str | <class ’bytes]] ,
    dims: None | Sequence[str] ,
    attrs: None | Mapping ,
)-> ‘PatchType’

Return a copy of the Patch with updated data, coords, dims, or attrs.

Parameters

Parameter Description
data An array-like containing data, an xarray DataArray object, or a Patch.
coords The coordinates, or dimensional labels for the data. These can be passed in three forms: {coord_name: data} {coord_name: ((dimensions,), data)} {coord_name: (dimensions, data)}
dims A sequence of dimension strings. The first entry cooresponds to the first axis of data, the second to the second dimension, and so on.
attrs Optional attributes (non-coordinate metadata) passed as a dict.