OK now I'm back in a familiar nightmare - if I set the vectors to be immutable then I cannot treat them as vectors because they seem to be of "NoneType" or something so have no length etc etc; however I cannot *not *set them to be immutable if I wish to work through a list consisting of those very vectors. I remember now that this is what drove me to abandon anything other than the plain old nested subroutines a long time ago, because I couldn't reverse-engineer my way out of this conundrum. Is there something simple that will put me out of my misery please?!!
On Sat, Mar 30, 2013 at 5:23 PM, Gary McConnell <[email protected]>wrote: > Brilliant - thanks Jason - sorry for delay > > > On Sat, Mar 30, 2013 at 2:04 PM, Jason Grout > <[email protected]>wrote: > >> On 3/30/13 8:39 AM, Gary McConnell wrote: >> >>> One more thing Jason: the code you wrote, as far as I can see, does not >>> take account of "N", which I guess is your N=set(N1) of my "N1" - the >>> point is I guess that if I pass N1 to the function instead of your F >>> then it should be ok (ie it only searches within the subset N1 of the >>> full vector space); but (and this is how I got into this mess in the >>> first place!) I keep on getting messages about mutable vectors being >>> unhashable, no matter how I try to weave the list N1 into the search >>> function. Hence my klunky kode ... >>> >>> So perhaps I have inadvertently created N1 in such a way that it will >>> not let me copy it; or is there another way to get that type of >>> assignment "N=set(N1)" to work? >>> >> >> >> Yes, you can pass in N1 instead of F --- all it does is iterate through >> that set. >> >> I added this line to make the vectors immutable before storing them in >> the set: https://gist.github.com/**jasongrout/5276508#file-** >> findsets-py-L22<https://gist.github.com/jasongrout/5276508#file-findsets-py-L22> >> >> Thanks, >> >> >> Jason >> >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "sage-support" group. >> To unsubscribe from this topic, visit https://groups.google.com/d/** >> topic/sage-support/**GFJdjFvKCvo/unsubscribe?hl=en<https://groups.google.com/d/topic/sage-support/GFJdjFvKCvo/unsubscribe?hl=en> >> . >> To unsubscribe from this group and all its topics, send an email to >> sage-support+unsubscribe@**googlegroups.com<sage-support%[email protected]> >> . >> To post to this group, send email to [email protected]. >> Visit this group at >> http://groups.google.com/**group/sage-support?hl=en<http://groups.google.com/group/sage-support?hl=en> >> . >> For more options, visit >> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out> >> . >> >> >> > -- You received this message because you are subscribed to the Google Groups "sage-support" 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 http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
