Did I find the right examples for you? yes no

# sympy

All Samples(380)  |  Call(0)  |  Derive(0)  |  Import(380)
```SymPy is a Python library for symbolic mathematics. It aims to become a
full-featured computer algebra system (CAS) while keeping the code as
simple as possible in order to be comprehensible and easily extensible.
SymPy is written entirely in Python and does not require any external
libraries, except optionally for plotting support.

```

```import logging
import operator
import sympy
from sympy.printing.latex import LatexPrinter
from sympy.printing.str import StrPrinter
```
```
from xml.sax.saxutils import unescape
import sympy
import unicodedata
from lxml import etree
```

```            True
"""
import sympy
return sympy.pi

```
```            False
"""
import sympy
return sympy.nan

```
```            True
"""
import sympy
return sympy.GoldenRatio

```
```            True
"""
import sympy
return sympy.EulerGamma

```
```            True
"""
import sympy
return sympy.Catalan

```

```                return v

import sympy

#### build substitution dict
```
```        of_eqs = [eq for eq in dmodel.equations if eq.tags['eq_type'] in ('f','arbitrage')]
locals = {}
import sympy
locals['inf'] = sympy.Symbol('inf')
locals['log'] = sympy.log # this should be more generic
```
```            sub_list[v] = 'p({0})'.format(i+1)

import sympy
sub_list[sympy.Symbol('inf')] = 'Inf'

```

```from sympy import *

import sympy,numpy,sys

set_main(sys.modules[__name__])
```

```
from dolo import Equation
import sympy

def standardize_portfolio_model(model_pf):
```
```    from copy import copy, deepcopy

import sympy

from dolo.misc.modfile import dynare_import
```

```        sub_list[p] = '{0}({1})'.format('p',i+1)

import sympy
sub_list[sympy.Symbol('inf')] = 'inf'

```
```if __name__ == '__main__':

import sympy
from pprint import pprint

```

```        sub_list[p] = '{0}[{1}]'.format('p',i+1)

import sympy
sub_list[sympy.Symbol('inf')] = 'inf'

```
```if __name__ == '__main__':

import sympy
from pprint import pprint

```

```    def read_model(self):

import re
import sympy
from dolo.symbolic.symbolic import map_function_to_expression
```
```    def process_output_recs(self):
'''Main function that formats the model in recs format'''
import sympy
from dolo.compiler.common import DicPrinter
from dolo.misc.matlab import value_to_mat
```

```
"""
import sympy
return -sympy.oo

```
```            True
"""
import sympy
return sympy.oo

```

```    can be printed with LaTeX.
"""
import sympy
if isinstance(o, (list, tuple, set, frozenset)):
return all(can_print_latex(i) for i in o)
```
```def load_ipython_extension(ip):