From: Vivien Maisonneuve Date: Tue, 1 Jul 2014 14:29:15 +0000 (+0200) Subject: Add diamond example X-Git-Tag: 1.0~180 X-Git-Url: https://scm.cri.ensmp.fr/git/linpy.git/commitdiff_plain/1b9c772ffc21a71d146a093537d371d63be16c75?ds=inline;hp=7db03eb9ea6c6d0a3896d8682b64fd404a833e92 Add diamond example --- diff --git a/examples/diamond.py b/examples/diamond.py new file mode 100755 index 0000000..148cdca --- /dev/null +++ b/examples/diamond.py @@ -0,0 +1,9 @@ +#!/usr/bin/env python3 + +from pypol import * + +x, y = symbols('x y') +diam = Ge(y, x - 1) & Le(y, x + 1) & Ge(y, -x - 1) & Le(y, -x + 1) +print('diamond:', diam) +print('projected on x:', diam.drop_dims('y')) +