We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We would like to be able to support operations like this:
im1 = Raster(...) im2 = Raster(...) combined = im1 + im2
At the moment, this requires a fairly unsemantic approach:
combined = im1.copy() combined.data = combined.data + im2.data
Proposal: add operator overloading methods to the Raster class, e.g. __add__, __multiply__. See e.g. https://stackabuse.com/overloading-functions-and-operators-in-python/ for more info.
Raster
__add__
__multiply__
The text was updated successfully, but these errors were encountered:
Now done for add/sub and neg with PR #173. Still waiting to add mult/div to close this issue.
Sorry, something went wrong.
See https://docs.python.org/3/reference/datamodel.html#emulating-numeric-types for a list of arithmetic operations that can be overloaded, as well as for the difference between e.g __add__ and __radd__.
__radd__
Closed via #257
adehecq
No branches or pull requests
We would like to be able to support operations like this:
At the moment, this requires a fairly unsemantic approach:
Proposal: add operator overloading methods to the
Raster
class, e.g.__add__
,__multiply__
. See e.g. https://stackabuse.com/overloading-functions-and-operators-in-python/ for more info.The text was updated successfully, but these errors were encountered: