2021-11-01 10:59:16 +0200 | received badge | ● Notable Question (source) |
2021-01-15 02:10:36 +0200 | received badge | ● Popular Question (source) |
2018-04-16 20:08:18 +0200 | received badge | ● Notable Question (source) |
2016-09-05 19:00:39 +0200 | received badge | ● Nice Question (source) |
2016-09-05 11:50:57 +0200 | received badge | ● Student (source) |
2016-09-05 11:33:40 +0200 | asked a question | sequence of functions How do I define a sequence of functions in Sage? I'd like to do something like Such that when I use it, I could e.g. solve for x in |
2016-09-05 11:33:40 +0200 | asked a question | Anonymous symbolic functions? I'd like to be able to define symbolic functions recursively, for instance like the following: The above program doesn't run because "f(...)(...) = <expression>" isn't valid sage code. How do I achieve something similar in sage? Essentially I want: I am not very familiar with Sage, and am open to different ways of approaching this. Is there some other abstraction I should look into when I want to work with a recursively defined sequence of functions? Thank you! |
2015-01-14 14:14:40 +0200 | received badge | ● Popular Question (source) |
2012-04-29 06:35:26 +0200 | received badge | ● Supporter (source) |
2012-04-29 06:35:25 +0200 | marked best answer | How do I find the subsets of given Set? You don't have a set to begin with. CartesianProduct returns a special object. That object automatically converts to a list of lists when you pass it to Subsets. Then Subsets goes through that list of lists, and gets confused by the lists inside - it cannot make subsets out of them, because lists are not hashable. One way around is to use tuples instead of lists: |
2012-04-29 06:35:25 +0200 | received badge | ● Scholar (source) |
2012-04-29 06:07:57 +0200 | received badge | ● Editor (source) |
2012-04-29 06:03:16 +0200 | asked a question | How do I find the subsets of given Set? I have code that looks like this: However, when I try to run it, it gives me the following scary error: What did I do wrong? What is the canonical way to handle this situation? I was expecting an output something along the lines of "Subsets of Cartesian Product of {0..2} {0..2}" |