brainscore_language.utils.xarray

Functions

collapse_multidim_coord(xr_obj, coord, keep_dim)

As a result of iterative construction of `xarray`s in our various functions

copy_metadata(target, source, dim)

copies the metadata coordinates of a source xarray on dimension dim over to target xarray

fix_xr_dtypes(xr_obj)

sometimes xarrays end up having dtype='O' (object) instead of the expected dtypes, which is usually 'str'