[issue40230] Itertools.product() Out of Memory Errors

2020-04-10 Thread Henry Carscadden
Henry Carscadden added the comment: Tim, I'm guessing it was a misdiagnosis then. In any case, something changed about my codebase that alleviated the problem. Thanks for looking into it. -- ___ Python tracker <https://bugs.python.org/is

[issue40230] Itertools.product() Out of Memory Errors

2020-04-10 Thread Henry Carscadden
Henry Carscadden added the comment: @Tim Peters For example, the following should reproduce the error: many_arguments = [[1,2] for i in range(50)] for term in product(*many_arguments): print(term) In my application, I was taking the Cartesian product of the sets of all simple path to

[issue40230] Itertools.product() Out of Memory Errors

2020-04-09 Thread Henry Carscadden
Henry Carscadden added the comment: Hey, Tim, I just wanted a note of clarification. I was working on an approximation algorithm for a network science tool that is being released soon. Initially, I relied on itertools.product(), but when I moved to testing on non-trivial graphs, I

[issue40230] Itertools.product() Out of Memory Errors

2020-04-08 Thread Henry Carscadden
New submission from Henry Carscadden : The product method in itertools provides an implementation of the Cartesian product that when run on with many arguments quickly gives out of memory errors. The current implementation creates a lot of unnecessary lists in this situation. A more