Skip to content

Add to_array, to_datasetΒ #6

@dcherian

Description

@dcherian
def to_dataset(self, dim) -> Collection:
	ds = xr.concat(self.values(), dim=dim)
	ds[dim] = self.keys()
	return ds
def to_array(self, dim) -> Collection:
	# check that all datasets only contain one array.
	da =  xr.concat(self.values(), dim=dim)
	da[dim] = self.keys()
	return da

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    🌳 Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions