Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(16)  |  Call(12)  |  Derive(0)  |  Import(4)

src/s/y/sympy-polys-HEAD/sympy/core/sets.py   sympy-polys(Download)
from basic import Basic
from singleton import SingletonMeta, S
from evalf import EvalfMixin
from sympify import _sympify
from sympy.mpmath import mpi, mpf
    def _eval_evalf(self, prec):
        return mpi(mpf(self.start.evalf(prec)), mpf(self.end.evalf(prec)))
 
    def _is_comparable(self, other):
        is_comparable = self.start.is_comparable

src/s/y/sympy-HEAD/sympy/core/tests/test_wester.py   sympy(Download)
from sympy.utilities.pytest import XFAIL, slow
from sympy.utilities.iterables import partitions
from sympy.mpmath import mpi, mpc
from sympy.physics.quantum import Commutator
from sympy.assumptions import assuming
def test_D12():
    assert (mpi(-4, 2) * x + mpi(1, 3)) ** 2 == mpi(-8, 16)*x**2 + mpi(-24, 12)*x + mpi(1, 9)
 
 
@XFAIL

src/s/y/sympy-HEAD/sympy/core/tests/test_sets.py   sympy(Download)
    FiniteSet, Intersection
)
from sympy.mpmath import mpi
 
from sympy.utilities.pytest import raises
def test_interval_to_mpi():
    assert Interval(0, 1).to_mpi() == mpi(0, 1)
    assert Interval(0, 1, True, False).to_mpi() == mpi(0, 1)
    assert type(Interval(0, 1).to_mpi()) == type(mpi(0, 1))
 

src/s/y/sympy-polys-HEAD/sympy/core/tests/test_sets.py   sympy-polys(Download)
from sympy import (
    Symbol, Set, Union, Interval, oo, S,
    Inequality, max_, min_, raises, And, Or
)
from sympy.mpmath import mpi
def test_interval_evalf():
    assert Interval(0, 1).evalf() == mpi(0, 1)
    assert Interval(0, 1, True, False).evalf() == mpi(0, 1)
 
def test_measure():

src/s/y/sympy-HEAD/sympy/utilities/tests/test_lambdify.py   sympy(Download)
    func2 = lambdify((), expr, modules="mpmath", printer=IntervalPrinter())
 
    mpi = type(mpmath.mpi(1, 2))
 
    assert isinstance(func0(), mpi)