Skip to content

AttributeError: module 'xarray' has no attribute 'ufuncs'

I get this AttributeError in psy_transect/utils.py (line 524), in select_level selection = xr.ufuncs.fabs(coord - level).argmin(dim) when running ds.psy.plot.horizontal_maptransect(...).

I think it is connected to the change Xarray’s ufuncs have been removed, now that they can be replaced by numpy’s ufuncs in all supported versions of numpy. By [Maximilian Roos](https://github.com/max-sixty). in xarray v2022.06.0rc0, see https://docs.xarray.dev/en/stable/whats-new.html.

I hope this can easily be resolved!