⚠️ Our 0.1 release refactored several early-development functions for long-term stability, to update your code see here. ⚠️
Future changes will come with deprecation warnings! 🙂



Raster.__array_ufunc__(ufunc, method, *inputs, **kwargs)[source]#

Method to cast NumPy universal functions directly on Raster classes, by passing to the masked array. This function basically applies the ufunc (with its method and kwargs) to .data, and rebuilds the Raster from self.__class__. The cases separate the number of input nin and output nout, to properly feed .data and return Raster objects. See more details in NumPy doc, e.g., https://numpy.org/doc/stable/user/basics.dispatch.html#basics-dispatch.

Return type:

Raster | tuple[Raster, Raster]