Coder Social home page Coder Social logo

Comments (3)

mkoeppe avatar mkoeppe commented on June 11, 2024

A difficulty: RealSet is currently not compatible with ParametricRealField.

sage: from cutgeneratingfunctionology.dff import *
sage: K.<delta, s> = ParametricRealField([1/5, 2])
INFO: 2019-07-03 13:52:08,623 Initialized ParametricRealField(names = ['delta', 's'], values = [1/5, 2])
sage: RealSet.open(delta, s)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-3-59b90b78b88f> in <module>()
----> 1 RealSet.open(delta, s)

/Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/local/lib/python2.7/site-packages/sage/sets/real_set.pyc in open(lower, upper)
   1116             (0, 1)
   1117         """
-> 1118         lower, upper = RealSet._prep(lower, upper)
   1119         return RealSet(InternalRealInterval(lower, False, upper, False))
   1120 

/Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/local/lib/python2.7/site-packages/sage/sets/real_set.pyc in _prep(lower, upper)
   1079             lower = infinity
   1080         else:
-> 1081             lower = RLF(lower)
   1082         if upper is None:
   1083             return lower

/Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/local/lib/python2.7/site-packages/sage/structure/parent.pyx in sage.structure.parent.Parent.__call__ (build/cythonized/sage/structure/parent.c:9197)()
    898         if mor is not None:
    899             if no_extra_args:
--> 900                 return mor._call_(x)
    901             else:
    902                 return mor._call_with_args(x, args, kwds)

/Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/local/lib/python2.7/site-packages/sage/structure/coerce_maps.pyx in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (build/cythonized/sage/structure/coerce_maps.c:4549)()
    160                 print(type(C), C)
    161                 print(type(C._element_constructor), C._element_constructor)
--> 162             raise
    163 
    164     cpdef Element _call_with_args(self, x, args=(), kwds={}):

/Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/local/lib/python2.7/site-packages/sage/structure/coerce_maps.pyx in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (build/cythonized/sage/structure/coerce_maps.c:4441)()
    155         cdef Parent C = self._codomain
    156         try:
--> 157             return C._element_constructor(x)
    158         except Exception:
    159             if print_warnings:

/Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/local/lib/python2.7/site-packages/sage/categories/sets_cat.pyc in _element_constructor_from_element_class(self, *args, **keywords)
    992                 <class 'sage.categories.examples.sets_cat.PrimeNumbers_Inherits_with_category.element_class'>
    993             """
--> 994             return self.element_class(self, *args, **keywords)
    995 
    996         def is_parent_of(self, element):

/Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/local/lib/python2.7/site-packages/sage/rings/real_lazy.pyx in sage.rings.real_lazy.LazyWrapper.__init__ (build/cythonized/sage/rings/real_lazy.c:11098)()
    944         self._value = value
    945         if check:
--> 946             self._parent.interval_field()(value)
    947 
    948     def __neg__(self):

/Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/local/lib/python2.7/site-packages/sage/rings/real_mpfi.pyx in sage.rings.real_mpfi.RealIntervalField_class.__call__ (build/cythonized/sage/rings/real_mpfi.c:5998)()
    700         if kwds:
    701             return self.element_class(self, x, **kwds)
--> 702         return Parent.__call__(self, x)
    703 
    704     def algebraic_closure(self):

/Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/local/lib/python2.7/site-packages/sage/structure/parent.pyx in sage.structure.parent.Parent.__call__ (build/cythonized/sage/structure/parent.c:9197)()
    898         if mor is not None:
    899             if no_extra_args:
--> 900                 return mor._call_(x)
    901             else:
    902                 return mor._call_with_args(x, args, kwds)

/Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/local/lib/python2.7/site-packages/sage/structure/coerce_maps.pyx in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (build/cythonized/sage/structure/coerce_maps.c:4549)()
    160                 print(type(C), C)
    161                 print(type(C._element_constructor), C._element_constructor)
--> 162             raise
    163 
    164     cpdef Element _call_with_args(self, x, args=(), kwds={}):

/Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/local/lib/python2.7/site-packages/sage/structure/coerce_maps.pyx in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (build/cythonized/sage/structure/coerce_maps.c:4441)()
    155         cdef Parent C = self._codomain
    156         try:
--> 157             return C._element_constructor(x)
    158         except Exception:
    159             if print_warnings:

/Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/local/lib/python2.7/site-packages/sage/categories/sets_cat.pyc in _element_constructor_from_element_class(self, *args, **keywords)
    992                 <class 'sage.categories.examples.sets_cat.PrimeNumbers_Inherits_with_category.element_class'>
    993             """
--> 994             return self.element_class(self, *args, **keywords)
    995 
    996         def is_parent_of(self, element):

/Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/local/lib/python2.7/site-packages/sage/rings/real_mpfi.pyx in sage.rings.real_mpfi.RealIntervalFieldElement.__init__ (build/cythonized/sage/rings/real_mpfi.c:9331)()
   1246             mpfi_set_ui(self.value, 0)
   1247         else:
-> 1248             mpfi_set_sage(self.value, NULL, x, parent, base)
   1249 
   1250     def __reduce__(self):

/Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/local/lib/python2.7/site-packages/sage/rings/convert/mpfi.pyx in sage.rings.convert.mpfi.mpfi_set_sage (build/cythonized/sage/rings/convert/mpfi.c:5512)()
    208 
    209     # Finally, try converting via the corresponding RealField
--> 210     mpfi_set_via_RR(re, x, field)
    211     return return_real(im)
    212 

/Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/local/lib/python2.7/site-packages/sage/rings/convert/mpfi.pyx in sage.rings.convert.mpfi.mpfi_set_via_RR (build/cythonized/sage/rings/convert/mpfi.c:6362)()
    290         rb = RIF.__upper_field(x)
    291     except TypeError:
--> 292         raise TypeError(f"unable to convert {x!r} to real interval")
    293     mpfi_interv_fr(re, (<RealNumber>ra).value, (<RealNumber>rb).value)

TypeError: unable to convert (delta)~ to real interval

from cutgeneratingfunctionology.

mkoeppe avatar mkoeppe commented on June 11, 2024

A difficulty: RealSet is currently not compatible with ParametricRealField.

Fixed in 597c18f

from cutgeneratingfunctionology.

mkoeppe avatar mkoeppe commented on June 11, 2024

It will certainly need benchmarking.

from cutgeneratingfunctionology.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.