Thanks Aaron,

I couldn't check on your suggestions until today, they worked great :D

Joan

Missatge de Aaron Meurer <[email protected]> del dia dl., 17 de juny 2019
a les 22:48:

> The docstring of multiset_partitions describes how to count
> partitions. It mentions the nT function, but not where to get it. It's
> in sympy.functions.combinatorial.numbers
>
> >>> from sympy.functions.combinatorial.numbers import nT
> >>> from sympy.utilities.iterables import multiset_partitions
> >>> len(list(multiset_partitions([1, 1, 2, 3], 3)))
> 4
> >>> nT([1, 1, 2, 3], 3)
> 4
>
> Also the docstring creates its own version of the Stirling numbers of
> the second kind, but there is a striling() function in the same
> module. So the documentation of multiset_partitions() could be
> improved. Also, some of these functions should probably be included in
> the default namespace (sympy/__init__.py).
>
> Aaron Meurer
>
> On Mon, Jun 17, 2019 at 2:40 PM Joan <[email protected]> wrote:
> >
> > I am using the multiset_partitions from sympy to get the possible
> permutations of a list of elements, it does work wonderfully, but depending
> on the case it will take a long time to generate the whole list.
> > Is there any way I can calculate the number of permutations prior
> generating them? It would help to discard some complex calculations to be
> made.
> >
> > Thanks
> >
> > --
> > 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 [email protected].
> > To post to this group, send email to [email protected].
> > Visit this group at https://groups.google.com/group/sympy.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/be1af050-ac6c-46a1-8107-e79a3d765feb%40googlegroups.com
> .
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/CAKgW%3D6%2Bg-EjmPP9%3DcwQwnsLxBRCtM2%2BE%3DybcOw9ADRHb6B%3DpNA%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAP4s%2BCFbpHhuhPHQpsMef3iK-iWgGHmrTuf0m5TXvCeKHSQ%2BVw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to