Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow initializing RealSet from RealInterval or RBF elements #21242

Open
mkoeppe opened this issue Aug 13, 2016 · 0 comments
Open

Allow initializing RealSet from RealInterval or RBF elements #21242

mkoeppe opened this issue Aug 13, 2016 · 0 comments

Comments

@mkoeppe
Copy link
Member

mkoeppe commented Aug 13, 2016

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

CC: @rwst @vbraun @pjbruin

Component: basic arithmetic

Issue created by migration from https://trac.sagemath.org/ticket/21242

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant