Skip to main content

Xarray is an open source project and Python package that provides a toolkit for working with labeled multi-dimensional arrays of data. Xarray is one of the core software packages used by the Pangeo Big Data geoscience research project.

Step-By-Step Guide

Installing Xarray on ArcGIS Notebook Server 10.8

  1. !conda update -y -n base -c defaults conda
  2. !conda install -y xarray

Installing Xarray on ArcGIS Notebook Server 10.7.1

ArcGIS 10.7.1 Notebook Server has a bug that doesn't allow Conda to be used to install Xarray. Instead, use pip to install Xarray.

  1. !pip install --upgrade pandas
  2. !pip install --upgrade netCDF4
  3. !pip install --upgrade bottleneck
  4. !pip install xarray
    Users may encounter the following error message that can be ignored:
    ERROR: fastai 1.0.50.post1 requires nvidia-ml-py3, which is not installed.
    NVDIA GPU enabled instance may help to get rid of the above warning.

Note: Use the following code to test xarray:
import xarray as xr
import numpy as np
data = xr.DataArray(np.random.randn(2, 3), dims=('x', 'y'), coords={'x': [10, 20]})
print(data)

Details

Last Updated

Published