Skip to content
Snippets Groups Projects
Commit 40b6376b authored by Gordian Edenhofer's avatar Gordian Edenhofer Committed by Martin Reinecke
Browse files

operator.py: Raise not-implemented in matmul call

Contrary to other overloaded operators, the `__matmul__` call apparently
needs to raise an exception instead of returning `NotImplemented`. This
behaviour can be seen for example in:

```python
psp = ift.RGSpace(512)
m = ift.MaskOperator(ift.Field.from_raw(psp, np.random.randint(0, 2, 512)))
m(ift.from_random("normal", m.domain).val) is NotImplemented
```

which should be invalid and raise an exception but previously returned
`True` instead.
parent f9ca9bad
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment