#15919: Notation S[i] for i-th element of enumerated set S conflicts with 
notation
R[x] for polynomial ring
-------------------------------------+-------------------------------------
       Reporter:  darij              |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.2
      Component:  algebra            |   Resolution:
       Keywords:  notation,          |    Merged in:
  algebra, polynomial                |    Reviewers:
        Authors:                     |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  bbd22f1422f7b643a55afabeb44cfd8204b7dd3b
  u/nthiery/ticket/15919             |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by nthiery):

 Ah shoot, the sampling issue actually occurs with #10963.

 At this point I am tempted to remove the sampling altogether in
 InstanceTester.some_elements, and instead have it always return a list
 (or iterator?) of the first max_run elements (or less if `S` does not
 have that many). Then, the only requirement on `S` would be to be
 iterable.

 The code would then just be:
 {{{
     def some_elements(self, S=None):
         if S is None:
             if self._elements is None:
                 S = self._instance.some_elements()
             else:
                 S = self._elements
         import itertools
         return list(itertools.islice(S,0,self._max_runs))
 }}}

 I am now running the tests with #10963 and this change.

 Cheers,
                                      Nicolas

--
Ticket URL: <http://trac.sagemath.org/ticket/15919#comment:15>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to