MCPcopy Index your code
hub / github.com/pydata/xarray / store

Method store

xarray/backends/common.py:502–539  ·  view source on GitHub ↗

Top level method for putting data on this store, this method: - encodes variables/attributes - sets dimensions - sets variables Parameters ---------- variables : dict-like Dictionary of key/value (variable name / xr.Variable

(
        self,
        variables,
        attributes,
        check_encoding_set=frozenset(),
        writer=None,
        unlimited_dims=None,
    )

Source from the content-addressed store, hash-verified

500 self.store(dataset, dataset.attrs)
501
502 def store(
503 self,
504 variables,
505 attributes,
506 check_encoding_set=frozenset(),
507 writer=None,
508 unlimited_dims=None,
509 ):
510 """
511 Top level method for putting data on this store, this method:
512 - encodes variables/attributes
513 - sets dimensions
514 - sets variables
515
516 Parameters
517 ----------
518 variables : dict-like
519 Dictionary of key/value (variable name / xr.Variable) pairs
520 attributes : dict-like
521 Dictionary of key/value (attribute name / attribute) pairs
522 check_encoding_set : list-like
523 List of variables that should be checked for invalid encoding
524 values
525 writer : ArrayWriter
526 unlimited_dims : list-like
527 List of dimension names that should be treated as unlimited
528 dimensions.
529 """
530 if writer is None:
531 writer = ArrayWriter()
532
533 variables, attributes = self.encode(variables, attributes)
534
535 self.set_attributes(attributes)
536 self.set_dimensions(variables, unlimited_dims=unlimited_dims)
537 self.set_variables(
538 variables, check_encoding_set, writer, unlimited_dims=unlimited_dims
539 )
540
541 def set_attributes(self, attributes):
542 """

Callers 2

store_datasetMethod · 0.95
syncMethod · 0.45

Calls 5

encodeMethod · 0.95
set_attributesMethod · 0.95
set_dimensionsMethod · 0.95
set_variablesMethod · 0.95
ArrayWriterClass · 0.85

Tested by

no test coverage detected