[sage-devel] Re: cartesian_product

2015-03-06 Thread John H Palmieri
On Friday, March 6, 2015 at 3:12:40 PM UTC-8, Volker Braun wrote: > > On Friday, March 6, 2015 at 10:46:23 PM UTC+1, John H Palmieri wrote: >> >> sage: C = cartesian_product([FiniteEnumeratedSet([1,2,3]), >> FiniteEnumeratedSet([1,2,3])]) >> > > Though at that point > > sage: [(i,j) for i in

[sage-devel] Re: cartesian_product

2015-03-06 Thread Volker Braun
On Friday, March 6, 2015 at 10:46:23 PM UTC+1, John H Palmieri wrote: > > sage: C = cartesian_product([FiniteEnumeratedSet([1,2,3]), > FiniteEnumeratedSet([1,2,3])]) > Though at that point sage: [(i,j) for i in range(3) for j in range(3)] [(0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2), (2,

Re: [sage-devel] Re: cartesian_product

2015-03-06 Thread Nicolas M. Thiery
On Fri, Mar 06, 2015 at 02:12:33PM -0800, William Stein wrote: > Does that mean that you would be happy if > > sage: cartesian_product([[1,2,3], [1,2,3]]) > > did work? And that it not working is just due to lack of time, rather > than some fundamental design decision? Yes indeed! > (IIRC car

Re: [sage-devel] Re: cartesian_product

2015-03-06 Thread William Stein
On Fri, Mar 6, 2015 at 1:35 PM, Travis Scrimshaw wrote: >The lower-case version is meant to be a functorial construction and IIRC > eventually replace the CamelCase version. The closest thing to getting it to > work currently is: > > sage: C = cartesian_product([Set([1,2,3]), Set([1,2,3])]) >

[sage-devel] Re: cartesian_product

2015-03-06 Thread John H Palmieri
On Friday, March 6, 2015 at 1:35:12 PM UTC-8, Travis Scrimshaw wrote: > >The lower-case version is meant to be a functorial construction and > IIRC eventually replace the CamelCase version. The closest thing to getting > it to work currently is: > > sage: C = cartesian_product([Set([1,2,3])

[sage-devel] Re: cartesian_product

2015-03-06 Thread Travis Scrimshaw
The lower-case version is meant to be a functorial construction and IIRC eventually replace the CamelCase version. The closest thing to getting it to work currently is: sage: C = cartesian_product([Set([1,2,3]), Set([1,2,3])]) but it currently doesn't have a working iterator. However, no

[sage-devel] Re: cartesian_product

2015-03-06 Thread Volker Braun
I've never used the lower-case version, but always this: sage: CartesianProduct([1,2,3], [1,2,3]) Cartesian product of [1, 2, 3], [1, 2, 3] sage: list(_) [[1, 1], [1, 2], [1, 3], [2, 1], [2, 2], [2, 3], [3, 1], [3, 2], [3, 3]] On Friday, March 6, 2015 at 8:00:06 PM UTC+1, William wrote: > > Hi,