Skip to content

Instantly share code, notes, and snippets.

@Jim-Holmstroem
Created March 28, 2012 07:10
Show Gist options
  • Save Jim-Holmstroem/2224430 to your computer and use it in GitHub Desktop.
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
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))
@Jim-Holmstroem
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment