Skip to main content

Interface for using cubed with xarray for parallel computation.

Project description

Note: this is a proof-of-concept, and many things are incomplete, untested, or don't work.

cubed-xarray

Interface for using cubed with xarray.

Requirements

Cubed version >v0.6.0

Xarray pull request #7019

Installation

Install via pip.

Importing

You don't need to import this package in user code. Once pip install-ed, xarray should automatically become aware of this package via the magic of entrypoints.

Usage

Xarray objects backed by cubed arrays can be created either by:

  1. Passing existing cubed.Array objects to the data argument of xarray constructors,
  2. Calling .chunk on xarray objects,
  3. Passing a chunks argument to xarray.open_dataset.

In (2) and (3) the choice to use cubed.Array instead of dask.array.Array is made by passing the keyword argument chunked_array_type='cubed'. To pass arguments to the constructor of cubed.Array then pass them via the dictionary from_array_kwargs, e.g. from_array_kwargs={'spec': cubed.Spec(max_mem=2_000_000)}.

If cubed and cubed-xarray are installed but dask is not, then specifying the parallel array type to use is not necessary.

Tests

Integration tests for wrapping cubed with xarray also live in this repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cubed-xarray-0.0.3.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

cubed_xarray-0.0.3-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file cubed-xarray-0.0.3.tar.gz.

File metadata

  • Download URL: cubed-xarray-0.0.3.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for cubed-xarray-0.0.3.tar.gz
Algorithm Hash digest
SHA256 51c1f493ca0f3461e4144971d8896b04670021a51e28261ab34b7c491cbd1df8
MD5 0eda35dfcb738b7c5eafd9e2c65590e7
BLAKE2b-256 59bd2fdc5c91092e73cef20affc3f9d84c074c8807303103a7dcc6de1bce9c7e

See more details on using hashes here.

File details

Details for the file cubed_xarray-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for cubed_xarray-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 109652e7e2bb374af9bf13b188c9ab80717111795ae8c2ab048bc90ce319cc6d
MD5 96600db83c6f3deb8ada6ca649e3a967
BLAKE2b-256 a2aee9187d4300549e20039233c6ba2e1e5c33f5f977951027865dc1456a8bc1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page