Ask Your Question
0

RecursionError long lists

asked 4 years ago

Ingrid gravatar image

I am working with long lists, and getting the error "RecursionError: maximum recursion depth exceeded in comparison". The maximum recursion limit is 3000, if I try increasing it the kernel dies. My first list has only about 10,000 elements, representing 5 dimensional simplices. There are 6 different "face maps" I want to apply to each element in the list. If a face map applied to an element of the list is not in my list of 4 dimensional simplices, I want to append it to my list of 4 dimensional simplices. The list of 4 dimensional simplices has length nearly 6 times that of my list of 5 dimensional simplices. Similarly when generating the list of 3 dimensional simplices, this will have length nearly 30,000. Etc. down to the list of 1 dimensional simplices. The numbers don't quite increase multiplicatively, as there are identifications, but the numbers are big enough that I would really rather not compute in steps of 3000. Is there any way around this? The manipulations I want to do to the lists aren't computation intensive, I don't understand why this is such a problem.

Preview: (hide)

Comments

Without code and traceback, we cannot help.

FrédéricC gravatar imageFrédéricC ( 4 years ago )

Providing a toy example with a few simplices instead of 10,000 would make the question concrete.

slelievre gravatar imageslelievre ( 4 years ago )

1 Answer

Sort by » oldest newest most voted
0

answered 4 years ago

Ingrid gravatar image

I have found the problem. Sorry for wasting your time everyone. The lists themselves were not too long. There was a freak coincidence, which caused random elements of the list to be a 10,000 deep nested sequence of lists.

Preview: (hide)
link

Comments

Nice. Accept your own answer to mark the question as solved.

slelievre gravatar imageslelievre ( 4 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 4 years ago

Seen: 285 times

Last updated: Apr 09 '21