Opened 5 years ago

Last modified 5 years ago

#21242 new enhancement

Allow initializing RealSet from RealInterval or RBF elements

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-7.4
Component: basic arithmetic Keywords:
Cc: rws, vbraun, pbruin Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

sage: I12 = RealInterval(1, 2)
sage: I12
2.?
sage: I12.str(style='brackets')
'[1.0000000000000000 .. 2.0000000000000000]'
sage: RealSet(I12)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-233-092db285a7a0> in <module>()
----> 1 RealSet(I12)

/Users/mkoeppe/cvs/sage/src/sage/misc/lazy_import.pyx in sage.misc.lazy_import.LazyImport.__call__ (build/cythonized/sage/misc/lazy_import.c:3636)()
    384             True
    385         """
--> 386         return self._get_object()(*args, **kwds)
    387 
    388     def __repr__(self):

/Users/mkoeppe/cvs/sage/src/sage/misc/classcall_metaclass.pyx in sage.misc.classcall_metaclass.ClasscallMetaclass.__call__ (build/cythonized/sage/misc/classcall_metaclass.c:1251)()
    328         """
    329         if cls.classcall is not None:
--> 330             return cls.classcall(cls, *args, **kwds)
    331         else:
    332             # Fast version of type.__call__(cls, *args, **kwds)

/Users/mkoeppe/cvs/sage/local/lib/python2.7/site-packages/sage/sets/real_set.pyc in __classcall__(cls, *args)
    643                 intervals.extend(arg._intervals)
    644             else:
--> 645                 raise ValueError(str(arg) + ' does not determine real interval')
    646         intervals = RealSet.normalize(intervals)
    647         return UniqueRepresentation.__classcall__(cls, intervals)

ValueError: 2.? does not determine real interval

Change History (1)

comment:1 Changed 5 years ago by mkoeppe

  • Component changed from PLEASE CHANGE to basic arithmetic
Note: See TracTickets for help on using tickets.