Sure:

[koslowski@host ~]$ PYTHONHASHSEED=123 ipython3
Python 3.3.2 (default, Dec  4 2014, 12:49:00)
Type "copyright", "credits" or "license" for more information.

IPython 2.3.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: from sympy.stats import Normal, P

In [2]: N0 = Normal('N0', 0, 1)

In [3]: P(N0 <= 1.1)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-3-38fe444a5c96> in <module>()
----> 1 P(N0 <= 1.1)

/usr/lib/python3.3/site-packages/sympy/stats/rv.py in
probability(condition, given_condition, numsamples, evaluate, **kwargs)
    615
    616     # Otherwise pass work off to the ProbabilitySpace
--> 617     result = pspace(condition).probability(condition, **kwargs)
    618     if evaluate and hasattr(result, 'doit'):
    619         return result.doit()

/usr/lib/python3.3/site-packages/sympy/stats/crv.py in probability(self,
condition, **kwargs)
    294         # Univariate case can be handled by where
    295         try:
--> 296             domain = self.where(condition)
    297             rv = [rv for rv in self.values if rv.symbol ==
domain.symbol][0]
    298             # Integrate out all other random variables

/usr/lib/python3.3/site-packages/sympy/stats/crv.py in where(self,
condition)
    320         rv = tuple(rvs)[0]
    321         interval = reduce_rational_inequalities_wrap(condition, rv)
--> 322         interval = interval.intersect(self.domain.set)
    323         return SingleContinuousDomain(rv.symbol, interval)
    324

/usr/lib/python3.3/site-packages/sympy/sets/sets.py in intersect(self,
other)
     93
     94         """
---> 95         return Intersection(self, other)
     96
     97     def intersection(self, other):

/usr/lib/python3.3/site-packages/sympy/sets/sets.py in __new__(cls, *args,
**kwargs)
   1285         # Reduce sets using known rules
   1286         if evaluate:
-> 1287             return Intersection.reduce(args)
   1288
   1289         args = list(ordered(args, Set._infimum_key))

/usr/lib/python3.3/site-packages/sympy/sets/sets.py in reduce(args)
   1370                 new_args = False
   1371                 for t in args - set((s,)):
-> 1372                     new_set = s._intersect(t)
   1373                     # This returns None if s does not know how to
intersect
   1374                     # with t. Returns the newly intersected set
otherwise

/usr/lib/python3.3/site-packages/sympy/sets/sets.py in _intersect(self,
other)
    818         if self.start <= other.end and other.start <= self.end:
    819             # Get topology right.
--> 820             if self.start < other.start:
    821                 start = other.start
    822                 left_open = other.left_open

/usr/lib/python3.3/site-packages/sympy/core/relational.py in
__nonzero__(self)
    101
    102     def __nonzero__(self):
--> 103         raise TypeError("cannot determine truth value of\n%s" %
self)
    104
    105     __bool__ = __nonzero__

TypeError: cannot determine truth value of
-oo < -inf

In [4]: P(N0 < 1.1)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-4-6d8c34e18be2> in <module>()
----> 1 P(N0 < 1.1)

/usr/lib/python3.3/site-packages/sympy/stats/rv.py in
probability(condition, given_condition, numsamples, evaluate, **kwargs)
    615
    616     # Otherwise pass work off to the ProbabilitySpace
--> 617     result = pspace(condition).probability(condition, **kwargs)
    618     if evaluate and hasattr(result, 'doit'):
    619         return result.doit()

/usr/lib/python3.3/site-packages/sympy/stats/crv.py in probability(self,
condition, **kwargs)
    294         # Univariate case can be handled by where
    295         try:
--> 296             domain = self.where(condition)
    297             rv = [rv for rv in self.values if rv.symbol ==
domain.symbol][0]
    298             # Integrate out all other random variables

/usr/lib/python3.3/site-packages/sympy/stats/crv.py in where(self,
condition)
    320         rv = tuple(rvs)[0]
    321         interval = reduce_rational_inequalities_wrap(condition, rv)
--> 322         interval = interval.intersect(self.domain.set)
    323         return SingleContinuousDomain(rv.symbol, interval)
    324

/usr/lib/python3.3/site-packages/sympy/sets/sets.py in intersect(self,
other)
     93
     94         """
---> 95         return Intersection(self, other)
     96
     97     def intersection(self, other):

/usr/lib/python3.3/site-packages/sympy/sets/sets.py in __new__(cls, *args,
**kwargs)
   1285         # Reduce sets using known rules
   1286         if evaluate:
-> 1287             return Intersection.reduce(args)
   1288
   1289         args = list(ordered(args, Set._infimum_key))

/usr/lib/python3.3/site-packages/sympy/sets/sets.py in reduce(args)
   1370                 new_args = False
   1371                 for t in args - set((s,)):
-> 1372                     new_set = s._intersect(t)
   1373                     # This returns None if s does not know how to
intersect
   1374                     # with t. Returns the newly intersected set
otherwise

/usr/lib/python3.3/site-packages/sympy/sets/sets.py in _intersect(self,
other)
    818         if self.start <= other.end and other.start <= self.end:
    819             # Get topology right.
--> 820             if self.start < other.start:
    821                 start = other.start
    822                 left_open = other.left_open

/usr/lib/python3.3/site-packages/sympy/core/relational.py in
__nonzero__(self)
    101
    102     def __nonzero__(self):
--> 103         raise TypeError("cannot determine truth value of\n%s" %
self)
    104
    105     __bool__ = __nonzero__

TypeError: cannot determine truth value of
-oo < -inf


On Tue, Mar 24, 2015 at 12:32 PM, Joachim Durchholz <j...@durchholz.org>
wrote:

> Am 24.03.2015 um 11:18 schrieb Sebastian Koslowski:
>
>>
>> Judging from the error message and traceback I looks like a bug to me.
>>
>
> Can you post an example?
> I.e. full session, from PYTHONHASHSEED setting to traceback?
> Then we have a chance to repeat the issue.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "sympy" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/sympy/X5-mfRAzQI4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> sympy+unsubscr...@googlegroups.com.
> To post to this group, send email to sympy@googlegroups.com.
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/sympy/55114B65.9040500%40durchholz.org.
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CABsYi9aA%2BjK3k3nu6uje8r2osTDQry2suSUAYEPo4fovpWmOcw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to