diff --git a/__pycache__/shiroindev.cpython-37.pyc b/__pycache__/shiroindev.cpython-37.pyc index d2c6f2f..23cc25b 100644 Binary files a/__pycache__/shiroindev.cpython-37.pyc and b/__pycache__/shiroindev.cpython-37.pyc differ diff --git a/examples.ipynb b/examples.ipynb index 4a51155..6c39d63 100644 --- a/examples.ipynb +++ b/examples.ipynb @@ -4,7 +4,18 @@ "cell_type": "code", "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/grzegorz/shiroindev/shiroindev.py:42: DeprecationWarning: invalid escape sequence \\^\n", + " formula=re.sub('\\^{(.)}',r'^\\1',latex(formula,fold_short_frac=True).replace(' ','').replace('\\\\left(','(').replace('\\\\right)',')'))\n", + "/home/grzegorz/shiroindev/shiroindev.py:43: DeprecationWarning: invalid escape sequence \\{\n", + " return re.sub('\\{(\\(.+?\\))\\}',r'\\1',formula)\n" + ] + } + ], "source": [ "from shiroindev import *\n", "sSeed=1" @@ -758,8 +769,8 @@ "status: 0\n", "From weighted AM-GM inequality:\n", "$$2a^2b^2c^3d \\le a^3bc^2d^2+ab^3c^4$$\n", - "$$4a^2bc^3d \\le a^3bc^2d^2+a^3c^2d^2+ab^3c^4+ac^4$$\n", "$$2a^2c^3d \\le a^3c^2d^2+ac^4$$\n", + "$$4a^2bc^3d \\le a^3bc^2d^2+a^3c^2d^2+ab^3c^4+ac^4$$\n", "\n", "$$ 0 \\le \n", "4a^3bcd^3+2a^3bd^4+2a^3cd^3+2a^2b^2cd^3+4a^2bc^2d^2+12a^2bcd^3+6a^2bd^4+4a^2c^2d^2+6a^2cd^3+4ab^3c^3d+2ab^3c^2d^2+6ab^2c^4+8ab^2c^3d+4ab^2c^2d^2+4ab^2cd^3+6abc^4+4abc^3d+6abc^2d^2+12abcd^3+6abd^4+4ac^2d^2+6acd^3+2b^3c^3d+2b^3c^2d^2+4b^2c^3d+4b^2c^2d^2+2b^2cd^3+2bc^3d+4bc^2d^2+4bcd^3+2bd^4+2c^2d^2+2cd^3 $$\n", diff --git a/shiroindev.py b/shiroindev.py index ca1e3c2..c811989 100644 --- a/shiroindev.py +++ b/shiroindev.py @@ -1,4 +1,6 @@ -from __future__ import print_function +from __future__ import (absolute_import, division, + print_function, unicode_literals) +from builtins import * import warnings,operator warnings.filterwarnings("ignore") #Seed is needed to select the weights in linprog function.