This may be the list you want (all one one line if it gets cut up here): indices = [f.element.ambient_ray_indices() for l in L.level_sets() [-3:-2] for f in l]
And by "address individually" do you mean indices[0], indices[1], etc? Rob On Feb 24, 6:48 pm, Ryan Davis <[email protected]> wrote: > Greetings, > > I'm running notebook mode, looking at acyclic directed graphs which > I'm forming from rational polygon fans -> cone_lattice() command -> > hasse_diagram() command. One of the things that would be very useful > would be a command to select only the elements on a specific level > (say, top minus two). However, I've been checking the sage > documentation for rational polyhedral fans.cone_lattice(), Directed > Graphs, and Hasse Diagrams, and no obvious or convenient command to do > this has emerged. My closest match so far is a double for nesting > procedure off of fan.cone_lattice().level_sets()[-3:-2] > > for l in L.level_sets()[-3:-2]: > print [f.element.ambient_ray_indices() for f in l] > > but this returns a list of some sort, the elements from which I > haven't yet been able to address individually (aside from indirectly > as in the double for). Is there a better command to select these > elements than this procedure above, and if the procedure is the best > option available, is there a good way to address the individual > elements of the resulting list? > > Thanks in advance, > Ryan Davis -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
