On Sat, Jan 10, 2009 at 9:22 AM, Jason Grout
wrote:
>
> John H Palmieri wrote:
>> sage: timeit('set(S).issubset(set(T))')
>>
>> gives me very similar times to the first option (all(s in T for s in
>> S)). So if I start with Sage sets, I don't seem to gain much by
>> converting back to python set
John H Palmieri wrote:
> sage: timeit('set(S).issubset(set(T))')
>
> gives me very similar times to the first option (all(s in T for s in
> S)). So if I start with Sage sets, I don't seem to gain much by
> converting back to python sets for this (not to mention that if S = Set
> (ZZ), then set(S
On Jan 10, 7:25 am, Jason Grout wrote:
> John H Palmieri wrote:
> >
> > Here's another question: what is the most efficient way of testing
> > whether one Set is a subset of another? I can do
>
> > S in list(T.subsets())
>
> > -- and it's a bit frustrating that I can't do S in T.subsets() --
John H Palmieri wrote:
>
>
> On Jan 9, 3:40 pm, "William Stein" wrote:
>> On Fri, Jan 9, 2009 at 3:38 PM, Mike Hansen wrote:
>>
>>> On Fri, Jan 9, 2009 at 3:36 PM, John H Palmieri
>>> wrote:
Is this a bug?
sage: Set([])
{}
sage: Set(Set([]))
{}
sage: Set([]) ==
On Jan 9, 2009, at 9:21 PM, John H Palmieri wrote:
>
> On Jan 9, 7:03 pm, "William Stein" wrote:
>> On Fri, Jan 9, 2009 at 6:42 PM, John H Palmieri
>> wrote:
>>
>>> Here's another question: what is the most efficient way of testing
>>> whether one Set is a subset of another? I can do
>>
>>>
On Jan 9, 7:03 pm, "William Stein" wrote:
> On Fri, Jan 9, 2009 at 6:42 PM, John H Palmieri
> wrote:
>
> > Here's another question: what is the most efficient way of testing
> > whether one Set is a subset of another? I can do
>
> > S in list(T.subsets())
>
> > -- and it's a bit frustrating
On Fri, Jan 9, 2009 at 6:42 PM, John H Palmieri wrote:
>
>
>
> On Jan 9, 3:40 pm, "William Stein" wrote:
>> On Fri, Jan 9, 2009 at 3:38 PM, Mike Hansen wrote:
>>
>> > On Fri, Jan 9, 2009 at 3:36 PM, John H Palmieri
>> > wrote:
>>
>> >> Is this a bug?
>>
>> >> sage: Set([])
>> >> {}
>> >> sage
On Jan 9, 3:40 pm, "William Stein" wrote:
> On Fri, Jan 9, 2009 at 3:38 PM, Mike Hansen wrote:
>
> > On Fri, Jan 9, 2009 at 3:36 PM, John H Palmieri
> > wrote:
>
> >> Is this a bug?
>
> >> sage: Set([])
> >> {}
> >> sage: Set(Set([]))
> >> {}
> >> sage: Set([]) == Set(Set([]))
> >> True
>
>
On Fri, Jan 9, 2009 at 3:38 PM, Mike Hansen wrote:
>
> On Fri, Jan 9, 2009 at 3:36 PM, John H Palmieri
> wrote:
>>
>> Is this a bug?
>>
>> sage: Set([])
>> {}
>> sage: Set(Set([]))
>> {}
>> sage: Set([]) == Set(Set([]))
>> True
>
> This is because Set takes a list (iterable) for all the of the
On Fri, Jan 9, 2009 at 3:36 PM, John H Palmieri wrote:
>
> Is this a bug?
>
> sage: Set([])
> {}
> sage: Set(Set([]))
> {}
> sage: Set([]) == Set(Set([]))
> True
This is because Set takes a list (iterable) for all the of the
elements of the set. So, if you want to construct the set containing
t
10 matches
Mail list logo