Issue #7335: FiniteSet not accepting iterables

9 views
Skip to first unread message

Amit Saha

unread,
Nov 22, 2014, 9:21:42 PM11/22/14
to sy...@googlegroups.com
Hi,

I only am realizing that I cannot do FiniteSet[1, 2, 3, 4]) any more.
I did find it very useful to create a set from the elements of a set.
Anyway, it's probably way late for that.

So, what is the recommended way now to create a FiniteSet from an
existing list or any other iterable?

Use case: the elements of the set are calculated at run time and are
not known apriori.


PS: The release note for 0.7.6 does not contain an entry for this change.

Thanks,
Amit.

Amit Saha

unread,
Nov 22, 2014, 9:37:15 PM11/22/14
to sy...@googlegroups.com
On Sun, Nov 23, 2014 at 12:20 PM, Amit Saha <amits...@gmail.com> wrote:
> Hi,
>
> I only am realizing that I cannot do FiniteSet[1, 2, 3, 4]) any more.
> I did find it very useful to create a set from the elements of a set.

set => list

Sergey Kirpichev

unread,
Nov 22, 2014, 9:43:19 PM11/22/14
to sy...@googlegroups.com
On Sunday, November 23, 2014 5:21:42 AM UTC+3, Amit Saha wrote:
Hi,

I only am realizing that I cannot do FiniteSet[1, 2, 3, 4]) any more.
I did find it very useful to create a set from the elements of a set.
Anyway, it's probably way late for that.
So, what is the recommended way now to create a FiniteSet from an
existing list or any other iterable?

FiniteSet(*[1,2,3,4]) or FiniteSet(*set([1,2,3]))

PS: The release note for 0.7.6 does not contain an entry for this change.

Indeed.  Fixed.

Aaron Meurer

unread,
Nov 22, 2014, 11:39:37 PM11/22/14
to sy...@googlegroups.com
This was an intentional change. The previous way made it impossible to
create things like FiniteSet(FiniteSet(1, 2, 3)) (a set containing a
single set).

Aaron Meurer
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/5b20cfb2-eeec-4a02-960b-6e68bac6953d%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages