Fix type error in example code

Fix #971.

Note that this is no complete fix, because this solution uses an operator which is not any more described in the guide for 0.13.

Also note that I didn't do any further testing compared to the example I've shown in #971.