Created
March 28, 2012 07:10
-
-
Save Jim-Holmstroem/2224430 to your computer and use it in GitHub Desktop.
Pickout the div of zeroes / group of units for all elements in R in Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dozsmatrix=dict(map(lambda a:(a,filter(lambda b:a*b==Zero,R)),R)) | |
groupofunit=dict(map(lambda a:(a,filter(lambda b:a*b==e,Rstar)),Rstar)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
note the class \in R must have hash(self): defined, mostly easy (if not leave out the dict part)
the dict will contain g=>[g's divisors of zero] \forall g