Re: [sage-support] Re: Cartesian n-product of set for given n

2014-08-19 Thread Jori Mantysalo
On Sun, 17 Aug 2014, Nathann Cohen wrote: Please, be respectful of other people's work and focus your hate on Sage's categories. The rest is quite fine :-P OK, I'll try to remember this. :=) And if you want the product of more complicated things (with sets of different size) you can use the

Re: [sage-support] Re: Cartesian n-product of set for given n

2014-08-19 Thread Nathann Cohen
Yo ! Ah, seems to be quite a compact form! Yeah, but it only does what you want. Nothing involving more complicated objects like category functions do. But after two days of wondering I don't know how to generate all lower triangular matrices with non-zero elements taken from, say, [0,1].

Re: [sage-support] Re: Cartesian n-product of set for given n

2014-08-19 Thread Nathann Cohen
Yo ! Ah, seems to be quite a compact form! Yeah, but it only does what you want. Nothing involving more complicated objects like category functions do. But after two days of wondering I don't know how to generate all lower triangular matrices with non-zero elements taken from, say, [0,1].

Re: [sage-support] Re: Cartesian n-product of set for given n

2014-08-17 Thread Nathann Cohen
Yo ! Uh, cartesian_product and CartesianProduct on same system. My love-hate -relationship to Sage just moved slightly to hate-side. Please, be respectful of other people's work and focus your hate on Sage's categories. The rest is quite fine :-P I only wanted to add on the same topic that

Re: [sage-support] Re: Cartesian n-product of set for given n

2014-08-15 Thread Jori Mantysalo
On Thu, 14 Aug 2014, Vincent Delecroix wrote: range(2) is not suited for cartesian product. If you want to consider integer mod 2 you can use cartesian_product([Zmod(2)] * 10) Uh, cartesian_product and CartesianProduct on same system. My love-hate -relationship to Sage just moved slightly

[sage-support] Re: Cartesian n-product of set for given n

2014-08-14 Thread Nils Bruin
On Thursday, August 14, 2014 4:47:42 AM UTC-7, jori.ma...@uta.fi wrote: To get for example all bit vectors of size 3 one can say CartesianProduct(range(2), range(2), range(2)).list() If you want to generate a list of arguments that have to be passed as separate arguments, you can use in