repo
stringlengths
7
54
path
stringlengths
4
223
func_name
stringlengths
1
134
original_string
stringlengths
75
104k
language
stringclasses
1 value
code
stringlengths
75
104k
code_tokens
listlengths
20
28.4k
docstring
stringlengths
1
46.3k
docstring_tokens
listlengths
1
1.66k
sha
stringlengths
40
40
url
stringlengths
87
315
partition
stringclasses
1 value
summary
stringlengths
4
350
obf_code
stringlengths
7.85k
764k
noahbenson/neuropythy
neuropythy/util/conf.py
detect_credentials
def detect_credentials(config_name, extra_environ=None, filenames=None, aws_profile_name=None, default_value=Ellipsis): ''' detect_credentials(config_name) attempts to locate Amazon S3 Bucket credentials from the given configuration item config_name. The following optional arguments are accepted: * extra_environ (default: None) may specify a string or a tuple (key_name, secret_name) or a list of strings or tuples; strings are treated as an additional environment variable that should be checked for credentials while tuples are treated as paired varialbes: if both are defined, then they are checked as separate holders of a key/secret pair. Note that a list of strings is considered a pair of solo environment varialbes while a tuple of strings is considered a single (key_name, secret_name) pair. * filenames (default: None) may specify a list of filenames that are checked in order for credentials. * aws_profile_name (default: None) may specify a profile name that appears in the ~/.aws/credentials file that will be checked for aws_access_key_id and aws_secret_access_key values. The files ~/.amazon/credentials and ~/.credentials are also checked. Note that this may be a list of profiles to check. * default_value (default: Ellipsis) may specify a value to return when no credentials are found; if this value is None, then it is always returned; otherwise, the value is passed through to_credentials() and any errors are allowed to propagate out of detect_credentials(). If default_value is Ellipsis then an error is simply raised stating that no credentials could be found. The detect_credentials() function looks at the following locations in the following order, assuming that it has been provided with the relevant information: * first, if the Neuropythy configuration variable config_name is set via either the npythyrc file or the associated environment variable, then it is coerced into credentials; * next, if the environment contains both the variables key_name and secret_name (from the optional argument key_secret_environ), then these values are used; * next, if the filenames argument is given, then all files it refers to are checked for credentials; these files are expanded with both os.expanduser and os.expandvars. * finally, if no credentials were detected, an error is raised. ''' # Check the config first: if config_name is not None and config[config_name] is not None: return config[config_name] # Okay, not found there; check the key/secret environment variables if extra_environ is None: extra_environ = [] elif pimms.is_str(extra_environ): extra_environ = [extra_environ] elif pimms.is_vector(extra_environ): if pimms.is_vector(extra_environ, str): if len(extra_environ) == 2 and isinstance(extra_environ, _tuple_type): extra_environ = [extra_environ] elif not pimms.is_matrix(extra_environ, str): raise ValueError('extra_environ must be a string, tuple of strings, or list of these') for ee in extra_environ: if pimms.is_str(ee): if ee in os.environ: try: return to_credentials(q) except Exception: pass elif pimms.is_vector(ee, str) and len(ee) == 2: if ee[0] in os.environ and ee[1] in os.environ: (k,s) = [os.environ[q] for q in ee] if len(k) > 0 and len(s) > 0: continue return (k,s) else: raise ValueError('cannot interpret extra_environ argument: %s' % ee) # Okay, next we check the filenames if filenames is None: filenames = [] elif pimms.is_str(filenames): filenames = [filenames] for flnm in filenames: flnm = os.expanduser(os.expandvars(flnm)) if os.path.isfile(flnm): try: return to_credentials(flnm) except Exception: pass # okay... let's check the AWS credentials file, if it exists if pimms.is_str(aws_profile_name): aws_profile_name = [aws_profile_name] elif aws_profile_name is None or len(aws_profile_name) == 0: aws_profile_name = None elif not pimms.is_vector(aws_profile_name, str): raise ValueError('Invalid aws_profile_name value: %s' % aws_profile_name) if aws_profile_name is not None: try: cc = confparse.ConfigParser() cc.read([os.expanduser(os.path.join('~', '.aws', 'credentials')), os.expanduser(os.path.join('~', '.amazon', 'credentials')), os.expanduser(os.path.join('~', '.credentials'))]) for awsprof in aws_profile_names: try: aws_access_key_id = cc.get(awsprof, 'aws_access_key_id') aws_secret_access_key = cc.get(awsprof, 'aws_secret_access_key') return (aws_access_key_id, aws_secret_access_key) except Exception: pass except Exception: pass # no match! if default_value is None: return None elif default_value is Ellipsis: if config_name is None: raise ValueError('No valid credentials were detected') else: raise ValueError('No valid credentials (%s) were detected' % config_name) else: return to_credentials(default_value)
python
def detect_credentials(config_name, extra_environ=None, filenames=None, aws_profile_name=None, default_value=Ellipsis): ''' detect_credentials(config_name) attempts to locate Amazon S3 Bucket credentials from the given configuration item config_name. The following optional arguments are accepted: * extra_environ (default: None) may specify a string or a tuple (key_name, secret_name) or a list of strings or tuples; strings are treated as an additional environment variable that should be checked for credentials while tuples are treated as paired varialbes: if both are defined, then they are checked as separate holders of a key/secret pair. Note that a list of strings is considered a pair of solo environment varialbes while a tuple of strings is considered a single (key_name, secret_name) pair. * filenames (default: None) may specify a list of filenames that are checked in order for credentials. * aws_profile_name (default: None) may specify a profile name that appears in the ~/.aws/credentials file that will be checked for aws_access_key_id and aws_secret_access_key values. The files ~/.amazon/credentials and ~/.credentials are also checked. Note that this may be a list of profiles to check. * default_value (default: Ellipsis) may specify a value to return when no credentials are found; if this value is None, then it is always returned; otherwise, the value is passed through to_credentials() and any errors are allowed to propagate out of detect_credentials(). If default_value is Ellipsis then an error is simply raised stating that no credentials could be found. The detect_credentials() function looks at the following locations in the following order, assuming that it has been provided with the relevant information: * first, if the Neuropythy configuration variable config_name is set via either the npythyrc file or the associated environment variable, then it is coerced into credentials; * next, if the environment contains both the variables key_name and secret_name (from the optional argument key_secret_environ), then these values are used; * next, if the filenames argument is given, then all files it refers to are checked for credentials; these files are expanded with both os.expanduser and os.expandvars. * finally, if no credentials were detected, an error is raised. ''' # Check the config first: if config_name is not None and config[config_name] is not None: return config[config_name] # Okay, not found there; check the key/secret environment variables if extra_environ is None: extra_environ = [] elif pimms.is_str(extra_environ): extra_environ = [extra_environ] elif pimms.is_vector(extra_environ): if pimms.is_vector(extra_environ, str): if len(extra_environ) == 2 and isinstance(extra_environ, _tuple_type): extra_environ = [extra_environ] elif not pimms.is_matrix(extra_environ, str): raise ValueError('extra_environ must be a string, tuple of strings, or list of these') for ee in extra_environ: if pimms.is_str(ee): if ee in os.environ: try: return to_credentials(q) except Exception: pass elif pimms.is_vector(ee, str) and len(ee) == 2: if ee[0] in os.environ and ee[1] in os.environ: (k,s) = [os.environ[q] for q in ee] if len(k) > 0 and len(s) > 0: continue return (k,s) else: raise ValueError('cannot interpret extra_environ argument: %s' % ee) # Okay, next we check the filenames if filenames is None: filenames = [] elif pimms.is_str(filenames): filenames = [filenames] for flnm in filenames: flnm = os.expanduser(os.expandvars(flnm)) if os.path.isfile(flnm): try: return to_credentials(flnm) except Exception: pass # okay... let's check the AWS credentials file, if it exists if pimms.is_str(aws_profile_name): aws_profile_name = [aws_profile_name] elif aws_profile_name is None or len(aws_profile_name) == 0: aws_profile_name = None elif not pimms.is_vector(aws_profile_name, str): raise ValueError('Invalid aws_profile_name value: %s' % aws_profile_name) if aws_profile_name is not None: try: cc = confparse.ConfigParser() cc.read([os.expanduser(os.path.join('~', '.aws', 'credentials')), os.expanduser(os.path.join('~', '.amazon', 'credentials')), os.expanduser(os.path.join('~', '.credentials'))]) for awsprof in aws_profile_names: try: aws_access_key_id = cc.get(awsprof, 'aws_access_key_id') aws_secret_access_key = cc.get(awsprof, 'aws_secret_access_key') return (aws_access_key_id, aws_secret_access_key) except Exception: pass except Exception: pass # no match! if default_value is None: return None elif default_value is Ellipsis: if config_name is None: raise ValueError('No valid credentials were detected') else: raise ValueError('No valid credentials (%s) were detected' % config_name) else: return to_credentials(default_value)
[ "def", "detect_credentials", "(", "config_name", ",", "extra_environ", "=", "None", ",", "filenames", "=", "None", ",", "aws_profile_name", "=", "None", ",", "default_value", "=", "Ellipsis", ")", ":", "# Check the config first:", "if", "config_name", "is", "not",...
detect_credentials(config_name) attempts to locate Amazon S3 Bucket credentials from the given configuration item config_name. The following optional arguments are accepted: * extra_environ (default: None) may specify a string or a tuple (key_name, secret_name) or a list of strings or tuples; strings are treated as an additional environment variable that should be checked for credentials while tuples are treated as paired varialbes: if both are defined, then they are checked as separate holders of a key/secret pair. Note that a list of strings is considered a pair of solo environment varialbes while a tuple of strings is considered a single (key_name, secret_name) pair. * filenames (default: None) may specify a list of filenames that are checked in order for credentials. * aws_profile_name (default: None) may specify a profile name that appears in the ~/.aws/credentials file that will be checked for aws_access_key_id and aws_secret_access_key values. The files ~/.amazon/credentials and ~/.credentials are also checked. Note that this may be a list of profiles to check. * default_value (default: Ellipsis) may specify a value to return when no credentials are found; if this value is None, then it is always returned; otherwise, the value is passed through to_credentials() and any errors are allowed to propagate out of detect_credentials(). If default_value is Ellipsis then an error is simply raised stating that no credentials could be found. The detect_credentials() function looks at the following locations in the following order, assuming that it has been provided with the relevant information: * first, if the Neuropythy configuration variable config_name is set via either the npythyrc file or the associated environment variable, then it is coerced into credentials; * next, if the environment contains both the variables key_name and secret_name (from the optional argument key_secret_environ), then these values are used; * next, if the filenames argument is given, then all files it refers to are checked for credentials; these files are expanded with both os.expanduser and os.expandvars. * finally, if no credentials were detected, an error is raised.
[ "detect_credentials", "(", "config_name", ")", "attempts", "to", "locate", "Amazon", "S3", "Bucket", "credentials", "from", "the", "given", "configuration", "item", "config_name", "." ]
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/util/conf.py#L350-L439
train
Detects Amazon S3 Bucket credentials from the given configuration item config_name.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4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oA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(0b101000 + 0o107) + chr(0b110011) + '\065' + chr(0b11000 + 0o31), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(3645 - 3534) + chr(0b110011) + '\063' + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(2125 - 2077) + '\x6f' + chr(0b11010 + 0o30) + '\060' + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(0b1000101 + 0o52) + '\061' + '\065' + '\x35', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1100111 + 0o10) + chr(1673 - 1622) + chr(51) + '\064', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b11111 + 0o23) + '\x32' + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(0b110011) + chr(50), 1342 - 1334), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + '\066' + chr(0b100010 + 0o17), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(1896 - 1845) + chr(0b101101 + 0o6) + chr(55), 0o10), nzTpIcepk0o8(chr(1070 - 1022) + chr(0b1101111) + '\061' + chr(0b110001) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b100100 + 0o17) + '\x37' + chr(0b110010), 51713 - 51705), nzTpIcepk0o8(chr(2170 - 2122) + chr(0b1101111) + '\063' + '\x35' + chr(0b100000 + 0o22), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b11111 + 0o24) + chr(50) + '\x34', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + '\066', 761 - 753), nzTpIcepk0o8('\x30' + chr(1806 - 1695) + chr(656 - 606) + '\063' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(1212 - 1163) + '\x30' + chr(55), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(51) + chr(0b110101) + chr(48), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(2425 - 2374) + chr(639 - 585) + '\060', ord("\x08")), nzTpIcepk0o8(chr(1405 - 1357) + '\157' + chr(2347 - 2297) + chr(0b110001) + chr(1510 - 1458), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\063' + '\x36' + '\x37', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\x32' + chr(2909 - 2854), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1100011 + 0o14) + chr(1496 - 1446) + '\x32' + chr(432 - 383), ord("\x08")), nzTpIcepk0o8(chr(0b100001 + 0o17) + '\x6f' + chr(51) + chr(53) + chr(1613 - 1562), 48001 - 47993), nzTpIcepk0o8('\x30' + chr(0b1000001 + 0o56) + '\061' + chr(0b110011) + chr(0b10000 + 0o41), 14626 - 14618), nzTpIcepk0o8('\060' + '\157' + '\x33' + '\x36' + chr(0b1000 + 0o53), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + chr(0b11010 + 0o27), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110101) + '\065', 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b1101111) + '\x33' + chr(1541 - 1493) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(873 - 825) + chr(0b1100010 + 0o15) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + '\062' + chr(1828 - 1779), 8), nzTpIcepk0o8(chr(366 - 318) + chr(5748 - 5637) + chr(0b110101) + '\060', 50300 - 50292), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(111) + '\x33' + chr(0b110111) + chr(0b10100 + 0o35), 39242 - 39234), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(659 - 610) + chr(1912 - 1862) + '\x36', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(49) + chr(2231 - 2180) + '\067', 31476 - 31468), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + chr(0b110000) + chr(49), 0o10), nzTpIcepk0o8(chr(1200 - 1152) + chr(840 - 729) + chr(0b110001) + '\063' + '\064', 0o10), nzTpIcepk0o8(chr(1243 - 1195) + '\x6f' + chr(49) + '\063' + chr(0b110010), 0o10), nzTpIcepk0o8(chr(48) + chr(0b10100 + 0o133) + chr(1270 - 1221) + '\061' + chr(221 - 172), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(51) + '\x32' + '\x33', 34286 - 34278), nzTpIcepk0o8('\060' + '\x6f' + chr(52) + chr(600 - 548), 26297 - 26289)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1618 - 1570) + chr(0b110000 + 0o77) + chr(494 - 441) + '\060', 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xc7'), chr(0b101010 + 0o72) + chr(0b1100100 + 0o1) + chr(8082 - 7983) + '\x6f' + chr(100) + chr(2308 - 2207))('\165' + chr(0b1110100) + chr(102) + chr(0b101101) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def BE20ciVPK903(XKZvFuvM1qhI, UlC1Cazf4O2H=None, EXVYY4cgQiXQ=None, H2J7MCLPB0ry=None, OIl7G5s1bcAz=RjQP07DYIdkf): if XKZvFuvM1qhI is not None and kgkKUcD36lls[XKZvFuvM1qhI] is not None: return kgkKUcD36lls[XKZvFuvM1qhI] if UlC1Cazf4O2H is None: UlC1Cazf4O2H = [] elif roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x80\xaa\xdd\x1e\xa8\xe6'), '\x64' + chr(0b10111 + 0o116) + '\143' + chr(0b1000010 + 0o55) + chr(100) + chr(0b1000100 + 0o41))(chr(0b10010 + 0o143) + chr(116) + chr(0b1100011 + 0o3) + chr(0b101101) + chr(56)))(UlC1Cazf4O2H): UlC1Cazf4O2H = [UlC1Cazf4O2H] elif roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x80\xaa\xdd\x1b\xb9\xf7\xee\x9e\xad'), chr(100) + '\x65' + chr(0b110101 + 0o56) + '\157' + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(0b101001 + 0o113) + chr(0b1100110) + chr(1708 - 1663) + chr(2039 - 1983)))(UlC1Cazf4O2H): if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x80\xaa\xdd\x1b\xb9\xf7\xee\x9e\xad'), '\x64' + '\145' + chr(99) + chr(4560 - 4449) + chr(100) + chr(101))('\x75' + chr(116) + chr(0b111 + 0o137) + chr(45) + chr(0b100101 + 0o23)))(UlC1Cazf4O2H, N9zlRy29S1SS): if ftfygxgFas5X(UlC1Cazf4O2H) == nzTpIcepk0o8(chr(0b1010 + 0o46) + '\157' + chr(0b110010), 50563 - 50555) and suIjIS24Zkqw(UlC1Cazf4O2H, lGsxaKEgZP8V): UlC1Cazf4O2H = [UlC1Cazf4O2H] elif not roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x80\xaa\xdd\x00\xbd\xe0\xe8\x98\xa7'), chr(100) + chr(0b1000100 + 0o41) + chr(0b110001 + 0o62) + '\x6f' + chr(100) + '\x65')(chr(1924 - 1807) + chr(116) + chr(0b1100100 + 0o2) + chr(45) + '\070'))(UlC1Cazf4O2H, N9zlRy29S1SS): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\x8c\xa1\xf6\x1f\xbd\xcb\xff\x9f\xa9#\x88\x85\xba.\xf42\x9b\x84\xac\x95r\xb1\x8ay\x80e_\xabj\xf6\x04\xd9"*10?i\xbcB\xc9\xaa\xf6\x1f\xb5\xfa\xfd\x82\xf3j\x95\x98\xf4b\xf04\x9c\xd0\xe3\x917\xe5\x83<\x80t'), chr(0b1100100) + chr(101) + '\143' + chr(0b100000 + 0o117) + chr(0b1100100) + chr(101))(chr(0b1011101 + 0o30) + chr(116) + chr(0b101001 + 0o75) + chr(0b101101) + '\x38')) for dH2dUBTkxPPG in UlC1Cazf4O2H: if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x80\xaa\xdd\x1e\xa8\xe6'), '\144' + chr(1881 - 1780) + '\143' + '\x6f' + chr(7200 - 7100) + chr(1984 - 1883))(chr(0b1110101) + chr(0b111111 + 0o65) + '\x66' + chr(0b1100 + 0o41) + chr(1918 - 1862)))(dH2dUBTkxPPG): if dH2dUBTkxPPG in roI3spqORKae(aHUqKstZLeS6, roI3spqORKae(ES5oEprVxulp(b'\xa0\xea\xee:\xa5\xd7\xac\xae\x8f\x15\xb7\xa5'), chr(8377 - 8277) + chr(0b1000110 + 0o37) + chr(99) + '\x6f' + chr(0b1011 + 0o131) + '\x65')('\165' + chr(0b1110100) + '\146' + chr(0b1011 + 0o42) + chr(2631 - 2575))): try: return VN3NkjZBZwC6(P1yWu4gF7vxH) except zfo2Sgkz3IVJ: pass elif roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x80\xaa\xdd\x1b\xb9\xf7\xee\x9e\xad'), '\144' + '\x65' + '\143' + chr(0b100011 + 0o114) + chr(0b1010001 + 0o23) + '\x65')(chr(117) + '\x74' + chr(0b100100 + 0o102) + '\055' + '\x38'))(dH2dUBTkxPPG, N9zlRy29S1SS) and ftfygxgFas5X(dH2dUBTkxPPG) == nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010), 8): if dH2dUBTkxPPG[nzTpIcepk0o8('\x30' + '\157' + chr(0b1011 + 0o45), ord("\x08"))] in roI3spqORKae(aHUqKstZLeS6, roI3spqORKae(ES5oEprVxulp(b'\xa0\xea\xee:\xa5\xd7\xac\xae\x8f\x15\xb7\xa5'), chr(100) + chr(1528 - 1427) + '\x63' + chr(0b110100 + 0o73) + '\x64' + chr(0b100100 + 0o101))(chr(7919 - 7802) + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(2144 - 2088))) and dH2dUBTkxPPG[nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001), 37172 - 37164)] in roI3spqORKae(aHUqKstZLeS6, roI3spqORKae(ES5oEprVxulp(b'\xa0\xea\xee:\xa5\xd7\xac\xae\x8f\x15\xb7\xa5'), chr(5543 - 5443) + chr(493 - 392) + '\x63' + '\x6f' + '\x64' + '\145')(chr(117) + chr(0b1110100) + chr(0b100001 + 0o105) + chr(0b10110 + 0o27) + chr(0b111000))): (B6UAF1zReOyJ, PmE5_h409JAA) = [aHUqKstZLeS6.I3lWyC6_P_MO[P1yWu4gF7vxH] for P1yWu4gF7vxH in dH2dUBTkxPPG] if ftfygxgFas5X(B6UAF1zReOyJ) > nzTpIcepk0o8('\060' + chr(111) + '\060', 8) and ftfygxgFas5X(PmE5_h409JAA) > nzTpIcepk0o8(chr(48) + '\157' + '\x30', 8): continue return (B6UAF1zReOyJ, PmE5_h409JAA) else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b"\x8a\xb8\xec\x03\xb3\xe0\xba\x98\xb1>\x9f\x98\xa4|\xfc3\xc8\x95\xf4\x83e\xf0\xb4<\x9dgD\xb0k\xff\x08\x98$841?'\xa7\x1e\xc9\xfc\xf1"), chr(2113 - 2013) + chr(6941 - 6840) + chr(99) + '\x6f' + chr(100) + chr(101))(chr(0b1110101) + '\x74' + chr(0b110000 + 0o66) + '\x2d' + chr(0b101010 + 0o16)) % dH2dUBTkxPPG) if EXVYY4cgQiXQ is None: EXVYY4cgQiXQ = [] elif roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x80\xaa\xdd\x1e\xa8\xe6'), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(0b111000 + 0o55))(chr(117) + chr(0b111010 + 0o72) + '\146' + chr(157 - 112) + chr(85 - 29)))(EXVYY4cgQiXQ): EXVYY4cgQiXQ = [EXVYY4cgQiXQ] for bfhbSh5_xEIs in EXVYY4cgQiXQ: bfhbSh5_xEIs = aHUqKstZLeS6.expanduser(aHUqKstZLeS6.expandvars(bfhbSh5_xEIs)) if roI3spqORKae(aHUqKstZLeS6.path, roI3spqORKae(ES5oEprVxulp(b'\x80\xaa\xe4\x04\xb0\xf1'), chr(0b100111 + 0o75) + chr(101) + chr(6623 - 6524) + chr(0b1101111) + '\x64' + chr(3720 - 3619))(chr(0b1011101 + 0o30) + chr(116) + '\146' + chr(0b100101 + 0o10) + chr(98 - 42)))(bfhbSh5_xEIs): try: return VN3NkjZBZwC6(bfhbSh5_xEIs) except zfo2Sgkz3IVJ: pass if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x80\xaa\xdd\x1e\xa8\xe6'), chr(1592 - 1492) + '\x65' + chr(99) + '\157' + chr(0b1100100) + chr(0b101101 + 0o70))(chr(117) + '\164' + chr(0b1100110) + chr(45) + chr(0b1010 + 0o56)))(H2J7MCLPB0ry): H2J7MCLPB0ry = [H2J7MCLPB0ry] elif H2J7MCLPB0ry is None or ftfygxgFas5X(H2J7MCLPB0ry) == nzTpIcepk0o8(chr(48) + '\x6f' + chr(382 - 334), 8): H2J7MCLPB0ry = None elif not roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x80\xaa\xdd\x1b\xb9\xf7\xee\x9e\xad'), chr(100) + '\145' + chr(0b1100011) + chr(0b1101111) + chr(4821 - 4721) + chr(0b110001 + 0o64))(chr(117) + chr(9818 - 9702) + chr(0b1001111 + 0o27) + chr(0b101101) + '\x38'))(H2J7MCLPB0ry, N9zlRy29S1SS): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xa0\xb7\xf4\x0c\xb0\xfd\xfe\xd1\xbe=\x89\xb5\xa4|\xf6!\x81\x9c\xe9\xa8y\xf0\x86<\xd3gL\xaeq\xf4\x12\xd9s,'), chr(0b1100100) + chr(0b1011011 + 0o12) + chr(0b1000101 + 0o36) + '\x6f' + '\x64' + chr(0b1011010 + 0o13))(chr(0b1001001 + 0o54) + chr(0b1110100) + '\146' + chr(0b100010 + 0o13) + chr(1640 - 1584)) % H2J7MCLPB0ry) if H2J7MCLPB0ry is not None: try: EKDl56bOyICN = cT7BiVzhjRzs.ahImOlLYltiR() roI3spqORKae(EKDl56bOyICN, roI3spqORKae(ES5oEprVxulp(b'\x8c\xb6\xda\x06\xb2\xdc\xad\xa9\x8a$\xcd\x87'), chr(4489 - 4389) + chr(0b1100101) + chr(0b1110 + 0o125) + '\x6f' + chr(100) + chr(101))(chr(117) + chr(116) + '\146' + chr(425 - 380) + chr(0b110111 + 0o1)))([roI3spqORKae(aHUqKstZLeS6, roI3spqORKae(ES5oEprVxulp(b'\x8c\xa1\xf2\x0c\xb2\xf0\xef\x82\xba8'), chr(100) + '\x65' + '\143' + '\x6f' + chr(0b1100100) + '\x65')(chr(0b1000011 + 0o62) + chr(0b1110100) + chr(0b1100110) + '\055' + chr(0b11100 + 0o34)))(roI3spqORKae(aHUqKstZLeS6.path, roI3spqORKae(ES5oEprVxulp(b'\xb0\xed\xfb \xe5\xd6\xf9\x97\x8b\t\xb4\x9b'), chr(0b100010 + 0o102) + '\x65' + chr(0b110000 + 0o63) + '\157' + chr(0b1011 + 0o131) + '\145')('\165' + '\x74' + chr(0b1100110) + chr(0b101101) + chr(2579 - 2523)))(roI3spqORKae(ES5oEprVxulp(b'\x97'), chr(100) + '\x65' + chr(0b100000 + 0o103) + chr(1018 - 907) + chr(0b11011 + 0o111) + chr(6989 - 6888))(chr(1123 - 1006) + chr(116) + '\146' + chr(0b101101) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xc7\xb8\xf5\x1e'), '\144' + chr(0b101 + 0o140) + chr(99) + chr(111) + chr(0b1001110 + 0o26) + chr(101))('\165' + chr(13086 - 12970) + chr(6307 - 6205) + chr(1750 - 1705) + chr(3073 - 3017)), roI3spqORKae(ES5oEprVxulp(b'\x8a\xab\xe7\t\xb9\xfa\xee\x98\xbe&\x89'), '\x64' + chr(101) + '\143' + chr(10038 - 9927) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(10801 - 10685) + chr(0b1000101 + 0o41) + chr(0b101001 + 0o4) + '\070'))), roI3spqORKae(aHUqKstZLeS6, roI3spqORKae(ES5oEprVxulp(b'\x8c\xa1\xf2\x0c\xb2\xf0\xef\x82\xba8'), '\x64' + chr(0b1100101) + chr(99) + '\x6f' + chr(263 - 163) + chr(7043 - 6942))(chr(0b1100101 + 0o20) + chr(0b1001000 + 0o54) + chr(1555 - 1453) + chr(0b0 + 0o55) + '\070'))(roI3spqORKae(aHUqKstZLeS6.path, roI3spqORKae(ES5oEprVxulp(b'\xb0\xed\xfb \xe5\xd6\xf9\x97\x8b\t\xb4\x9b'), '\x64' + chr(851 - 750) + chr(0b1011101 + 0o6) + chr(0b1101111) + chr(0b1100100) + '\x65')(chr(9820 - 9703) + chr(2515 - 2399) + '\146' + '\055' + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'\x97'), chr(0b1100100) + chr(101) + chr(615 - 516) + chr(111) + chr(100) + chr(0b1011101 + 0o10))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + '\x2d' + '\070'), roI3spqORKae(ES5oEprVxulp(b'\xc7\xb8\xef\x0c\xa6\xfb\xf4'), '\x64' + chr(0b1100101) + '\x63' + '\157' + '\144' + '\x65')(chr(5310 - 5193) + chr(0b1001111 + 0o45) + '\146' + chr(1941 - 1896) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\x8a\xab\xe7\t\xb9\xfa\xee\x98\xbe&\x89'), '\144' + '\145' + chr(0b1100011) + '\157' + chr(3065 - 2965) + chr(0b1100101))('\x75' + chr(0b1110100) + chr(9736 - 9634) + chr(0b101101) + '\070'))), roI3spqORKae(aHUqKstZLeS6, roI3spqORKae(ES5oEprVxulp(b'\x8c\xa1\xf2\x0c\xb2\xf0\xef\x82\xba8'), chr(6927 - 6827) + chr(101) + chr(2432 - 2333) + '\157' + '\x64' + '\x65')(chr(117) + chr(116) + '\x66' + '\055' + chr(0b111000)))(roI3spqORKae(aHUqKstZLeS6.path, roI3spqORKae(ES5oEprVxulp(b'\xb0\xed\xfb \xe5\xd6\xf9\x97\x8b\t\xb4\x9b'), '\x64' + chr(0b11 + 0o142) + chr(4567 - 4468) + chr(5869 - 5758) + chr(0b1100100) + chr(0b1000100 + 0o41))('\165' + '\164' + '\146' + '\x2d' + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'\x97'), '\144' + chr(6283 - 6182) + '\x63' + chr(0b1101001 + 0o6) + '\x64' + '\x65')('\x75' + '\164' + chr(0b1100000 + 0o6) + chr(45) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\xc7\xba\xf0\x08\xb8\xf1\xf4\x85\xb6+\x96\x99'), chr(0b1100100) + chr(0b100110 + 0o77) + chr(0b111000 + 0o53) + chr(111) + chr(0b1100100) + chr(0b101001 + 0o74))(chr(0b1110101) + chr(0b1000110 + 0o56) + '\x66' + '\055' + '\x38')))]) for _6LJBfbDAJ7J in NZzHF_qhNYcl: try: XbRp8rwDQkLx = EKDl56bOyICN.GUKetu4xaGsJ(_6LJBfbDAJ7J, roI3spqORKae(ES5oEprVxulp(b'\x88\xae\xf12\xbd\xf7\xf9\x94\xac9\xa5\x81\xb1w\xc6.\x8c'), '\x64' + '\145' + chr(0b100000 + 0o103) + chr(0b1001011 + 0o44) + chr(100) + '\x65')('\165' + '\164' + '\146' + chr(901 - 856) + chr(0b10010 + 0o46))) EXhU9ON0e2Z4 = EKDl56bOyICN.GUKetu4xaGsJ(_6LJBfbDAJ7J, roI3spqORKae(ES5oEprVxulp(b'\x88\xae\xf12\xaf\xf1\xf9\x83\xba>\xa5\x8b\xb7m\xfc4\x9b\xaf\xe7\x92n'), '\x64' + chr(0b110010 + 0o63) + '\x63' + chr(8209 - 8098) + '\x64' + chr(0b100010 + 0o103))('\165' + '\164' + '\146' + chr(0b1010 + 0o43) + chr(0b11000 + 0o40))) return (XbRp8rwDQkLx, EXhU9ON0e2Z4) except zfo2Sgkz3IVJ: pass except zfo2Sgkz3IVJ: pass if OIl7G5s1bcAz is None: return None elif OIl7G5s1bcAz is RjQP07DYIdkf: if XKZvFuvM1qhI is None: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xa7\xb6\xa2\x1b\xbd\xf8\xf3\x95\xff)\x88\x8f\xb0k\xf73\x81\x91\xe0\x847\xe6\x8e+\x961I\xa7p\xf4K\x8d3;'), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(100) + chr(4887 - 4786))(chr(0b1110101) + chr(0b1010010 + 0o42) + chr(102) + chr(0b101101) + chr(0b111000))) else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xa7\xb6\xa2\x1b\xbd\xf8\xf3\x95\xff)\x88\x8f\xb0k\xf73\x81\x91\xe0\x847\xb9\xce*\xda1Z\xa7v\xf4\x08\x9d3+$?.,\xb7'), '\x64' + chr(0b1100101) + '\x63' + '\x6f' + chr(0b1100100) + chr(0b11001 + 0o114))('\165' + chr(116) + chr(0b1100110) + chr(0b101101) + chr(56)) % XKZvFuvM1qhI) else: return VN3NkjZBZwC6(OIl7G5s1bcAz)
noahbenson/neuropythy
neuropythy/geometry/util.py
normalize
def normalize(u): ''' normalize(u) yields a vetor with the same direction as u but unit length, or, if u has zero length, yields u. ''' u = np.asarray(u) unorm = np.sqrt(np.sum(u**2, axis=0)) z = np.isclose(unorm, 0) c = np.logical_not(z) / (unorm + z) return u * c
python
def normalize(u): ''' normalize(u) yields a vetor with the same direction as u but unit length, or, if u has zero length, yields u. ''' u = np.asarray(u) unorm = np.sqrt(np.sum(u**2, axis=0)) z = np.isclose(unorm, 0) c = np.logical_not(z) / (unorm + z) return u * c
[ "def", "normalize", "(", "u", ")", ":", "u", "=", "np", ".", "asarray", "(", "u", ")", "unorm", "=", "np", ".", "sqrt", "(", "np", ".", "sum", "(", "u", "**", "2", ",", "axis", "=", "0", ")", ")", "z", "=", "np", ".", "isclose", "(", "uno...
normalize(u) yields a vetor with the same direction as u but unit length, or, if u has zero length, yields u.
[ "normalize", "(", "u", ")", "yields", "a", "vetor", "with", "the", "same", "direction", "as", "u", "but", "unit", "length", "or", "if", "u", "has", "zero", "length", "yields", "u", "." ]
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/util.py#L12-L21
train
Normalizes a vetor with the same direction as u but unit length yields a vetor with the same direction as u but unit length yields u.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,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tBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b1000000 + 0o57) + chr(51) + '\x37' + '\066', 46127 - 46119), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\157' + chr(0b110010) + chr(0b1101 + 0o46) + chr(0b10101 + 0o34), ord("\x08")), nzTpIcepk0o8('\060' + chr(10099 - 9988) + chr(52) + '\065', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(306 - 257) + chr(767 - 712) + chr(52), 46600 - 46592), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + chr(0b110001) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1356 - 1303) + chr(0b11000 + 0o32), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x33' + chr(0b10010 + 0o41) + chr(679 - 624), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + chr(0b101010 + 0o6) + chr(0b1011 + 0o46), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + '\x34' + chr(52), 0o10), nzTpIcepk0o8('\060' + chr(6794 - 6683) + chr(2494 - 2444) + chr(50) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1001000 + 0o47) + chr(50) + chr(0b10001 + 0o42) + '\062', 25022 - 25014), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1110 + 0o44) + chr(55) + '\x30', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1000 + 0o147) + chr(2405 - 2354) + chr(0b110010) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(1791 - 1743) + chr(2619 - 2508) + chr(0b11001 + 0o30) + chr(0b110110) + '\x35', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + '\x37', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(344 - 233) + '\067' + chr(1803 - 1752), 61271 - 61263), nzTpIcepk0o8('\x30' + chr(0b1101001 + 0o6) + chr(0b110011) + chr(54) + '\x31', 55828 - 55820), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2059 - 2009) + '\x33' + '\062', 8), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + '\062' + '\067', 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(51) + '\064' + '\067', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101100 + 0o3) + chr(2382 - 2332) + chr(2047 - 1998) + '\063', 24799 - 24791), nzTpIcepk0o8('\x30' + chr(0b111000 + 0o67) + chr(500 - 449) + chr(54) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x32' + chr(51) + '\066', 0b1000), nzTpIcepk0o8(chr(49 - 1) + '\157' + chr(2494 - 2443) + '\x32', 58977 - 58969), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101 + 0o54) + chr(0b10100 + 0o34), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b101111 + 0o2) + chr(0b110101) + '\x33', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2109 - 2060) + chr(0b110010) + chr(0b110101), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101100 + 0o3) + chr(0b11111 + 0o23) + chr(2215 - 2167) + chr(0b10110 + 0o36), 0b1000), nzTpIcepk0o8(chr(0b10 + 0o56) + '\x6f' + '\062' + '\x33' + '\x31', 8), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1101111) + chr(1741 - 1692) + chr(0b10 + 0o60) + chr(0b100 + 0o62), 32936 - 32928), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(208 - 97) + chr(0b110100) + '\x35', 8), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b101100 + 0o103) + chr(0b101111 + 0o4) + chr(0b110111) + chr(0b1011 + 0o47), 0b1000), nzTpIcepk0o8(chr(1245 - 1197) + '\157' + chr(50) + chr(2129 - 2079) + '\063', 3134 - 3126), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b1101111) + chr(1711 - 1660) + '\063' + '\x32', 0o10), nzTpIcepk0o8(chr(2272 - 2224) + '\x6f' + chr(0b100111 + 0o12) + chr(2551 - 2500) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(1775 - 1725) + '\x34' + '\066', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10000 + 0o41) + chr(2271 - 2221) + chr(48), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(0b1101 + 0o47) + chr(0b110110), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(2930 - 2875) + '\060', 0b1000), nzTpIcepk0o8('\x30' + chr(718 - 607) + chr(0b11000 + 0o31) + chr(0b110100) + chr(0b110110), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1353 - 1305) + chr(0b110111 + 0o70) + chr(0b110101) + chr(48), 39164 - 39156)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xd0'), '\144' + chr(101) + chr(0b1100011) + chr(0b10011 + 0o134) + '\144' + chr(101))('\165' + '\164' + '\x66' + chr(0b101101) + chr(941 - 885)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def euRgWTY4eBYM(GRbsaHW8BT5I): GRbsaHW8BT5I = nDF4gVNx0u9Q.asarray(GRbsaHW8BT5I) eLL7VWVH7G8j = nDF4gVNx0u9Q.sqrt(nDF4gVNx0u9Q.oclC8DLjA_lV(GRbsaHW8BT5I ** nzTpIcepk0o8('\x30' + chr(0b1000011 + 0o54) + chr(0b100100 + 0o16), 7219 - 7211), axis=nzTpIcepk0o8('\060' + '\157' + chr(1960 - 1912), 18195 - 18187))) ZkpORfAzQ9Hw = nDF4gVNx0u9Q.SRWC_OfU1mLH(eLL7VWVH7G8j, nzTpIcepk0o8(chr(375 - 327) + '\x6f' + chr(0b110000), 8)) teUmM7cKWZUa = nDF4gVNx0u9Q.logical_not(ZkpORfAzQ9Hw) / (eLL7VWVH7G8j + ZkpORfAzQ9Hw) return GRbsaHW8BT5I * teUmM7cKWZUa
noahbenson/neuropythy
neuropythy/geometry/util.py
vector_angle_cos
def vector_angle_cos(u, v): ''' vector_angle_cos(u, v) yields the cosine of the angle between the two vectors u and v. If u or v (or both) is a (d x n) matrix of n vectors, the result will be a length n vector of the cosines. ''' u = np.asarray(u) v = np.asarray(v) return (u * v).sum(0) / np.sqrt((u ** 2).sum(0) * (v ** 2).sum(0))
python
def vector_angle_cos(u, v): ''' vector_angle_cos(u, v) yields the cosine of the angle between the two vectors u and v. If u or v (or both) is a (d x n) matrix of n vectors, the result will be a length n vector of the cosines. ''' u = np.asarray(u) v = np.asarray(v) return (u * v).sum(0) / np.sqrt((u ** 2).sum(0) * (v ** 2).sum(0))
[ "def", "vector_angle_cos", "(", "u", ",", "v", ")", ":", "u", "=", "np", ".", "asarray", "(", "u", ")", "v", "=", "np", ".", "asarray", "(", "v", ")", "return", "(", "u", "*", "v", ")", ".", "sum", "(", "0", ")", "/", "np", ".", "sqrt", "...
vector_angle_cos(u, v) yields the cosine of the angle between the two vectors u and v. If u or v (or both) is a (d x n) matrix of n vectors, the result will be a length n vector of the cosines.
[ "vector_angle_cos", "(", "u", "v", ")", "yields", "the", "cosine", "of", "the", "angle", "between", "the", "two", "vectors", "u", "and", "v", ".", "If", "u", "or", "v", "(", "or", "both", ")", "is", "a", "(", "d", "x", "n", ")", "matrix", "of", ...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/util.py#L23-L31
train
vector_angle_cos yields the cosine of the angle between the two vectors u and v.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Q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k0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(111) + chr(50) + chr(0b11 + 0o61) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + '\064' + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1349 - 1299) + chr(765 - 716), 0b1000), nzTpIcepk0o8(chr(735 - 687) + chr(1138 - 1027) + chr(50) + '\066' + chr(549 - 501), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b10111 + 0o33) + chr(0b110111) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(6743 - 6632) + chr(2365 - 2315) + chr(0b110101) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(0b1000101 + 0o52) + chr(0b1001 + 0o50) + chr(623 - 572) + chr(0b1011 + 0o50), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(1443 - 1392) + '\x37' + chr(0b11 + 0o57), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b1010 + 0o46) + '\x6f' + '\062' + chr(0b101110 + 0o2), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1100100 + 0o13) + chr(943 - 894) + chr(0b110010) + chr(55), 9999 - 9991), nzTpIcepk0o8('\060' + '\157' + '\063' + chr(50) + '\x32', 34367 - 34359), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + '\x31' + '\065', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\x31' + chr(0b110110) + chr(0b11 + 0o56), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(0b100010 + 0o24) + '\x32', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2432 - 2382) + '\067' + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(847 - 795) + chr(0b110011), 56854 - 56846), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(111) + chr(0b11010 + 0o35) + '\x37', 39959 - 39951), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1821 - 1770), 42828 - 42820), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31' + '\064' + '\062', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1001100 + 0o43) + chr(0b110010) + chr(0b110100) + '\065', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49) + chr(52) + chr(55), 8), nzTpIcepk0o8('\060' + chr(111) + chr(49) + chr(2231 - 2183) + chr(0b110000), 0o10), nzTpIcepk0o8('\x30' + chr(0b111101 + 0o62) + chr(50) + chr(2087 - 2035) + chr(52), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x35' + chr(903 - 851), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1011010 + 0o25) + chr(0b11100 + 0o26) + chr(50) + chr(49), 20855 - 20847), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(2696 - 2585) + '\x33' + chr(0b110 + 0o61), 14413 - 14405), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b100000 + 0o21) + '\x33' + chr(53), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\063' + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(577 - 526) + chr(0b100010 + 0o20) + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(3952 - 3841) + '\063' + chr(49) + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001) + chr(0b110100) + '\065', 17483 - 17475), nzTpIcepk0o8(chr(48) + chr(111) + '\x32' + '\060', 8), nzTpIcepk0o8('\060' + chr(3969 - 3858) + chr(0b110010) + chr(55) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(0b1101111) + chr(51) + '\061' + chr(51), 26032 - 26024), nzTpIcepk0o8('\x30' + chr(2846 - 2735) + chr(0b110001) + chr(50) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(3144 - 3033) + chr(0b1001 + 0o55) + chr(1726 - 1677), 54150 - 54142), nzTpIcepk0o8('\060' + chr(111) + '\063' + chr(52) + chr(0b110011), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x35' + '\x30', 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(1937 - 1884), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(516 - 468) + chr(2559 - 2448) + chr(0b110101) + '\x30', 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x8f'), '\x64' + chr(101) + chr(99) + chr(111) + chr(0b1100100) + chr(3992 - 3891))('\x75' + chr(0b110 + 0o156) + '\146' + chr(0b101101) + chr(359 - 303)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def MUXOB5yEqe8r(GRbsaHW8BT5I, r7AA1pbLjb44): GRbsaHW8BT5I = nDF4gVNx0u9Q.asarray(GRbsaHW8BT5I) r7AA1pbLjb44 = nDF4gVNx0u9Q.asarray(r7AA1pbLjb44) return roI3spqORKae(GRbsaHW8BT5I * r7AA1pbLjb44, roI3spqORKae(ES5oEprVxulp(b'\xce\x04}\xf3\x84\xeb\x17\x90GO;\x84'), chr(100) + '\145' + chr(7678 - 7579) + chr(111) + '\144' + '\x65')(chr(117) + chr(0b1110100) + chr(0b100000 + 0o106) + '\055' + '\070'))(nzTpIcepk0o8(chr(2027 - 1979) + '\157' + '\x30', 11784 - 11776)) / roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xd2\x16c\xc4'), chr(0b110010 + 0o62) + chr(0b1100000 + 0o5) + '\143' + chr(111) + '\144' + '\x65')(chr(0b1000001 + 0o64) + chr(0b1001011 + 0o51) + chr(102) + chr(0b101 + 0o50) + '\070'))(roI3spqORKae(GRbsaHW8BT5I ** nzTpIcepk0o8('\x30' + '\x6f' + chr(50), 0b1000), roI3spqORKae(ES5oEprVxulp(b'\xce\x04}\xf3\x84\xeb\x17\x90GO;\x84'), chr(0b100111 + 0o75) + chr(0b111100 + 0o51) + chr(0b1000110 + 0o35) + chr(111) + '\144' + '\145')(chr(117) + chr(116) + chr(0b1100110) + chr(0b1110 + 0o37) + '\x38'))(nzTpIcepk0o8(chr(243 - 195) + '\x6f' + '\x30', 8)) * roI3spqORKae(r7AA1pbLjb44 ** nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010), 8), roI3spqORKae(ES5oEprVxulp(b'\xce\x04}\xf3\x84\xeb\x17\x90GO;\x84'), chr(100) + '\x65' + chr(1092 - 993) + '\x6f' + chr(0b1100100) + chr(0b11010 + 0o113))(chr(6565 - 6448) + '\x74' + chr(0b1100110) + chr(0b101001 + 0o4) + '\070'))(nzTpIcepk0o8(chr(2236 - 2188) + chr(0b1101111) + chr(0b100010 + 0o16), 8)))
noahbenson/neuropythy
neuropythy/geometry/util.py
vector_angle
def vector_angle(u, v, direction=None): ''' vector_angle(u, v) yields the angle between the two vectors u and v. The optional argument direction is by default None, which specifies that the smallest possible angle between the vectors be reported; if the vectors u and v are 2D vectors and direction parameters True and False specify the clockwise or counter-clockwise directions, respectively; if the vectors are 3D vectors, then direction may be a 3D point that is not in the plane containing u, v, and the origin, and it specifies around which direction (u x v or v x u) the the counter-clockwise angle from u to v should be reported (the cross product vector that has a positive dot product with the direction argument is used as the rotation axis). ''' if direction is None: return np.arccos(vector_angle_cos(u, v)) elif direction is True: return np.arctan2(v[1], v[0]) - np.arctan2(u[1], u[0]) elif direction is False: return np.arctan2(u[1], u[0]) - np.arctan2(v[1], v[0]) else: axis1 = normalize(u) axis2 = normalize(np.cross(u, v)) if np.dot(axis2, direction) < 0: axis2 = -axis2 return np.arctan2(np.dot(axis2, v), np.dot(axis1, v))
python
def vector_angle(u, v, direction=None): ''' vector_angle(u, v) yields the angle between the two vectors u and v. The optional argument direction is by default None, which specifies that the smallest possible angle between the vectors be reported; if the vectors u and v are 2D vectors and direction parameters True and False specify the clockwise or counter-clockwise directions, respectively; if the vectors are 3D vectors, then direction may be a 3D point that is not in the plane containing u, v, and the origin, and it specifies around which direction (u x v or v x u) the the counter-clockwise angle from u to v should be reported (the cross product vector that has a positive dot product with the direction argument is used as the rotation axis). ''' if direction is None: return np.arccos(vector_angle_cos(u, v)) elif direction is True: return np.arctan2(v[1], v[0]) - np.arctan2(u[1], u[0]) elif direction is False: return np.arctan2(u[1], u[0]) - np.arctan2(v[1], v[0]) else: axis1 = normalize(u) axis2 = normalize(np.cross(u, v)) if np.dot(axis2, direction) < 0: axis2 = -axis2 return np.arctan2(np.dot(axis2, v), np.dot(axis1, v))
[ "def", "vector_angle", "(", "u", ",", "v", ",", "direction", "=", "None", ")", ":", "if", "direction", "is", "None", ":", "return", "np", ".", "arccos", "(", "vector_angle_cos", "(", "u", ",", "v", ")", ")", "elif", "direction", "is", "True", ":", ...
vector_angle(u, v) yields the angle between the two vectors u and v. The optional argument direction is by default None, which specifies that the smallest possible angle between the vectors be reported; if the vectors u and v are 2D vectors and direction parameters True and False specify the clockwise or counter-clockwise directions, respectively; if the vectors are 3D vectors, then direction may be a 3D point that is not in the plane containing u, v, and the origin, and it specifies around which direction (u x v or v x u) the the counter-clockwise angle from u to v should be reported (the cross product vector that has a positive dot product with the direction argument is used as the rotation axis).
[ "vector_angle", "(", "u", "v", ")", "yields", "the", "angle", "between", "the", "two", "vectors", "u", "and", "v", ".", "The", "optional", "argument", "direction", "is", "by", "default", "None", "which", "specifies", "that", "the", "smallest", "possible", ...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/util.py#L33-L55
train
returns the angle between two vectors u and v
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCc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Iia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(1207 - 1156) + chr(0b101 + 0o54), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(603 - 554) + '\064' + chr(848 - 800), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + chr(0b101000 + 0o13) + chr(0b10 + 0o63), 11200 - 11192), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + '\067' + chr(0b10110 + 0o34), 25259 - 25251), nzTpIcepk0o8('\x30' + '\157' + '\x34' + chr(0b10111 + 0o37), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b10010 + 0o44) + chr(0b1100 + 0o53), 3920 - 3912), nzTpIcepk0o8(chr(162 - 114) + '\157' + chr(0b110011) + '\061', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + '\x37' + '\060', ord("\x08")), nzTpIcepk0o8(chr(1573 - 1525) + chr(0b1101111) + chr(50) + chr(55) + '\062', ord("\x08")), nzTpIcepk0o8('\x30' + chr(11406 - 11295) + chr(0b110010) + chr(0b110011) + chr(522 - 471), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2175 - 2126) + chr(2365 - 2310) + '\x30', 49614 - 49606), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b1101111) + chr(51) + chr(0b110110), 0b1000), nzTpIcepk0o8('\x30' + chr(0b11101 + 0o122) + '\x31' + chr(1512 - 1463) + '\x37', ord("\x08")), nzTpIcepk0o8('\x30' + chr(6559 - 6448) + '\063' + chr(0b1 + 0o61) + '\x33', 0b1000), nzTpIcepk0o8(chr(2251 - 2203) + chr(0b1000011 + 0o54) + chr(1095 - 1046) + '\064' + chr(1384 - 1336), 8), nzTpIcepk0o8(chr(48) + chr(11850 - 11739) + chr(0b110010) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(5950 - 5839) + chr(49), 34423 - 34415), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\157' + chr(0b110011) + '\067' + chr(0b110 + 0o57), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + chr(0b101000 + 0o15) + chr(0b110001 + 0o1), 6790 - 6782), nzTpIcepk0o8(chr(1269 - 1221) + chr(0b1001101 + 0o42) + chr(49) + chr(1283 - 1234) + chr(55), 8), nzTpIcepk0o8(chr(48) + '\157' + chr(50) + chr(0b110110) + chr(0b110000 + 0o5), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(50) + chr(51) + chr(54), 0o10), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\x6f' + chr(51) + chr(665 - 616) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\157' + chr(0b110011) + '\x30' + chr(0b110010), 4106 - 4098), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1676 - 1626) + '\064' + '\063', 3666 - 3658), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1987 - 1936) + '\063' + chr(0b100110 + 0o13), 0b1000), nzTpIcepk0o8(chr(48) + chr(3120 - 3009) + '\062' + '\061' + chr(49), 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\x32' + chr(823 - 773) + chr(1695 - 1644), 60443 - 60435), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b1100 + 0o47) + '\066' + chr(55), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b1000 + 0o51) + '\x31' + chr(842 - 792), ord("\x08")), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b110110 + 0o71) + '\063' + '\x32', 0b1000), nzTpIcepk0o8(chr(979 - 931) + chr(0b11000 + 0o127) + '\062' + '\x35' + chr(257 - 202), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110011) + chr(50) + chr(0b11011 + 0o25), 0b1000), nzTpIcepk0o8('\060' + chr(5166 - 5055) + chr(54), 58344 - 58336), nzTpIcepk0o8('\x30' + chr(0b111100 + 0o63) + chr(51) + chr(0b110111) + chr(0b110101), 8), nzTpIcepk0o8(chr(0b101111 + 0o1) + '\x6f' + chr(49) + '\x37' + '\x33', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + chr(0b110001) + chr(1467 - 1415), 8), nzTpIcepk0o8(chr(710 - 662) + chr(4657 - 4546) + chr(0b110011) + chr(0b110110) + chr(175 - 121), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b11101 + 0o122) + chr(0b110001) + '\064' + chr(0b110111), 61772 - 61764), nzTpIcepk0o8(chr(48) + '\157' + '\062' + chr(0b110111) + '\x32', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(371 - 318) + '\060', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'w'), chr(1112 - 1012) + chr(0b1100101) + '\x63' + chr(11479 - 11368) + chr(0b11000 + 0o114) + chr(8218 - 8117))(chr(3911 - 3794) + '\164' + chr(4738 - 4636) + chr(45) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def koYEIcf86yR7(GRbsaHW8BT5I, r7AA1pbLjb44, rWMsESlLhmTs=None): if rWMsESlLhmTs is None: return roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'8\x12>\x19ID'), chr(100) + chr(101) + chr(0b1100011) + '\x6f' + '\144' + chr(101))(chr(0b111111 + 0o66) + '\164' + chr(7476 - 7374) + chr(45) + chr(56)))(MUXOB5yEqe8r(GRbsaHW8BT5I, r7AA1pbLjb44)) elif rWMsESlLhmTs is nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061', 8): return roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'8\x12>\x0eGY+'), '\144' + chr(0b1010010 + 0o23) + '\x63' + chr(5004 - 4893) + '\x64' + chr(5830 - 5729))(chr(117) + chr(0b1110100) + chr(0b1100110) + chr(45) + '\x38'))(r7AA1pbLjb44[nzTpIcepk0o8('\060' + chr(111) + '\x31', 8)], r7AA1pbLjb44[nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110000), 16752 - 16744)]) - roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'8\x12>\x0eGY+'), '\x64' + '\145' + chr(0b1001110 + 0o25) + '\157' + chr(0b1100100) + '\x65')('\x75' + chr(116) + '\146' + chr(45) + chr(56)))(GRbsaHW8BT5I[nzTpIcepk0o8(chr(709 - 661) + chr(111) + '\061', 8)], GRbsaHW8BT5I[nzTpIcepk0o8(chr(0b110000) + chr(0b1010000 + 0o37) + chr(0b10000 + 0o40), 8)]) elif rWMsESlLhmTs is nzTpIcepk0o8('\x30' + '\157' + chr(48), 8): return roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'8\x12>\x0eGY+'), chr(0b1100100) + chr(0b1000 + 0o135) + chr(3653 - 3554) + '\157' + '\x64' + chr(0b1110 + 0o127))(chr(8772 - 8655) + chr(1414 - 1298) + chr(0b1100110) + chr(0b101101) + chr(0b111000)))(GRbsaHW8BT5I[nzTpIcepk0o8(chr(0b110000) + chr(0b1001001 + 0o46) + chr(2175 - 2126), 8)], GRbsaHW8BT5I[nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b1101111) + '\060', 8)]) - roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'8\x12>\x0eGY+'), '\144' + chr(0b1100101) + chr(0b1100011) + chr(8263 - 8152) + chr(9327 - 9227) + chr(463 - 362))(chr(0b1110101) + chr(0b1110100) + chr(0b10 + 0o144) + chr(1480 - 1435) + '\x38'))(r7AA1pbLjb44[nzTpIcepk0o8(chr(2182 - 2134) + chr(11887 - 11776) + '\061', 8)], r7AA1pbLjb44[nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b111010 + 0o65) + chr(0b110000), 8)]) else: q4UBHgaAehst = euRgWTY4eBYM(GRbsaHW8BT5I) rkx7OTn_Xe4I = euRgWTY4eBYM(nDF4gVNx0u9Q.cross(GRbsaHW8BT5I, r7AA1pbLjb44)) if roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'=\x0f)'), '\144' + '\145' + chr(99) + '\157' + '\x64' + '\x65')('\165' + chr(0b1110010 + 0o2) + '\x66' + '\x2d' + chr(0b101 + 0o63)))(rkx7OTn_Xe4I, rWMsESlLhmTs) < nzTpIcepk0o8('\060' + chr(10206 - 10095) + chr(48), 8): rkx7OTn_Xe4I = -rkx7OTn_Xe4I return roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'8\x12>\x0eGY+'), '\x64' + chr(0b1100101) + chr(0b1011100 + 0o7) + '\157' + chr(4612 - 4512) + '\x65')(chr(6970 - 6853) + chr(0b101001 + 0o113) + chr(0b1100110) + '\055' + '\x38'))(roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'=\x0f)'), chr(8018 - 7918) + '\x65' + chr(0b1011001 + 0o12) + chr(0b1101111) + chr(4696 - 4596) + '\145')(chr(10236 - 10119) + chr(0b1110100) + '\x66' + chr(45) + chr(0b110101 + 0o3)))(rkx7OTn_Xe4I, r7AA1pbLjb44), roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'=\x0f)'), '\144' + chr(101) + chr(0b11010 + 0o111) + chr(0b1011100 + 0o23) + '\x64' + chr(101))(chr(117) + chr(5793 - 5677) + chr(0b1100110) + chr(0b10110 + 0o27) + chr(56)))(q4UBHgaAehst, r7AA1pbLjb44))
noahbenson/neuropythy
neuropythy/geometry/util.py
spherical_distance
def spherical_distance(pt0, pt1): ''' spherical_distance(a, b) yields the angular distance between points a and b, both of which should be expressed in spherical coordinates as (longitude, latitude). If a and/or b are (2 x n) matrices, then the calculation is performed over all columns. The spherical_distance function uses the Haversine formula; accordingly it may suffer from rounding errors in the case of nearly antipodal points. ''' dtheta = pt1[0] - pt0[0] dphi = pt1[1] - pt0[1] a = np.sin(dphi/2)**2 + np.cos(pt0[1]) * np.cos(pt1[1]) * np.sin(dtheta/2)**2 return 2 * np.arcsin(np.sqrt(a))
python
def spherical_distance(pt0, pt1): ''' spherical_distance(a, b) yields the angular distance between points a and b, both of which should be expressed in spherical coordinates as (longitude, latitude). If a and/or b are (2 x n) matrices, then the calculation is performed over all columns. The spherical_distance function uses the Haversine formula; accordingly it may suffer from rounding errors in the case of nearly antipodal points. ''' dtheta = pt1[0] - pt0[0] dphi = pt1[1] - pt0[1] a = np.sin(dphi/2)**2 + np.cos(pt0[1]) * np.cos(pt1[1]) * np.sin(dtheta/2)**2 return 2 * np.arcsin(np.sqrt(a))
[ "def", "spherical_distance", "(", "pt0", ",", "pt1", ")", ":", "dtheta", "=", "pt1", "[", "0", "]", "-", "pt0", "[", "0", "]", "dphi", "=", "pt1", "[", "1", "]", "-", "pt0", "[", "1", "]", "a", "=", "np", ".", "sin", "(", "dphi", "/", "2", ...
spherical_distance(a, b) yields the angular distance between points a and b, both of which should be expressed in spherical coordinates as (longitude, latitude). If a and/or b are (2 x n) matrices, then the calculation is performed over all columns. The spherical_distance function uses the Haversine formula; accordingly it may suffer from rounding errors in the case of nearly antipodal points.
[ "spherical_distance", "(", "a", "b", ")", "yields", "the", "angular", "distance", "between", "points", "a", "and", "b", "both", "of", "which", "should", "be", "expressed", "in", "spherical", "coordinates", "as", "(", "longitude", "latitude", ")", ".", "If", ...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/util.py#L57-L68
train
Returns the angular distance between two points pt0 and pt1.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXq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k7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110100) + chr(0b110111), 44609 - 44601), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + '\066' + '\063', 65174 - 65166), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001 + 0o5) + chr(0b110101), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\x33' + chr(54) + chr(2368 - 2319), 0o10), nzTpIcepk0o8('\x30' + chr(4741 - 4630) + chr(51) + chr(0b110000) + chr(0b10100 + 0o40), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(2335 - 2284) + chr(53) + chr(0b101000 + 0o13), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + '\x36' + '\x33', 44304 - 44296), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + chr(0b10000 + 0o47), 24676 - 24668), nzTpIcepk0o8(chr(0b110000) + chr(0b1100010 + 0o15) + chr(0b1001 + 0o52) + chr(52) + chr(1754 - 1704), 0o10), nzTpIcepk0o8('\x30' + chr(0b1100100 + 0o13) + '\062' + chr(49) + '\062', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b11000 + 0o32) + chr(0b110111) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(740 - 691) + chr(675 - 627) + chr(54), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b101000 + 0o107) + chr(190 - 139) + chr(0b1001 + 0o52) + chr(1411 - 1359), 1010 - 1002), nzTpIcepk0o8(chr(424 - 376) + '\x6f' + chr(0b110011) + chr(0b110100) + chr(1536 - 1482), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(1122 - 1074) + chr(0b111110 + 0o61) + chr(49) + chr(0b110001) + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b111101 + 0o62) + chr(51) + chr(0b110001), 8), nzTpIcepk0o8(chr(1248 - 1200) + chr(0b1101111) + chr(523 - 472) + chr(0b101011 + 0o12) + chr(434 - 382), 0o10), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b1101111) + chr(49) + chr(0b11101 + 0o25) + '\x30', 64278 - 64270), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(9367 - 9256) + chr(709 - 658) + chr(0b110111) + chr(1898 - 1846), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b101111 + 0o4) + chr(50) + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + chr(3942 - 3831) + chr(2094 - 2043) + '\067' + chr(1557 - 1506), 54180 - 54172), nzTpIcepk0o8('\060' + '\x6f' + '\061' + '\062' + '\067', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b0 + 0o62) + chr(0b110011) + '\x35', 0b1000), nzTpIcepk0o8(chr(48) + chr(3137 - 3026) + chr(50) + chr(2700 - 2646) + chr(49), 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(111) + '\066' + chr(48), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + '\x31' + '\x34', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b100010 + 0o115) + chr(1041 - 991) + chr(644 - 593) + '\x34', 25840 - 25832), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(0b1101111) + chr(813 - 763) + chr(1991 - 1936) + chr(0b1101 + 0o46), 16858 - 16850), nzTpIcepk0o8(chr(48) + chr(5123 - 5012) + '\x33' + chr(0b11100 + 0o26) + chr(841 - 793), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1010011 + 0o34) + '\x33' + chr(976 - 921) + '\x31', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1369 - 1319) + chr(0b110100) + chr(2355 - 2302), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\066' + chr(0b101010 + 0o15), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1678 - 1628) + '\x30' + '\x32', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + '\066' + chr(0b110100), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110111) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001) + '\x35' + chr(49), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + chr(0b110110) + chr(2158 - 2105), 59679 - 59671), nzTpIcepk0o8(chr(2193 - 2145) + chr(111) + '\063' + chr(0b110100) + '\060', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + '\x37' + '\061', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(11669 - 11558) + chr(53) + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\t'), chr(4673 - 4573) + chr(6700 - 6599) + '\x63' + chr(0b1101111) + '\x64' + chr(0b1000101 + 0o40))(chr(0b1110101) + '\x74' + chr(8335 - 8233) + chr(45) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def PBhjLOOsV1uT(FAMg6VBBem_D, oTC5Yo6uhn_5): n38KdXSUpIdX = oTC5Yo6uhn_5[nzTpIcepk0o8(chr(0b1 + 0o57) + '\x6f' + chr(1217 - 1169), 22967 - 22959)] - FAMg6VBBem_D[nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110000), 8)] l7CXETRl2eB0 = oTC5Yo6uhn_5[nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b11111 + 0o22), 0b1000)] - FAMg6VBBem_D[nzTpIcepk0o8(chr(0b100111 + 0o11) + '\x6f' + chr(0b100011 + 0o16), 8)] AQ9ceR9AaoT1 = nDF4gVNx0u9Q.TMleLVztqSLZ(l7CXETRl2eB0 / nzTpIcepk0o8(chr(1685 - 1637) + chr(0b1000010 + 0o55) + chr(1281 - 1231), 0o10)) ** nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b11100 + 0o26), 8) + nDF4gVNx0u9Q.mLriLohwQ9NU(FAMg6VBBem_D[nzTpIcepk0o8(chr(48) + '\x6f' + '\061', 8)]) * nDF4gVNx0u9Q.mLriLohwQ9NU(oTC5Yo6uhn_5[nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31', 8)]) * nDF4gVNx0u9Q.TMleLVztqSLZ(n38KdXSUpIdX / nzTpIcepk0o8(chr(256 - 208) + chr(9758 - 9647) + '\062', 8)) ** nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(0b1111 + 0o140) + chr(0b110010), 8) return nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110010), 8) * roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'F\x81V\x82\xad\x85'), chr(0b1100100) + '\145' + '\143' + chr(0b1101111) + '\x64' + '\145')(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(160 - 115) + chr(0b101011 + 0o15)))(roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'T\x82G\x85'), chr(100) + '\145' + chr(2033 - 1934) + chr(111) + chr(7586 - 7486) + '\x65')('\x75' + chr(0b1110100) + chr(0b1100110) + chr(0b11011 + 0o22) + chr(56)))(AQ9ceR9AaoT1))
noahbenson/neuropythy
neuropythy/geometry/util.py
rotation_matrix_3D
def rotation_matrix_3D(u, th): """ rotation_matrix_3D(u, t) yields a 3D numpy matrix that rotates any vector about the axis u t radians counter-clockwise. """ # normalize the axis: u = normalize(u) # We use the Euler-Rodrigues formula; # see https://en.wikipedia.org/wiki/Euler-Rodrigues_formula a = math.cos(0.5 * th) s = math.sin(0.5 * th) (b, c, d) = -s * u (a2, b2, c2, d2) = (a*a, b*b, c*c, d*d) (bc, ad, ac, ab, bd, cd) = (b*c, a*d, a*c, a*b, b*d, c*d) return np.array([[a2 + b2 - c2 - d2, 2*(bc + ad), 2*(bd - ac)], [2*(bc - ad), a2 + c2 - b2 - d2, 2*(cd + ab)], [2*(bd + ac), 2*(cd - ab), a2 + d2 - b2 - c2]])
python
def rotation_matrix_3D(u, th): """ rotation_matrix_3D(u, t) yields a 3D numpy matrix that rotates any vector about the axis u t radians counter-clockwise. """ # normalize the axis: u = normalize(u) # We use the Euler-Rodrigues formula; # see https://en.wikipedia.org/wiki/Euler-Rodrigues_formula a = math.cos(0.5 * th) s = math.sin(0.5 * th) (b, c, d) = -s * u (a2, b2, c2, d2) = (a*a, b*b, c*c, d*d) (bc, ad, ac, ab, bd, cd) = (b*c, a*d, a*c, a*b, b*d, c*d) return np.array([[a2 + b2 - c2 - d2, 2*(bc + ad), 2*(bd - ac)], [2*(bc - ad), a2 + c2 - b2 - d2, 2*(cd + ab)], [2*(bd + ac), 2*(cd - ab), a2 + d2 - b2 - c2]])
[ "def", "rotation_matrix_3D", "(", "u", ",", "th", ")", ":", "# normalize the axis:", "u", "=", "normalize", "(", "u", ")", "# We use the Euler-Rodrigues formula;", "# see https://en.wikipedia.org/wiki/Euler-Rodrigues_formula", "a", "=", "math", ".", "cos", "(", "0.5", ...
rotation_matrix_3D(u, t) yields a 3D numpy matrix that rotates any vector about the axis u t radians counter-clockwise.
[ "rotation_matrix_3D", "(", "u", "t", ")", "yields", "a", "3D", "numpy", "matrix", "that", "rotates", "any", "vector", "about", "the", "axis", "u", "t", "radians", "counter", "-", "clockwise", "." ]
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/util.py#L70-L86
train
returns a 3D numpy matrix that rotates any vector about the axis u radians counter - clockwise.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRiM1qvaW7,WbNHlDKpyPtQ,z18h6aCn31dg,oxjHmqoBrCHG,GA4ANb_Tki5v,LdFlJR2ssk3y,gCu7Q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TSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b1000 + 0o50) + '\x6f' + chr(0b1111 + 0o42) + '\x37' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(50) + '\x31' + chr(1972 - 1924), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1 + 0o60) + chr(675 - 625) + chr(1728 - 1676), 46346 - 46338), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + '\x35' + chr(55), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b10011 + 0o134) + chr(0b100000 + 0o23) + chr(49) + chr(1137 - 1084), 1124 - 1116), nzTpIcepk0o8(chr(1050 - 1002) + '\x6f' + chr(765 - 714) + chr(0b1101 + 0o45) + chr(842 - 788), 0o10), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(2578 - 2467) + '\x31' + '\x30' + chr(0b0 + 0o65), 51744 - 51736), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1500 - 1451) + chr(0b101011 + 0o14) + chr(1265 - 1213), 26240 - 26232), nzTpIcepk0o8('\x30' + chr(0b111111 + 0o60) + chr(0b110011) + '\x30' + chr(49), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31' + chr(0b11101 + 0o32) + '\065', 20203 - 20195), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + chr(52) + '\x33', 62422 - 62414), nzTpIcepk0o8(chr(48) + chr(0b110010 + 0o75) + chr(861 - 811) + '\063' + '\x34', 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + chr(0b110010) + chr(0b110101), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1011101 + 0o22) + chr(51) + chr(0b110100) + chr(2735 - 2682), 52400 - 52392), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(11074 - 10963) + chr(0b110001) + '\x37' + '\x35', 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(459 - 409) + '\x32' + '\063', 3632 - 3624), nzTpIcepk0o8('\x30' + chr(0b101101 + 0o102) + chr(50) + chr(0b110010) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b100110 + 0o12) + '\x6f' + '\x34', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + chr(0b1 + 0o66) + '\x36', 48261 - 48253), nzTpIcepk0o8(chr(48) + '\x6f' + chr(2033 - 1978) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(680 - 632) + chr(0b1101111) + chr(0b11100 + 0o27) + chr(2338 - 2283) + chr(0b110000 + 0o0), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b110 + 0o55) + chr(51) + chr(54), 49425 - 49417), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(111) + chr(651 - 599) + chr(763 - 715), ord("\x08")), nzTpIcepk0o8(chr(899 - 851) + chr(111) + '\066' + chr(0b0 + 0o60), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49) + chr(1096 - 1044) + chr(0b101110 + 0o5), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100000 + 0o22) + chr(0b1 + 0o57) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(1642 - 1594) + chr(111) + '\063' + chr(2707 - 2653) + chr(0b100000 + 0o21), ord("\x08")), nzTpIcepk0o8(chr(1111 - 1063) + '\x6f' + chr(49) + chr(0b110011) + chr(55), 9349 - 9341), nzTpIcepk0o8('\060' + chr(9442 - 9331) + chr(0b110110) + '\065', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(2483 - 2432) + chr(48) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(48) + chr(2318 - 2207) + '\062' + '\060' + '\066', 8), nzTpIcepk0o8(chr(508 - 460) + '\x6f' + chr(0b110001) + chr(49) + '\x31', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1001111 + 0o40) + chr(53), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\066' + chr(1597 - 1545), 56884 - 56876), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + chr(617 - 562) + chr(249 - 196), 46310 - 46302), nzTpIcepk0o8(chr(0b101100 + 0o4) + '\x6f' + chr(50) + chr(0b101101 + 0o7) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\063' + chr(52) + '\x32', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b10010 + 0o37) + chr(1672 - 1622) + '\064', 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(54) + chr(345 - 296), 0b1000), nzTpIcepk0o8('\060' + chr(6446 - 6335) + '\062' + '\x30' + chr(2241 - 2190), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(111) + '\065' + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'W'), chr(1652 - 1552) + chr(7753 - 7652) + chr(6198 - 6099) + chr(0b1100111 + 0o10) + chr(0b1100100) + '\x65')(chr(117) + chr(0b1110100) + '\x66' + chr(45) + chr(2892 - 2836)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def EYbRc5QDoRTo(GRbsaHW8BT5I, zW5xXJ77YZDm): GRbsaHW8BT5I = euRgWTY4eBYM(GRbsaHW8BT5I) AQ9ceR9AaoT1 = aQg01EfWg1cd.mLriLohwQ9NU(0.5 * zW5xXJ77YZDm) PmE5_h409JAA = aQg01EfWg1cd.TMleLVztqSLZ(0.5 * zW5xXJ77YZDm) (xFDEVQn5qSdh, teUmM7cKWZUa, vPPlOXQgR3SM) = -PmE5_h409JAA * GRbsaHW8BT5I (q6Uu4N_Sj6f2, H30aScJCD9fp, B33NvAzgfiHM, PAfFNjUIOLoy) = (AQ9ceR9AaoT1 * AQ9ceR9AaoT1, xFDEVQn5qSdh * xFDEVQn5qSdh, teUmM7cKWZUa * teUmM7cKWZUa, vPPlOXQgR3SM * vPPlOXQgR3SM) (oVpVmq4alZLt, wuLDVHuE_OwC, GpVwEzHnhx0a, HmzFvPCBR3m5, hJyqh9gWZdPF, CCTFMh7yGsWY) = (xFDEVQn5qSdh * teUmM7cKWZUa, AQ9ceR9AaoT1 * vPPlOXQgR3SM, AQ9ceR9AaoT1 * teUmM7cKWZUa, AQ9ceR9AaoT1 * xFDEVQn5qSdh, xFDEVQn5qSdh * vPPlOXQgR3SM, teUmM7cKWZUa * vPPlOXQgR3SM) return roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'-\xe6b\x9d\x8a\xa4r$\x950T\xe8'), '\144' + chr(0b1100101) + chr(2565 - 2466) + chr(4059 - 3948) + chr(0b1001100 + 0o30) + chr(101))(chr(0b1101110 + 0o7) + '\x74' + '\x66' + chr(45) + chr(56)))([[q6Uu4N_Sj6f2 + H30aScJCD9fp - B33NvAzgfiHM - PAfFNjUIOLoy, nzTpIcepk0o8(chr(0b110000) + chr(471 - 360) + '\062', 55284 - 55276) * (oVpVmq4alZLt + wuLDVHuE_OwC), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b101110 + 0o4), 8) * (hJyqh9gWZdPF - GpVwEzHnhx0a)], [nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32', 8) * (oVpVmq4alZLt - wuLDVHuE_OwC), q6Uu4N_Sj6f2 + B33NvAzgfiHM - H30aScJCD9fp - PAfFNjUIOLoy, nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062', 8) * (CCTFMh7yGsWY + HmzFvPCBR3m5)], [nzTpIcepk0o8('\060' + chr(111) + chr(0b110010), 8) * (hJyqh9gWZdPF + GpVwEzHnhx0a), nzTpIcepk0o8('\x30' + chr(0b1000110 + 0o51) + chr(0b100100 + 0o16), 8) * (CCTFMh7yGsWY - HmzFvPCBR3m5), q6Uu4N_Sj6f2 + PAfFNjUIOLoy - H30aScJCD9fp - B33NvAzgfiHM]])
noahbenson/neuropythy
neuropythy/geometry/util.py
rotation_matrix_2D
def rotation_matrix_2D(th): ''' rotation_matrix_2D(th) yields a 2D numpy rotation matrix th radians counter-clockwise about the origin. ''' s = np.sin(th) c = np.cos(th) return np.array([[c, -s], [s, c]])
python
def rotation_matrix_2D(th): ''' rotation_matrix_2D(th) yields a 2D numpy rotation matrix th radians counter-clockwise about the origin. ''' s = np.sin(th) c = np.cos(th) return np.array([[c, -s], [s, c]])
[ "def", "rotation_matrix_2D", "(", "th", ")", ":", "s", "=", "np", ".", "sin", "(", "th", ")", "c", "=", "np", ".", "cos", "(", "th", ")", "return", "np", ".", "array", "(", "[", "[", "c", ",", "-", "s", "]", ",", "[", "s", ",", "c", "]", ...
rotation_matrix_2D(th) yields a 2D numpy rotation matrix th radians counter-clockwise about the origin.
[ "rotation_matrix_2D", "(", "th", ")", "yields", "a", "2D", "numpy", "rotation", "matrix", "th", "radians", "counter", "-", "clockwise", "about", "the", "origin", "." ]
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/util.py#L88-L95
train
returns a 2D numpy rotation matrix th radians counter - clockwise about the origin.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq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Ca7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(0b111011 + 0o64) + '\061' + '\x32' + '\x35', 16132 - 16124), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + '\x33' + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1401 - 1352) + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x37' + chr(51), 0o10), nzTpIcepk0o8(chr(433 - 385) + chr(0b111100 + 0o63) + chr(0b110011) + chr(2312 - 2260) + '\060', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + chr(0b110000) + '\x32', 51301 - 51293), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + chr(49) + chr(2454 - 2401), ord("\x08")), nzTpIcepk0o8(chr(0b101010 + 0o6) + '\x6f' + chr(0b110001) + chr(0b110100) + '\x36', 0b1000), nzTpIcepk0o8(chr(664 - 616) + chr(3437 - 3326) + chr(0b110010) + chr(0b1100 + 0o47) + chr(0b101 + 0o61), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49) + '\062' + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\x31' + chr(1765 - 1716) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(2544 - 2433) + '\061' + chr(0b110001) + chr(0b110001 + 0o3), 2259 - 2251), nzTpIcepk0o8('\060' + chr(0b10010 + 0o135) + chr(0b110000 + 0o2) + '\067' + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + '\067' + chr(55), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1000011 + 0o54) + chr(0b110110) + chr(2430 - 2376), 1872 - 1864), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\x6f' + '\x36' + chr(1474 - 1421), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + chr(1416 - 1362) + '\063', 41595 - 41587), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + '\x35' + chr(1758 - 1706), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110 + 0o55) + chr(55) + '\066', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(1799 - 1750) + chr(0b100100 + 0o16) + chr(1291 - 1243), 8), nzTpIcepk0o8(chr(118 - 70) + chr(0b1101111) + '\x35' + chr(51 - 3), 36713 - 36705), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b1 + 0o62) + '\065' + chr(0b110001 + 0o0), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(1637 - 1588) + chr(53) + chr(0b110100), 8), nzTpIcepk0o8(chr(1196 - 1148) + chr(0b1101111) + '\061' + chr(0b110101) + '\065', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b101110 + 0o5) + chr(0b110000 + 0o2) + chr(2055 - 2003), 48307 - 48299), nzTpIcepk0o8('\x30' + '\157' + '\062' + '\x37', 25721 - 25713), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(111) + '\x33' + chr(0b101100 + 0o4) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2026 - 1976) + chr(0b110001) + chr(1299 - 1250), 0o10), nzTpIcepk0o8('\x30' + chr(3183 - 3072) + chr(1021 - 972) + chr(773 - 718) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\x6f' + chr(0b101000 + 0o11) + chr(0b110111), 8), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\x6f' + chr(1278 - 1227) + chr(1424 - 1376) + '\062', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49) + chr(0b110011) + '\x32', 8), nzTpIcepk0o8('\x30' + '\x6f' + '\x37' + chr(51), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061' + chr(0b101000 + 0o13) + chr(0b110101), 6140 - 6132), nzTpIcepk0o8(chr(48) + '\157' + chr(133 - 82) + '\067' + chr(0b11001 + 0o30), 0o10), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(4091 - 3980) + chr(0b100000 + 0o22) + '\x30' + '\x30', ord("\x08")), nzTpIcepk0o8(chr(1050 - 1002) + '\157' + '\063' + chr(416 - 363), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1304 - 1253) + '\x33' + '\065', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\063' + chr(0b110011) + chr(0b110101), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(1433 - 1322) + chr(53) + chr(0b11000 + 0o30), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'{'), chr(0b101110 + 0o66) + chr(5813 - 5712) + '\143' + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(5579 - 5462) + chr(0b1110100) + chr(4468 - 4366) + '\x2d' + chr(1833 - 1777)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Jo0yUyPaoaO6(zW5xXJ77YZDm): PmE5_h409JAA = nDF4gVNx0u9Q.TMleLVztqSLZ(zW5xXJ77YZDm) teUmM7cKWZUa = nDF4gVNx0u9Q.mLriLohwQ9NU(zW5xXJ77YZDm) return roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\x0149I\xa70\xfa>\xca\x1dz8'), chr(100) + chr(101) + chr(0b10 + 0o141) + chr(0b1101111) + '\x64' + chr(7696 - 7595))(chr(0b1001001 + 0o54) + chr(116) + chr(0b1100110) + '\055' + '\x38'))([[teUmM7cKWZUa, -PmE5_h409JAA], [PmE5_h409JAA, teUmM7cKWZUa]])
noahbenson/neuropythy
neuropythy/geometry/util.py
alignment_matrix_3D
def alignment_matrix_3D(u, v): ''' alignment_matrix_3D(u, v) yields a 3x3 numpy array that rotates the vector u to the vector v around the origin. ''' # normalize both vectors: u = normalize(u) v = normalize(v) # get the cross product of u cross v w = np.cross(u, v) # the angle we need to rotate th = vector_angle(u, v) # we rotate around this vector by the angle between them return rotation_matrix_3D(w, th)
python
def alignment_matrix_3D(u, v): ''' alignment_matrix_3D(u, v) yields a 3x3 numpy array that rotates the vector u to the vector v around the origin. ''' # normalize both vectors: u = normalize(u) v = normalize(v) # get the cross product of u cross v w = np.cross(u, v) # the angle we need to rotate th = vector_angle(u, v) # we rotate around this vector by the angle between them return rotation_matrix_3D(w, th)
[ "def", "alignment_matrix_3D", "(", "u", ",", "v", ")", ":", "# normalize both vectors:", "u", "=", "normalize", "(", "u", ")", "v", "=", "normalize", "(", "v", ")", "# get the cross product of u cross v", "w", "=", "np", ".", "cross", "(", "u", ",", "v", ...
alignment_matrix_3D(u, v) yields a 3x3 numpy array that rotates the vector u to the vector v around the origin.
[ "alignment_matrix_3D", "(", "u", "v", ")", "yields", "a", "3x3", "numpy", "array", "that", "rotates", "the", "vector", "u", "to", "the", "vector", "v", "around", "the", "origin", "." ]
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/util.py#L98-L111
train
returns a 3x3 numpy array that rotates the vector u to the vector v around the origin.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfK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,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + '\157' + '\063' + '\x36', 5339 - 5331), nzTpIcepk0o8(chr(48) + chr(11896 - 11785) + '\063' + chr(0b1100 + 0o50) + '\x37', 61627 - 61619), nzTpIcepk0o8(chr(0b110000) + chr(575 - 464) + chr(50) + chr(0b110011) + '\064', 5482 - 5474), nzTpIcepk0o8(chr(0b110000) + chr(2678 - 2567) + chr(948 - 897) + chr(0b110001) + chr(1092 - 1042), 35073 - 35065), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(0b1010011 + 0o34) + chr(1794 - 1743) + chr(48) + '\x30', 0o10), nzTpIcepk0o8(chr(575 - 527) + chr(12188 - 12077) + chr(1908 - 1857) + '\066' + chr(550 - 499), 32003 - 31995), nzTpIcepk0o8('\060' + chr(0b1101111) + '\061' + chr(1053 - 1001) + '\x37', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001 + 0o1) + chr(0b100011 + 0o17) + '\062', ord("\x08")), nzTpIcepk0o8(chr(308 - 260) + chr(111) + chr(50) + chr(0b110100) + chr(0b11100 + 0o24), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(54) + '\062', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1001011 + 0o44) + '\x31' + chr(534 - 480), 63723 - 63715), nzTpIcepk0o8(chr(0b110000) + chr(0b1010011 + 0o34) + chr(461 - 406) + chr(52), 0o10), nzTpIcepk0o8('\060' + chr(10375 - 10264) + chr(0b110011) + chr(54) + chr(48), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(50) + '\x30' + chr(2107 - 2055), 0b1000), nzTpIcepk0o8(chr(48) + chr(10924 - 10813) + chr(49) + chr(0b101000 + 0o12) + chr(55), 12106 - 12098), nzTpIcepk0o8(chr(0b110000) + chr(0b111 + 0o150) + chr(434 - 383) + chr(55) + chr(49), 25235 - 25227), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + chr(51) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\062' + chr(2332 - 2282) + '\x32', 8), nzTpIcepk0o8(chr(852 - 804) + '\157' + chr(1372 - 1319) + chr(0b110111), 7389 - 7381), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + '\x33' + '\067', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b10011 + 0o36) + chr(1681 - 1632) + chr(0b100111 + 0o15), 36537 - 36529), nzTpIcepk0o8(chr(1641 - 1593) + chr(111) + '\062' + chr(0b110111) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(49) + chr(50) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1000 + 0o52) + '\064' + '\x34', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(5637 - 5526) + chr(51) + '\x32' + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(0b111001 + 0o66) + chr(0b101 + 0o55) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b11110 + 0o121) + '\061' + chr(668 - 617) + chr(0b11010 + 0o32), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b10001 + 0o40) + '\064' + '\x31', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + chr(0b10101 + 0o36) + chr(0b1 + 0o57), ord("\x08")), nzTpIcepk0o8(chr(1120 - 1072) + chr(0b1000101 + 0o52) + chr(0b1001 + 0o52) + chr(0b11000 + 0o36) + chr(0b100 + 0o55), ord("\x08")), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1101111) + chr(0b110001) + chr(0b110001) + chr(0b110010 + 0o3), 57136 - 57128), nzTpIcepk0o8('\x30' + chr(4991 - 4880) + chr(1358 - 1308) + '\x35' + chr(52), ord("\x08")), nzTpIcepk0o8(chr(944 - 896) + '\x6f' + chr(51) + chr(0b110100) + '\062', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(2230 - 2181) + '\062', 0b1000), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b1101111) + '\x31' + chr(0b110111) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b100111 + 0o11) + '\157' + '\063' + chr(843 - 794) + chr(48), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + chr(0b10 + 0o61) + chr(0b11001 + 0o34), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(104 - 53) + chr(0b110111) + chr(0b10110 + 0o36), 0o10), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(4718 - 4607) + chr(0b0 + 0o63) + chr(0b110010) + chr(52), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b10101 + 0o34) + chr(0b11 + 0o56) + chr(0b11 + 0o63), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(12164 - 12053) + '\x35' + chr(1370 - 1322), 18001 - 17993)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'0'), chr(2952 - 2852) + chr(0b1100101) + chr(99) + chr(111) + chr(0b1100100) + chr(0b11101 + 0o110))('\165' + '\x74' + chr(1338 - 1236) + chr(45) + chr(1997 - 1941)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def w3SZ6iIJkNX5(GRbsaHW8BT5I, r7AA1pbLjb44): GRbsaHW8BT5I = euRgWTY4eBYM(GRbsaHW8BT5I) r7AA1pbLjb44 = euRgWTY4eBYM(r7AA1pbLjb44) sm7_CLmeWGR7 = nDF4gVNx0u9Q.cross(GRbsaHW8BT5I, r7AA1pbLjb44) zW5xXJ77YZDm = koYEIcf86yR7(GRbsaHW8BT5I, r7AA1pbLjb44) return EYbRc5QDoRTo(sm7_CLmeWGR7, zW5xXJ77YZDm)
noahbenson/neuropythy
neuropythy/geometry/util.py
point_on_line
def point_on_line(ab, c): ''' point_on_line((a,b), c) yields True if point x is on line (a,b) and False otherwise. ''' (a,b) = ab abc = [np.asarray(u) for u in (a,b,c)] if any(len(u.shape) == 2 for u in abc): (a,b,c) = [np.reshape(u,(len(u),-1)) for u in abc] else: (a,b,c) = abc vca = a - c vcb = b - c uba = czdivide(vba, np.sqrt(np.sum(vba**2, axis=0))) uca = czdivide(vca, np.sqrt(np.sum(vca**2, axis=0))) return (np.isclose(np.sqrt(np.sum(vca**2, axis=0)), 0) | np.isclose(np.sqrt(np.sum(vcb**2, axis=0)), 0) | np.isclose(np.abs(np.sum(uba*uca, axis=0)), 1))
python
def point_on_line(ab, c): ''' point_on_line((a,b), c) yields True if point x is on line (a,b) and False otherwise. ''' (a,b) = ab abc = [np.asarray(u) for u in (a,b,c)] if any(len(u.shape) == 2 for u in abc): (a,b,c) = [np.reshape(u,(len(u),-1)) for u in abc] else: (a,b,c) = abc vca = a - c vcb = b - c uba = czdivide(vba, np.sqrt(np.sum(vba**2, axis=0))) uca = czdivide(vca, np.sqrt(np.sum(vca**2, axis=0))) return (np.isclose(np.sqrt(np.sum(vca**2, axis=0)), 0) | np.isclose(np.sqrt(np.sum(vcb**2, axis=0)), 0) | np.isclose(np.abs(np.sum(uba*uca, axis=0)), 1))
[ "def", "point_on_line", "(", "ab", ",", "c", ")", ":", "(", "a", ",", "b", ")", "=", "ab", "abc", "=", "[", "np", ".", "asarray", "(", "u", ")", "for", "u", "in", "(", "a", ",", "b", ",", "c", ")", "]", "if", "any", "(", "len", "(", "u"...
point_on_line((a,b), c) yields True if point x is on line (a,b) and False otherwise.
[ "point_on_line", "((", "a", "b", ")", "c", ")", "yields", "True", "if", "point", "x", "is", "on", "line", "(", "a", "b", ")", "and", "False", "otherwise", "." ]
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/util.py#L120-L134
train
point_on_line yields True if point x is on line a b c yields False otherwise.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OI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O,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(0b1101000 + 0o7) + chr(0b110010) + chr(0b110010) + '\060', 0o10), nzTpIcepk0o8(chr(932 - 884) + chr(0b1101111) + chr(0b110011) + '\x34' + chr(50), ord("\x08")), nzTpIcepk0o8(chr(1407 - 1359) + '\x6f' + chr(51) + '\x32' + chr(0b110111), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(2318 - 2268) + '\060' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\x6f' + chr(0b110001) + chr(0b110101) + '\067', 0o10), nzTpIcepk0o8(chr(368 - 320) + '\157' + '\061' + chr(51) + chr(0b11100 + 0o25), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + chr(2972 - 2917) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b101010 + 0o6) + '\x6f' + chr(111 - 60) + chr(1709 - 1661) + chr(483 - 433), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(389 - 338) + chr(48), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110000 + 0o2) + '\x37', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x33' + chr(0b11001 + 0o32) + '\067', 52738 - 52730), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110011) + chr(0b10111 + 0o32) + chr(0b101011 + 0o6), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(49) + chr(0b110100) + chr(134 - 85), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b101101 + 0o12) + '\063', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2282 - 2231) + '\067' + chr(0b10110 + 0o36), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b1 + 0o62) + chr(0b110001) + chr(49), 8), nzTpIcepk0o8(chr(0b110000) + chr(843 - 732) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(111) + chr(0b110001) + chr(2405 - 2353) + '\x33', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1011110 + 0o21) + chr(0b110010) + chr(0b110111) + chr(0b110110), 12892 - 12884), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + chr(179 - 130) + chr(2349 - 2295), ord("\x08")), nzTpIcepk0o8(chr(0b0 + 0o60) + '\157' + chr(419 - 369) + '\x34' + '\x35', 54077 - 54069), nzTpIcepk0o8(chr(1277 - 1229) + chr(111) + '\x33' + '\x30' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(365 - 317) + chr(0b1001111 + 0o40) + chr(0b111 + 0o60) + '\x31', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(508 - 459) + chr(0b110111) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(2244 - 2196) + chr(0b1101111) + '\x31' + chr(49) + chr(0b1111 + 0o45), 16748 - 16740), nzTpIcepk0o8(chr(48) + '\157' + chr(52) + chr(1428 - 1377), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\061' + chr(2713 - 2659) + chr(0b110010), 0b1000), nzTpIcepk0o8('\060' + chr(7737 - 7626) + chr(0b100 + 0o57) + chr(430 - 375) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b110000 + 0o77) + chr(0b110011) + chr(54) + chr(2201 - 2147), 63836 - 63828), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(0b1001011 + 0o44) + '\x31' + chr(1573 - 1522) + chr(0b110001), 8), nzTpIcepk0o8(chr(1239 - 1191) + chr(11661 - 11550) + chr(51) + chr(1908 - 1854) + '\066', 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + chr(0b100010 + 0o22), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + chr(191 - 136) + chr(0b11011 + 0o30), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\x31' + chr(50) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(9159 - 9048) + '\063' + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + chr(0b1101 + 0o52) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(1474 - 1426) + '\x6f' + chr(0b100 + 0o63), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x34' + '\066', 23769 - 23761), nzTpIcepk0o8(chr(590 - 542) + chr(0b100 + 0o153) + '\x33' + chr(55) + chr(51), 8), nzTpIcepk0o8(chr(0b11100 + 0o24) + '\x6f' + chr(1519 - 1469) + '\063' + chr(1314 - 1262), 58404 - 58396)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\x6f' + chr(53) + '\x30', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xbe'), chr(0b1100100) + chr(101) + '\x63' + chr(10267 - 10156) + '\144' + chr(101))(chr(8184 - 8067) + '\164' + '\146' + '\x2d' + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def c0x21pjTnbhj(HmzFvPCBR3m5, teUmM7cKWZUa): (AQ9ceR9AaoT1, xFDEVQn5qSdh) = HmzFvPCBR3m5 FogKpeIDjGKH = [nDF4gVNx0u9Q.asarray(GRbsaHW8BT5I) for GRbsaHW8BT5I in (AQ9ceR9AaoT1, xFDEVQn5qSdh, teUmM7cKWZUa)] if VF4pKOObtlPc((ftfygxgFas5X(roI3spqORKae(GRbsaHW8BT5I, roI3spqORKae(ES5oEprVxulp(b'\xfc\x8a\xb5\xcd_`H\x83\x9e@\xe7\xaf'), '\x64' + chr(0b1100101) + chr(0b1100011) + '\x6f' + '\144' + chr(101))(chr(8303 - 8186) + chr(0b1110100) + chr(0b1100110) + '\055' + '\070'))) == nzTpIcepk0o8(chr(0b100 + 0o54) + chr(0b10001 + 0o136) + chr(0b101111 + 0o3), 10322 - 10314) for GRbsaHW8BT5I in FogKpeIDjGKH)): (AQ9ceR9AaoT1, xFDEVQn5qSdh, teUmM7cKWZUa) = [nDF4gVNx0u9Q.reshape(GRbsaHW8BT5I, (ftfygxgFas5X(GRbsaHW8BT5I), -nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49), 0o10))) for GRbsaHW8BT5I in FogKpeIDjGKH] else: (AQ9ceR9AaoT1, xFDEVQn5qSdh, teUmM7cKWZUa) = FogKpeIDjGKH ihRpid9RlP35 = AQ9ceR9AaoT1 - teUmM7cKWZUa CcaPMbhksNmH = xFDEVQn5qSdh - teUmM7cKWZUa pU6qaMsybz4I = KbXoNT6U4xHa(whW6r6YU047f, nDF4gVNx0u9Q.sqrt(nDF4gVNx0u9Q.oclC8DLjA_lV(whW6r6YU047f ** nzTpIcepk0o8(chr(839 - 791) + chr(2332 - 2221) + chr(945 - 895), 8), axis=nzTpIcepk0o8(chr(0b110000) + chr(0b111110 + 0o61) + chr(796 - 748), 8)))) Mni9ZpH0CgPF = KbXoNT6U4xHa(ihRpid9RlP35, nDF4gVNx0u9Q.sqrt(nDF4gVNx0u9Q.oclC8DLjA_lV(ihRpid9RlP35 ** nzTpIcepk0o8('\060' + '\x6f' + chr(0b10010 + 0o40), 8), axis=nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(111) + chr(0b110000), 8)))) return roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xc3\xb0\x80\xc30\x16\x1c\x97\xe9z\x93\x81'), chr(9269 - 9169) + '\x65' + chr(0b1001011 + 0o30) + '\x6f' + '\144' + chr(101))('\x75' + chr(0b111001 + 0o73) + chr(883 - 781) + chr(45) + '\x38'))(roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xe3\x93\xa5\xf4'), '\x64' + chr(0b1000001 + 0o44) + chr(0b101001 + 0o72) + chr(111) + '\x64' + '\145')('\165' + '\x74' + chr(102) + chr(0b10110 + 0o27) + chr(0b101110 + 0o12)))(roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xff\x81\xbb\xc3W\x1d6\xa8\x99H\xb3\x9f'), chr(0b1100100) + '\x65' + chr(99) + chr(596 - 485) + '\x64' + '\145')('\165' + chr(2004 - 1888) + '\146' + '\x2d' + chr(56)))(ihRpid9RlP35 ** nzTpIcepk0o8('\x30' + '\157' + '\062', 8), axis=nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(7021 - 6910) + chr(421 - 373), 8))), nzTpIcepk0o8('\060' + chr(0b10100 + 0o133) + chr(48), 8)) | roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xc3\xb0\x80\xc30\x16\x1c\x97\xe9z\x93\x81'), chr(0b1 + 0o143) + chr(0b1100101) + '\143' + chr(3092 - 2981) + chr(0b1010111 + 0o15) + chr(565 - 464))(chr(10755 - 10638) + '\x74' + chr(0b1111 + 0o127) + '\x2d' + chr(56)))(roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xe3\x93\xa5\xf4'), chr(3750 - 3650) + chr(101) + '\x63' + chr(0b101100 + 0o103) + chr(100) + chr(101))(chr(0b1011100 + 0o31) + chr(0b101000 + 0o114) + '\146' + chr(0b1000 + 0o45) + '\070'))(roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xff\x81\xbb\xc3W\x1d6\xa8\x99H\xb3\x9f'), '\144' + '\x65' + chr(0b1100011) + '\x6f' + chr(0b1100100) + chr(0b1100101))(chr(117) + chr(116) + chr(0b111110 + 0o50) + '\x2d' + chr(2159 - 2103)))(CcaPMbhksNmH ** nzTpIcepk0o8(chr(48) + chr(888 - 777) + chr(50), 8), axis=nzTpIcepk0o8(chr(0b110000) + chr(4033 - 3922) + chr(1746 - 1698), 8))), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1101 + 0o43), 8)) | roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xc3\xb0\x80\xc30\x16\x1c\x97\xe9z\x93\x81'), chr(0b110001 + 0o63) + chr(0b1100101) + chr(0b0 + 0o143) + chr(111) + '\144' + chr(218 - 117))(chr(0b1110101) + chr(0b1000111 + 0o55) + '\146' + chr(0b110 + 0o47) + chr(925 - 869)))(roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xea\xb3\x95\xc7\x18\x0c.\xf5\x8dB\xe7\x85'), chr(7419 - 7319) + chr(3548 - 3447) + '\x63' + chr(111) + chr(0b1100100) + chr(0b1100101))(chr(117) + '\x74' + '\146' + chr(0b101101) + '\070'))(roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xff\x81\xbb\xc3W\x1d6\xa8\x99H\xb3\x9f'), '\x64' + chr(8154 - 8053) + chr(5375 - 5276) + '\157' + chr(100) + '\145')('\165' + chr(6076 - 5960) + chr(102) + '\x2d' + '\070'))(pU6qaMsybz4I * Mni9ZpH0CgPF, axis=nzTpIcepk0o8(chr(48) + chr(0b101101 + 0o102) + chr(48), 8))), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49), 8))
noahbenson/neuropythy
neuropythy/geometry/util.py
point_in_segment
def point_in_segment(ac, b): ''' point_in_segment((a,b), c) yields True if point x is in segment (a,b) and False otherwise. Note that this differs from point_on_segment in that a point that if c is equal to a or b it is considered 'on' but not 'in' the segment. ''' (a,c) = ac abc = [np.asarray(u) for u in (a,b,c)] if any(len(u.shape) > 1 for u in abc): (a,b,c) = [np.reshape(u,(len(u),-1)) for u in abc] else: (a,b,c) = abc vab = b - a vbc = c - b vac = c - a dab = np.sqrt(np.sum(vab**2, axis=0)) dbc = np.sqrt(np.sum(vbc**2, axis=0)) dac = np.sqrt(np.sum(vac**2, axis=0)) return np.isclose(dab + dbc, dac) & ~np.isclose(dac,dab) & ~np.isclose(dac,dbc)
python
def point_in_segment(ac, b): ''' point_in_segment((a,b), c) yields True if point x is in segment (a,b) and False otherwise. Note that this differs from point_on_segment in that a point that if c is equal to a or b it is considered 'on' but not 'in' the segment. ''' (a,c) = ac abc = [np.asarray(u) for u in (a,b,c)] if any(len(u.shape) > 1 for u in abc): (a,b,c) = [np.reshape(u,(len(u),-1)) for u in abc] else: (a,b,c) = abc vab = b - a vbc = c - b vac = c - a dab = np.sqrt(np.sum(vab**2, axis=0)) dbc = np.sqrt(np.sum(vbc**2, axis=0)) dac = np.sqrt(np.sum(vac**2, axis=0)) return np.isclose(dab + dbc, dac) & ~np.isclose(dac,dab) & ~np.isclose(dac,dbc)
[ "def", "point_in_segment", "(", "ac", ",", "b", ")", ":", "(", "a", ",", "c", ")", "=", "ac", "abc", "=", "[", "np", ".", "asarray", "(", "u", ")", "for", "u", "in", "(", "a", ",", "b", ",", "c", ")", "]", "if", "any", "(", "len", "(", ...
point_in_segment((a,b), c) yields True if point x is in segment (a,b) and False otherwise. Note that this differs from point_on_segment in that a point that if c is equal to a or b it is considered 'on' but not 'in' the segment.
[ "point_in_segment", "((", "a", "b", ")", "c", ")", "yields", "True", "if", "point", "x", "is", "in", "segment", "(", "a", "b", ")", "and", "False", "otherwise", ".", "Note", "that", "this", "differs", "from", "point_on_segment", "in", "that", "a", "poi...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/util.py#L153-L169
train
Point x is in segment a b c yields True if point x is in segment b and False otherwise.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f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,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(0b1101111) + '\063' + '\061' + '\064', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101110 + 0o1) + '\x31' + chr(49) + chr(0b1001 + 0o50), 63296 - 63288), nzTpIcepk0o8(chr(1208 - 1160) + chr(0b1101101 + 0o2) + chr(0b110001) + '\x31' + chr(0b110000), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101110 + 0o1) + '\x32' + '\066' + '\065', 397 - 389), nzTpIcepk0o8(chr(0b110000) + chr(0b100110 + 0o111) + '\064' + '\066', 0b1000), nzTpIcepk0o8('\060' + '\157' + '\x31' + '\065' + chr(0b11111 + 0o27), 0o10), nzTpIcepk0o8(chr(843 - 795) + '\157' + '\062' + chr(0b1000 + 0o52) + chr(48), 31678 - 31670), nzTpIcepk0o8(chr(0b110000) + chr(7310 - 7199) + '\x31' + chr(1956 - 1902) + chr(54), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(50) + chr(0b110100) + chr(1819 - 1769), 0b1000), nzTpIcepk0o8('\060' + chr(0b1100010 + 0o15) + '\062' + chr(0b101011 + 0o5) + '\x30', 28671 - 28663), nzTpIcepk0o8(chr(0b110000) + chr(0b11111 + 0o120) + chr(2514 - 2460) + '\063', 0o10), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(0b1101111) + chr(55) + '\066', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(8845 - 8734) + chr(54), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + chr(0b110001), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + chr(0b100010 + 0o24) + chr(769 - 720), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(51) + chr(0b100111 + 0o12) + chr(900 - 850), ord("\x08")), nzTpIcepk0o8(chr(686 - 638) + '\157' + '\063' + chr(0b110110 + 0o1) + chr(2551 - 2496), 3793 - 3785), nzTpIcepk0o8('\060' + chr(0b1101111) + '\066' + chr(0b10000 + 0o43), 8), nzTpIcepk0o8(chr(1289 - 1241) + chr(10003 - 9892) + '\x31' + chr(0b110100), 3540 - 3532), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(111) + chr(0b10011 + 0o36) + chr(55), 62663 - 62655), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + chr(0b110001) + '\x32', 23763 - 23755), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(111) + '\x33' + chr(0b10011 + 0o44) + chr(0b1010 + 0o46), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + chr(53) + chr(0b110111), 43686 - 43678), nzTpIcepk0o8(chr(917 - 869) + chr(2654 - 2543) + chr(49) + '\062' + chr(248 - 194), 48406 - 48398), nzTpIcepk0o8('\060' + chr(0b1010010 + 0o35) + chr(0b110010 + 0o1) + chr(1920 - 1869) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011) + chr(50) + chr(2142 - 2089), 59983 - 59975), nzTpIcepk0o8('\060' + chr(0b1010100 + 0o33) + chr(1647 - 1596) + '\x36' + chr(0b11 + 0o64), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(54) + chr(854 - 799), 34187 - 34179), nzTpIcepk0o8('\x30' + '\157' + chr(50) + '\063' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(319 - 265) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(3991 - 3880) + '\x32' + '\x31' + chr(0b110001), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(845 - 794) + chr(1840 - 1791) + chr(48), 40962 - 40954), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(567 - 517) + '\x34' + '\061', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + chr(48) + chr(758 - 705), ord("\x08")), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b1101111) + chr(51) + chr(0b110111) + chr(683 - 634), ord("\x08")), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(0b1101111) + '\061' + chr(49) + chr(2210 - 2161), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x34', 0b1000), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(111) + '\063' + chr(54) + chr(733 - 685), 8), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1101111) + chr(0b110101) + chr(53), 0o10), nzTpIcepk0o8(chr(48) + chr(0b111010 + 0o65) + chr(2128 - 2079) + chr(0b110000) + chr(50), 54936 - 54928)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\157' + '\x35' + chr(48), 62802 - 62794)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xe2'), chr(7246 - 7146) + chr(0b1100101) + chr(99) + '\157' + '\x64' + chr(101))('\165' + '\164' + chr(0b1100110) + chr(0b101000 + 0o5) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def DXdl_ZYIGbBD(GpVwEzHnhx0a, xFDEVQn5qSdh): (AQ9ceR9AaoT1, teUmM7cKWZUa) = GpVwEzHnhx0a FogKpeIDjGKH = [nDF4gVNx0u9Q.asarray(GRbsaHW8BT5I) for GRbsaHW8BT5I in (AQ9ceR9AaoT1, xFDEVQn5qSdh, teUmM7cKWZUa)] if VF4pKOObtlPc((ftfygxgFas5X(roI3spqORKae(GRbsaHW8BT5I, roI3spqORKae(ES5oEprVxulp(b'\xa0!*\xf8\x16W\xa27\xe4\xd7\x0bX'), chr(100) + chr(7711 - 7610) + chr(0b1100000 + 0o3) + '\x6f' + chr(100) + '\145')('\x75' + chr(0b1110100) + '\x66' + chr(0b101101) + chr(2145 - 2089)))) > nzTpIcepk0o8(chr(0b100100 + 0o14) + '\x6f' + chr(49), 0b1000) for GRbsaHW8BT5I in FogKpeIDjGKH)): (AQ9ceR9AaoT1, xFDEVQn5qSdh, teUmM7cKWZUa) = [nDF4gVNx0u9Q.reshape(GRbsaHW8BT5I, (ftfygxgFas5X(GRbsaHW8BT5I), -nzTpIcepk0o8('\x30' + chr(0b110101 + 0o72) + chr(0b110001 + 0o0), 8))) for GRbsaHW8BT5I in FogKpeIDjGKH] else: (AQ9ceR9AaoT1, xFDEVQn5qSdh, teUmM7cKWZUa) = FogKpeIDjGKH B9Zv_fgp6_Hc = xFDEVQn5qSdh - AQ9ceR9AaoT1 Q77qso_3WFSm = teUmM7cKWZUa - xFDEVQn5qSdh pfbyYplp9VkL = teUmM7cKWZUa - AQ9ceR9AaoT1 Z5ad8g1rabGi = nDF4gVNx0u9Q.sqrt(nDF4gVNx0u9Q.oclC8DLjA_lV(B9Zv_fgp6_Hc ** nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50), 44943 - 44935), axis=nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x30', 0b1000))) mnMlnGVFyZQA = nDF4gVNx0u9Q.sqrt(nDF4gVNx0u9Q.oclC8DLjA_lV(Q77qso_3WFSm ** nzTpIcepk0o8(chr(0b0 + 0o60) + chr(111) + chr(50), 8), axis=nzTpIcepk0o8(chr(0b110000) + '\157' + chr(48), 8))) S47lYSGlvul8 = nDF4gVNx0u9Q.sqrt(nDF4gVNx0u9Q.oclC8DLjA_lV(pfbyYplp9VkL ** nzTpIcepk0o8(chr(48) + '\x6f' + chr(1507 - 1457), 8), axis=nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(48), 8))) return roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\x9f\x1b\x1f\xf6y!\xf6#\x93\xed\x7fv'), '\x64' + '\145' + chr(0b1100011) + chr(111) + chr(5273 - 5173) + chr(101))(chr(117) + chr(6083 - 5967) + '\x66' + chr(0b10000 + 0o35) + '\x38'))(Z5ad8g1rabGi + mnMlnGVFyZQA, S47lYSGlvul8) & ~roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\x9f\x1b\x1f\xf6y!\xf6#\x93\xed\x7fv'), '\x64' + '\x65' + chr(99) + chr(9307 - 9196) + '\x64' + chr(0b1010001 + 0o24))(chr(3117 - 3000) + chr(0b101101 + 0o107) + '\x66' + '\x2d' + chr(262 - 206)))(S47lYSGlvul8, Z5ad8g1rabGi) & ~roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\x9f\x1b\x1f\xf6y!\xf6#\x93\xed\x7fv'), chr(100) + '\145' + chr(0b1100011) + chr(111) + chr(100) + chr(5297 - 5196))(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(0b100100 + 0o11) + chr(486 - 430)))(S47lYSGlvul8, mnMlnGVFyZQA)
noahbenson/neuropythy
neuropythy/geometry/util.py
segments_colinear
def segments_colinear(ab, cd): ''' segments_colinear_2D((a, b), (c, d)) yields True if either a or b is on the line segment (c,d) or if c or d is on the line segment (a,b) and the lines are colinear; otherwise yields False. All of a, b, c, and d must be (x,y) coordinates or 2xN (x,y) coordinate matrices, or (x,y,z) or 3xN matrices. ''' (a,b) = ab (c,d) = cd ss = [point_on_segment(ab, c), point_on_segment(ab, d), point_on_segment(cd, a), point_on_segment(cd, b)] return np.sum(ss, axis=0) > 1
python
def segments_colinear(ab, cd): ''' segments_colinear_2D((a, b), (c, d)) yields True if either a or b is on the line segment (c,d) or if c or d is on the line segment (a,b) and the lines are colinear; otherwise yields False. All of a, b, c, and d must be (x,y) coordinates or 2xN (x,y) coordinate matrices, or (x,y,z) or 3xN matrices. ''' (a,b) = ab (c,d) = cd ss = [point_on_segment(ab, c), point_on_segment(ab, d), point_on_segment(cd, a), point_on_segment(cd, b)] return np.sum(ss, axis=0) > 1
[ "def", "segments_colinear", "(", "ab", ",", "cd", ")", ":", "(", "a", ",", "b", ")", "=", "ab", "(", "c", ",", "d", ")", "=", "cd", "ss", "=", "[", "point_on_segment", "(", "ab", ",", "c", ")", ",", "point_on_segment", "(", "ab", ",", "d", ")...
segments_colinear_2D((a, b), (c, d)) yields True if either a or b is on the line segment (c,d) or if c or d is on the line segment (a,b) and the lines are colinear; otherwise yields False. All of a, b, c, and d must be (x,y) coordinates or 2xN (x,y) coordinate matrices, or (x,y,z) or 3xN matrices.
[ "segments_colinear_2D", "((", "a", "b", ")", "(", "c", "d", "))", "yields", "True", "if", "either", "a", "or", "b", "is", "on", "the", "line", "segment", "(", "c", "d", ")", "or", "if", "c", "or", "d", "is", "on", "the", "line", "segment", "(", ...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/util.py#L180-L191
train
Returns True if the lines are colinear.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5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W,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x32' + chr(0b110010) + chr(0b10010 + 0o45), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(148 - 98) + chr(0b100101 + 0o17) + chr(1123 - 1070), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1101 + 0o45) + chr(0b1110 + 0o50) + '\061', 38939 - 38931), nzTpIcepk0o8(chr(0b100110 + 0o12) + '\157' + chr(0b1110 + 0o43) + chr(0b101100 + 0o10) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(111) + '\062' + chr(51) + chr(0b1100 + 0o44), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + chr(984 - 934) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1001000 + 0o47) + chr(51) + '\x30' + chr(0b101100 + 0o7), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(51) + chr(0b1111 + 0o41) + chr(0b10101 + 0o42), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(49) + chr(55) + chr(764 - 712), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\064' + '\x36', 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b1101111) + chr(0b100011 + 0o20) + '\064' + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + chr(50) + '\062', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(54) + chr(0b101110 + 0o2), 0o10), nzTpIcepk0o8(chr(1755 - 1707) + chr(111) + chr(0b110010 + 0o1) + chr(0b101011 + 0o7) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b10100 + 0o133) + '\x33' + chr(0b110100 + 0o3) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b1101111) + chr(356 - 306) + chr(52) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(5635 - 5524) + chr(1181 - 1132) + '\x32' + chr(807 - 752), ord("\x08")), nzTpIcepk0o8(chr(464 - 416) + chr(0b1101111) + '\x31' + chr(50) + chr(48), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\062' + '\x36' + chr(52), 3288 - 3280), nzTpIcepk0o8('\x30' + chr(7718 - 7607) + chr(0b1101 + 0o45) + chr(48) + chr(52), 41806 - 41798), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001 + 0o2) + chr(0b10010 + 0o41) + chr(0b1 + 0o61), 19439 - 19431), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + chr(0b100101 + 0o20) + chr(2248 - 2199), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(4656 - 4545) + '\062' + chr(716 - 661) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b101101 + 0o102) + chr(0b111 + 0o53) + chr(55) + chr(0b110100), 8), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(111) + chr(51) + '\x36' + chr(0b10001 + 0o45), 43902 - 43894), nzTpIcepk0o8(chr(0b101010 + 0o6) + '\157' + chr(49) + chr(0b11100 + 0o25) + chr(0b110110), 23324 - 23316), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010 + 0o1) + '\x30' + '\065', 0b1000), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(0b1101111) + chr(699 - 649) + chr(0b110000) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(1121 - 1073) + chr(0b1101000 + 0o7) + chr(2905 - 2851) + chr(50), 0o10), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(3242 - 3131) + chr(49) + '\x31' + chr(1214 - 1161), 55458 - 55450), nzTpIcepk0o8('\060' + chr(111) + '\063' + chr(0b110000) + '\x37', 8), nzTpIcepk0o8(chr(1640 - 1592) + chr(111) + chr(0b110011) + chr(878 - 825) + '\x33', 0b1000), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(111) + chr(0b11110 + 0o24) + '\065' + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\062' + '\x33' + chr(0b110010), 2218 - 2210), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + '\061' + chr(349 - 301), 17236 - 17228), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b111 + 0o53) + chr(0b110010) + chr(0b1000 + 0o50), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + chr(0b10010 + 0o36) + '\062', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49) + chr(0b110100) + '\x36', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + chr(1227 - 1172) + chr(53), 58053 - 58045), nzTpIcepk0o8(chr(798 - 750) + chr(0b1000110 + 0o51) + chr(0b110010) + chr(54), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(10514 - 10403) + chr(53) + chr(0b110000), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xb9'), '\144' + '\145' + chr(99) + chr(0b11000 + 0o127) + '\x64' + chr(0b1000110 + 0o37))(chr(117) + '\164' + chr(1442 - 1340) + '\055' + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def gMvz42W_4lyz(HmzFvPCBR3m5, CCTFMh7yGsWY): (AQ9ceR9AaoT1, xFDEVQn5qSdh) = HmzFvPCBR3m5 (teUmM7cKWZUa, vPPlOXQgR3SM) = CCTFMh7yGsWY XghpB4dXzQ6r = [Ay0k51UuiJvT(HmzFvPCBR3m5, teUmM7cKWZUa), Ay0k51UuiJvT(HmzFvPCBR3m5, vPPlOXQgR3SM), Ay0k51UuiJvT(CCTFMh7yGsWY, AQ9ceR9AaoT1), Ay0k51UuiJvT(CCTFMh7yGsWY, xFDEVQn5qSdh)] return roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xf8\xc6\xdd \xa0\x95\x8f\xad=y\x8b\x04'), '\x64' + '\x65' + chr(0b1100011) + chr(111) + chr(0b100110 + 0o76) + chr(0b1100101))(chr(0b1110101) + chr(0b1101100 + 0o10) + chr(0b1100110) + chr(323 - 278) + '\x38'))(XghpB4dXzQ6r, axis=nzTpIcepk0o8(chr(48) + chr(111) + chr(1845 - 1797), 0b1000)) > nzTpIcepk0o8('\060' + '\157' + chr(0b100101 + 0o14), 64989 - 64981)
noahbenson/neuropythy
neuropythy/geometry/util.py
points_close
def points_close(a,b): ''' points_close(a,b) yields True if points a and b are close to each other and False otherwise. ''' (a,b) = [np.asarray(u) for u in (a,b)] if len(a.shape) == 2 or len(b.shape) == 2: (a,b) = [np.reshape(u,(len(u),-1)) for u in (a,b)] return np.isclose(np.sqrt(np.sum((a - b)**2, axis=0)), 0)
python
def points_close(a,b): ''' points_close(a,b) yields True if points a and b are close to each other and False otherwise. ''' (a,b) = [np.asarray(u) for u in (a,b)] if len(a.shape) == 2 or len(b.shape) == 2: (a,b) = [np.reshape(u,(len(u),-1)) for u in (a,b)] return np.isclose(np.sqrt(np.sum((a - b)**2, axis=0)), 0)
[ "def", "points_close", "(", "a", ",", "b", ")", ":", "(", "a", ",", "b", ")", "=", "[", "np", ".", "asarray", "(", "u", ")", "for", "u", "in", "(", "a", ",", "b", ")", "]", "if", "len", "(", "a", ".", "shape", ")", "==", "2", "or", "len...
points_close(a,b) yields True if points a and b are close to each other and False otherwise.
[ "points_close", "(", "a", "b", ")", "yields", "True", "if", "points", "a", "and", "b", "are", "close", "to", "each", "other", "and", "False", "otherwise", "." ]
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/util.py#L193-L199
train
Returns True if points a and b are close to each other and False otherwise.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVz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c5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b10101 + 0o35) + chr(54) + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + chr(277 - 227) + chr(0b10100 + 0o34), 33868 - 33860), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b1101111) + chr(175 - 125) + chr(0b110010) + chr(2127 - 2077), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(1927 - 1877) + chr(51) + chr(1269 - 1218), 0b1000), nzTpIcepk0o8('\060' + chr(8445 - 8334) + chr(0b11111 + 0o23) + chr(0b110011) + '\x37', 560 - 552), nzTpIcepk0o8(chr(1115 - 1067) + chr(0b1101111) + '\x33', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + chr(0b110100) + '\060', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + chr(49), 0b1000), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(111) + '\066' + '\060', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(6014 - 5903) + '\063' + chr(0b110000) + chr(0b110100), 57205 - 57197), nzTpIcepk0o8(chr(571 - 523) + '\157' + chr(51) + chr(48) + chr(0b110110), 48042 - 48034), nzTpIcepk0o8(chr(1731 - 1683) + chr(0b101011 + 0o104) + '\x37' + '\064', 21425 - 21417), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x37' + '\x37', 3566 - 3558), nzTpIcepk0o8(chr(0b110000) + chr(4859 - 4748) + chr(50) + chr(0b11011 + 0o27) + '\060', 59714 - 59706), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + chr(51) + chr(2136 - 2082), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + chr(52) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + chr(51) + chr(0b11011 + 0o31), ord("\x08")), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\x6f' + chr(0b1100 + 0o46) + chr(2008 - 1958) + chr(0b101000 + 0o17), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(578 - 467) + chr(51) + '\x32' + chr(49), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + chr(0b110000) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(48) + chr(5840 - 5729) + chr(0b110010) + chr(1641 - 1587) + chr(52), 0b1000), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(111) + chr(49) + '\x31' + chr(0b111 + 0o60), ord("\x08")), nzTpIcepk0o8(chr(1954 - 1906) + chr(0b10101 + 0o132) + chr(1883 - 1833) + chr(1932 - 1877) + '\065', 42655 - 42647), nzTpIcepk0o8('\x30' + chr(0b1100010 + 0o15) + chr(50) + '\064' + chr(0b1111 + 0o42), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + '\062' + '\x30', 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(505 - 454) + chr(0b110110) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1011000 + 0o27) + chr(50) + chr(0b1011 + 0o47) + '\062', 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49) + chr(0b110010), 23563 - 23555), nzTpIcepk0o8(chr(48) + chr(111) + '\x31' + '\067' + chr(53), 36262 - 36254), nzTpIcepk0o8('\060' + '\x6f' + chr(55) + chr(0b10111 + 0o40), 8), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(111) + chr(55) + '\066', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + chr(2714 - 2661) + '\063', 21904 - 21896), nzTpIcepk0o8(chr(2047 - 1999) + chr(0b101 + 0o152) + chr(1571 - 1521) + chr(1085 - 1032) + chr(49), 0o10), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(111) + chr(0b101001 + 0o10) + '\x32' + chr(310 - 260), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(161 - 109) + chr(2130 - 2078), 22519 - 22511), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110011) + '\060' + chr(55), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(0b101000 + 0o16) + '\060', 0b1000), nzTpIcepk0o8(chr(1201 - 1153) + chr(0b1101111) + chr(0b1101 + 0o45) + chr(0b11101 + 0o25) + chr(0b11110 + 0o27), 0o10), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(2944 - 2833) + chr(51) + '\x32' + chr(0b11100 + 0o26), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + chr(1974 - 1926) + chr(52), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(235 - 124) + chr(0b110101) + chr(906 - 858), 29631 - 29623)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x98'), chr(0b111010 + 0o52) + chr(0b1000011 + 0o42) + chr(0b10011 + 0o120) + chr(111) + chr(0b1100 + 0o130) + chr(101))(chr(117) + chr(913 - 797) + '\x66' + chr(0b11100 + 0o21) + chr(0b111 + 0o61)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def JmEpOgMPmRVN(AQ9ceR9AaoT1, xFDEVQn5qSdh): (AQ9ceR9AaoT1, xFDEVQn5qSdh) = [nDF4gVNx0u9Q.asarray(GRbsaHW8BT5I) for GRbsaHW8BT5I in (AQ9ceR9AaoT1, xFDEVQn5qSdh)] if ftfygxgFas5X(roI3spqORKae(AQ9ceR9AaoT1, roI3spqORKae(ES5oEprVxulp(b'\xda\xb8\xf0\xd6\xaf:\x92Xv\x93\xfeZ'), chr(0b1100100) + chr(101) + chr(0b1010000 + 0o23) + chr(0b1101111) + chr(4021 - 3921) + chr(101))(chr(117) + '\164' + '\146' + '\055' + chr(1212 - 1156)))) == nzTpIcepk0o8(chr(48) + '\157' + '\x32', 0o10) or ftfygxgFas5X(roI3spqORKae(xFDEVQn5qSdh, roI3spqORKae(ES5oEprVxulp(b'\xda\xb8\xf0\xd6\xaf:\x92Xv\x93\xfeZ'), '\144' + '\145' + chr(0b10000 + 0o123) + chr(111) + '\144' + '\x65')(chr(0b1110101) + chr(0b1110100) + chr(102) + chr(1468 - 1423) + chr(1917 - 1861)))) == nzTpIcepk0o8(chr(411 - 363) + '\x6f' + chr(1460 - 1410), 8): (AQ9ceR9AaoT1, xFDEVQn5qSdh) = [nDF4gVNx0u9Q.reshape(GRbsaHW8BT5I, (ftfygxgFas5X(GRbsaHW8BT5I), -nzTpIcepk0o8(chr(48) + chr(0b10101 + 0o132) + chr(0b101110 + 0o3), 0b1000))) for GRbsaHW8BT5I in (AQ9ceR9AaoT1, xFDEVQn5qSdh)] return roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xe5\x82\xc5\xd8\xc0L\xc6L\x01\xa9\x8at'), chr(8812 - 8712) + chr(0b100010 + 0o103) + '\143' + '\x6f' + chr(0b1100100) + chr(4762 - 4661))(chr(7299 - 7182) + chr(0b1101000 + 0o14) + chr(0b1001010 + 0o34) + chr(0b101 + 0o50) + '\070'))(roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xc5\xa1\xe0\xef'), chr(0b1001111 + 0o25) + chr(101) + chr(99) + chr(0b1001100 + 0o43) + chr(0b1011110 + 0o6) + '\145')('\x75' + '\x74' + '\146' + '\055' + '\070'))(roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xd9\xb3\xfe\xd8\xa7G\xecsq\x9b\xaaj'), chr(100) + chr(101) + '\x63' + '\157' + chr(3287 - 3187) + chr(101))(chr(0b1110101) + chr(609 - 493) + chr(0b1000000 + 0o46) + '\055' + chr(2516 - 2460)))((AQ9ceR9AaoT1 - xFDEVQn5qSdh) ** nzTpIcepk0o8('\060' + chr(6497 - 6386) + chr(50), 8), axis=nzTpIcepk0o8('\060' + '\x6f' + chr(0b1111 + 0o41), 0o10))), nzTpIcepk0o8('\x30' + chr(0b110110 + 0o71) + '\x30', 8))
noahbenson/neuropythy
neuropythy/geometry/util.py
segments_overlapping
def segments_overlapping(ab, cd): ''' segments_overlapping((a, b), (c, d)) yields True if the line segments (a,b) and (c,d) are both colinear and have a non-finite overlap. If (a,b) and (c,d) touch at a single point, they are not considered overlapping. ''' (a,b) = ab (c,d) = cd ss = [point_in_segment(ab, c), point_in_segment(ab, d), point_in_segment(cd, a), point_in_segment(cd, b)] return (~(points_close(a,b) | points_close(c,d)) & ((np.sum(ss, axis=0) > 1) | (points_close(a,c) & points_close(b,d)) | (points_close(a,d) & points_close(b,c))))
python
def segments_overlapping(ab, cd): ''' segments_overlapping((a, b), (c, d)) yields True if the line segments (a,b) and (c,d) are both colinear and have a non-finite overlap. If (a,b) and (c,d) touch at a single point, they are not considered overlapping. ''' (a,b) = ab (c,d) = cd ss = [point_in_segment(ab, c), point_in_segment(ab, d), point_in_segment(cd, a), point_in_segment(cd, b)] return (~(points_close(a,b) | points_close(c,d)) & ((np.sum(ss, axis=0) > 1) | (points_close(a,c) & points_close(b,d)) | (points_close(a,d) & points_close(b,c))))
[ "def", "segments_overlapping", "(", "ab", ",", "cd", ")", ":", "(", "a", ",", "b", ")", "=", "ab", "(", "c", ",", "d", ")", "=", "cd", "ss", "=", "[", "point_in_segment", "(", "ab", ",", "c", ")", ",", "point_in_segment", "(", "ab", ",", "d", ...
segments_overlapping((a, b), (c, d)) yields True if the line segments (a,b) and (c,d) are both colinear and have a non-finite overlap. If (a,b) and (c,d) touch at a single point, they are not considered overlapping.
[ "segments_overlapping", "((", "a", "b", ")", "(", "c", "d", "))", "yields", "True", "if", "the", "line", "segments", "(", "a", "b", ")", "and", "(", "c", "d", ")", "are", "both", "colinear", "and", "have", "a", "non", "-", "finite", "overlap", ".",...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/util.py#L201-L214
train
Returns a boolean array indicating if two line segments overlap.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipG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V3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(4834 - 4723) + '\x31' + '\062' + '\066', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(50) + chr(888 - 838) + chr(0b110011), 19969 - 19961), nzTpIcepk0o8('\x30' + chr(3863 - 3752) + chr(49) + chr(0b10100 + 0o35) + chr(0b11111 + 0o21), 60060 - 60052), nzTpIcepk0o8(chr(2111 - 2063) + chr(0b1101111) + chr(0b110010 + 0o5) + chr(775 - 721), 27585 - 27577), nzTpIcepk0o8('\060' + chr(0b100 + 0o153) + '\062' + '\060' + chr(2284 - 2236), 43273 - 43265), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b1101111) + '\x32' + chr(55) + '\061', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1011100 + 0o23) + chr(342 - 291) + chr(51) + chr(52), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1632 - 1583) + chr(53) + chr(0b110011), 117 - 109), nzTpIcepk0o8('\060' + chr(0b1101111) + '\067' + chr(50), 0o10), nzTpIcepk0o8(chr(556 - 508) + chr(0b1100100 + 0o13) + chr(619 - 568) + '\x34' + chr(48), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + '\060' + chr(0b101 + 0o53), 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010) + chr(0b110010) + '\x37', 0o10), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(0b1101111) + chr(945 - 896) + '\x30' + chr(0b100001 + 0o25), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(50) + chr(0b101011 + 0o7) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b110011 + 0o74) + '\061' + chr(50) + chr(1797 - 1747), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(654 - 602) + chr(0b11001 + 0o32), 0o10), nzTpIcepk0o8('\060' + chr(10945 - 10834) + '\x32' + '\060' + chr(0b1000 + 0o57), 0b1000), nzTpIcepk0o8(chr(1333 - 1285) + chr(0b1101111) + chr(0b110011) + '\067' + '\066', 0b1000), nzTpIcepk0o8(chr(0b111 + 0o51) + '\157' + chr(0b110111) + chr(53), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(49) + '\061' + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(54) + chr(55), 0b1000), nzTpIcepk0o8(chr(2165 - 2117) + chr(7437 - 7326) + chr(51) + chr(0b1100 + 0o51) + '\x33', 0o10), nzTpIcepk0o8('\060' + chr(111) + '\063' + '\x33' + '\x34', 8), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001 + 0o2) + chr(2838 - 2783) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(419 - 371) + chr(6120 - 6009) + chr(0b110001) + chr(2105 - 2055), ord("\x08")), nzTpIcepk0o8('\060' + chr(8258 - 8147) + chr(51) + '\x35' + '\x33', 8), nzTpIcepk0o8(chr(0b101010 + 0o6) + '\x6f' + chr(49) + chr(49) + '\x31', 8), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + chr(1020 - 969) + chr(0b110001), 798 - 790), nzTpIcepk0o8(chr(179 - 131) + chr(0b1101111) + chr(0b101110 + 0o5) + '\066' + chr(0b110111), 0b1000), nzTpIcepk0o8('\x30' + chr(11106 - 10995) + chr(291 - 240) + '\062' + '\060', 45588 - 45580), nzTpIcepk0o8('\060' + chr(0b1001000 + 0o47) + '\x32' + chr(0b110011) + '\x32', 0b1000), nzTpIcepk0o8('\060' + chr(0b1100101 + 0o12) + '\063' + '\067', 10500 - 10492), nzTpIcepk0o8(chr(48) + chr(0b100100 + 0o113) + chr(49) + chr(55) + chr(0b110011), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + chr(0b100000 + 0o23), 0o10), nzTpIcepk0o8('\060' + chr(0b101010 + 0o105) + chr(51) + '\x36' + chr(55), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(173 - 123) + chr(48) + chr(160 - 110), 42044 - 42036), nzTpIcepk0o8(chr(0b1 + 0o57) + '\x6f' + chr(514 - 465) + chr(0b110001) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(50) + '\060' + '\x37', 8), nzTpIcepk0o8(chr(0b101 + 0o53) + '\157' + chr(0b11 + 0o56) + chr(49) + '\x36', 0o10), nzTpIcepk0o8(chr(881 - 833) + chr(0b1101111) + chr(52) + chr(0b110110), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(463 - 352) + '\x35' + chr(1196 - 1148), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'x'), chr(100) + chr(101) + '\x63' + chr(0b1101111) + '\x64' + chr(0b10000 + 0o125))(chr(0b1001010 + 0o53) + chr(0b1100001 + 0o23) + '\x66' + chr(0b101101) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def JVG6ghL0qgMM(HmzFvPCBR3m5, CCTFMh7yGsWY): (AQ9ceR9AaoT1, xFDEVQn5qSdh) = HmzFvPCBR3m5 (teUmM7cKWZUa, vPPlOXQgR3SM) = CCTFMh7yGsWY XghpB4dXzQ6r = [DXdl_ZYIGbBD(HmzFvPCBR3m5, teUmM7cKWZUa), DXdl_ZYIGbBD(HmzFvPCBR3m5, vPPlOXQgR3SM), DXdl_ZYIGbBD(CCTFMh7yGsWY, AQ9ceR9AaoT1), DXdl_ZYIGbBD(CCTFMh7yGsWY, xFDEVQn5qSdh)] return ~(JmEpOgMPmRVN(AQ9ceR9AaoT1, xFDEVQn5qSdh) | JmEpOgMPmRVN(teUmM7cKWZUa, vPPlOXQgR3SM)) & ((roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'9\xf0$}\xb8\xfd\x90\x01{\xbf\xec\xc1'), chr(0b1100100) + '\145' + '\143' + chr(111) + chr(0b111001 + 0o53) + '\x65')(chr(117) + chr(4752 - 4636) + chr(102) + chr(0b11001 + 0o24) + '\x38'))(XghpB4dXzQ6r, axis=nzTpIcepk0o8(chr(153 - 105) + '\157' + chr(48), 56662 - 56654)) > nzTpIcepk0o8(chr(992 - 944) + chr(111) + '\x31', 58877 - 58869)) | JmEpOgMPmRVN(AQ9ceR9AaoT1, teUmM7cKWZUa) & JmEpOgMPmRVN(xFDEVQn5qSdh, vPPlOXQgR3SM) | JmEpOgMPmRVN(AQ9ceR9AaoT1, vPPlOXQgR3SM) & JmEpOgMPmRVN(xFDEVQn5qSdh, teUmM7cKWZUa))
noahbenson/neuropythy
neuropythy/geometry/util.py
line_intersection_2D
def line_intersection_2D(abarg, cdarg): ''' line_intersection((a, b), (c, d)) yields the intersection point between the lines that pass through the given pairs of points. If any lines are parallel, (numpy.nan, numpy.nan) is returned; note that a, b, c, and d can all be 2 x n matrices of x and y coordinate row-vectors. ''' ((x1,y1),(x2,y2)) = abarg ((x3,y3),(x4,y4)) = cdarg dx12 = (x1 - x2) dx34 = (x3 - x4) dy12 = (y1 - y2) dy34 = (y3 - y4) denom = dx12*dy34 - dy12*dx34 unit = np.isclose(denom, 0) if unit is True: return (np.nan, np.nan) denom = unit + denom q12 = (x1*y2 - y1*x2) / denom q34 = (x3*y4 - y3*x4) / denom xi = q12*dx34 - q34*dx12 yi = q12*dy34 - q34*dy12 if unit is False: return (xi, yi) elif unit is True: return (np.nan, np.nan) else: xi = np.asarray(xi) yi = np.asarray(yi) xi[unit] = np.nan yi[unit] = np.nan return (xi, yi)
python
def line_intersection_2D(abarg, cdarg): ''' line_intersection((a, b), (c, d)) yields the intersection point between the lines that pass through the given pairs of points. If any lines are parallel, (numpy.nan, numpy.nan) is returned; note that a, b, c, and d can all be 2 x n matrices of x and y coordinate row-vectors. ''' ((x1,y1),(x2,y2)) = abarg ((x3,y3),(x4,y4)) = cdarg dx12 = (x1 - x2) dx34 = (x3 - x4) dy12 = (y1 - y2) dy34 = (y3 - y4) denom = dx12*dy34 - dy12*dx34 unit = np.isclose(denom, 0) if unit is True: return (np.nan, np.nan) denom = unit + denom q12 = (x1*y2 - y1*x2) / denom q34 = (x3*y4 - y3*x4) / denom xi = q12*dx34 - q34*dx12 yi = q12*dy34 - q34*dy12 if unit is False: return (xi, yi) elif unit is True: return (np.nan, np.nan) else: xi = np.asarray(xi) yi = np.asarray(yi) xi[unit] = np.nan yi[unit] = np.nan return (xi, yi)
[ "def", "line_intersection_2D", "(", "abarg", ",", "cdarg", ")", ":", "(", "(", "x1", ",", "y1", ")", ",", "(", "x2", ",", "y2", ")", ")", "=", "abarg", "(", "(", "x3", ",", "y3", ")", ",", "(", "x4", ",", "y4", ")", ")", "=", "cdarg", "dx12...
line_intersection((a, b), (c, d)) yields the intersection point between the lines that pass through the given pairs of points. If any lines are parallel, (numpy.nan, numpy.nan) is returned; note that a, b, c, and d can all be 2 x n matrices of x and y coordinate row-vectors.
[ "line_intersection", "((", "a", "b", ")", "(", "c", "d", "))", "yields", "the", "intersection", "point", "between", "the", "lines", "that", "pass", "through", "the", "given", "pairs", "of", "points", ".", "If", "any", "lines", "are", "parallel", "(", "nu...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/util.py#L216-L243
train
line_intersection yields the intersection point between the lines that pass through the given pairs of points.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO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e6tJqMV,typojWN5Phrq,gufQJgTAhMnI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1431 - 1383) + '\x6f' + chr(0b11000 + 0o32) + chr(0b110010) + '\x36', 40236 - 40228), nzTpIcepk0o8(chr(48) + '\157' + chr(53) + '\x34', 0o10), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b1 + 0o156) + chr(0b110110), 22550 - 22542), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b1101111) + chr(2083 - 2033) + chr(48) + chr(49), 0o10), nzTpIcepk0o8('\060' + chr(562 - 451) + chr(0b110010) + chr(48) + chr(0b11011 + 0o34), 0o10), nzTpIcepk0o8(chr(482 - 434) + chr(111) + '\064' + chr(0b101011 + 0o12), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(2756 - 2645) + chr(1768 - 1719) + '\x31' + '\x33', 23461 - 23453), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001) + chr(2270 - 2218), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + chr(0b110011) + chr(54), 17262 - 17254), nzTpIcepk0o8(chr(48) + chr(0b1011011 + 0o24) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\065' + chr(0b101100 + 0o12), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b1110 + 0o45) + '\x33', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(11837 - 11726) + '\062' + '\x32' + '\062', 0b1000), nzTpIcepk0o8('\x30' + chr(0b11011 + 0o124) + chr(51) + chr(49) + '\062', ord("\x08")), nzTpIcepk0o8(chr(1699 - 1651) + chr(3056 - 2945) + chr(1772 - 1721) + chr(0b110100) + chr(54), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\x31' + chr(53) + chr(2208 - 2153), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110011) + chr(1867 - 1819) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b1101111) + chr(50) + '\066' + chr(594 - 544), 54985 - 54977), nzTpIcepk0o8('\060' + chr(0b1001110 + 0o41) + '\x31' + chr(0b110100 + 0o3) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\064' + chr(0b1000 + 0o52), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(5045 - 4934) + chr(0b100001 + 0o22) + chr(0b101100 + 0o4), 0b1000), nzTpIcepk0o8('\x30' + chr(4660 - 4549) + chr(51) + chr(50) + chr(1372 - 1317), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b101110 + 0o101) + '\062' + '\064', 40601 - 40593), nzTpIcepk0o8(chr(0b110000) + chr(0b101111 + 0o100) + '\062' + '\x33' + '\063', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\x36' + '\061', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + '\064', 31808 - 31800), nzTpIcepk0o8('\x30' + chr(111) + '\065' + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1783 - 1728) + chr(0b101100 + 0o10), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(51) + chr(0b110000) + '\066', 4250 - 4242), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110111) + chr(0b110010), 10524 - 10516), nzTpIcepk0o8(chr(0b110000) + '\157' + '\061' + chr(0b1010 + 0o50) + chr(1557 - 1508), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(51) + chr(55) + chr(2335 - 2281), 29047 - 29039), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + chr(2725 - 2670) + chr(0b110001), 8923 - 8915), nzTpIcepk0o8(chr(0b110000) + chr(0b111110 + 0o61) + chr(50) + chr(440 - 386) + chr(54), 0o10), nzTpIcepk0o8('\060' + chr(0b100110 + 0o111) + '\066' + chr(0b1010 + 0o52), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + chr(49) + chr(55), 0b1000), nzTpIcepk0o8(chr(0b1110 + 0o42) + '\x6f' + '\061' + chr(2028 - 1974) + chr(0b100010 + 0o20), 0o10), nzTpIcepk0o8(chr(0b100000 + 0o20) + '\157' + chr(1898 - 1845) + chr(0b101010 + 0o13), 0b1000), nzTpIcepk0o8(chr(357 - 309) + chr(111) + chr(1577 - 1528) + chr(54) + '\060', ord("\x08")), nzTpIcepk0o8(chr(380 - 332) + chr(0b1101111) + '\064' + '\x32', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(985 - 937) + chr(0b1010101 + 0o32) + chr(0b110101 + 0o0) + '\060', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xb8'), chr(5418 - 5318) + '\145' + chr(4705 - 4606) + '\157' + chr(3582 - 3482) + '\145')(chr(0b1010001 + 0o44) + chr(0b1110100) + chr(0b10 + 0o144) + chr(1882 - 1837) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def G7KFUUEIqY5Z(vWkdOMZKsDpt, PuorF1qcljX0): ((yZDwVNk0Rmbq, zZzCuXvNcn0e), (rpGiIBuTNlZH, IEn9C8QzrD_O)) = vWkdOMZKsDpt ((sIdjdeevyJnk, letlHQocEiRj), (lcsTaqL0O4Tu, FgcCw_kJrYVq)) = PuorF1qcljX0 RYFr_AGVb5b_ = yZDwVNk0Rmbq - rpGiIBuTNlZH r4LK7im0M5v1 = sIdjdeevyJnk - lcsTaqL0O4Tu hS7rkDwK6Pzw = zZzCuXvNcn0e - IEn9C8QzrD_O I2WfPwhphXJS = letlHQocEiRj - FgcCw_kJrYVq nnsD2zWjRJMB = RYFr_AGVb5b_ * I2WfPwhphXJS - hS7rkDwK6Pzw * r4LK7im0M5v1 FMmD16A2grCG = nDF4gVNx0u9Q.SRWC_OfU1mLH(nnsD2zWjRJMB, nzTpIcepk0o8('\x30' + chr(111) + chr(1400 - 1352), 0o10)) if FMmD16A2grCG is nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1101111) + '\061', 14094 - 14086): return (roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xf8Mh'), '\x64' + '\x65' + chr(0b1100011) + chr(0b1101111) + '\144' + chr(0b1100101))('\x75' + '\x74' + '\x66' + chr(889 - 844) + chr(0b1 + 0o67))), roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xf8Mh'), '\x64' + '\x65' + chr(0b11001 + 0o112) + chr(0b1101111) + '\144' + '\x65')(chr(10608 - 10491) + '\164' + chr(5791 - 5689) + '\055' + chr(1879 - 1823)))) nnsD2zWjRJMB = FMmD16A2grCG + nnsD2zWjRJMB kAAZB_KmT2HB = (yZDwVNk0Rmbq * IEn9C8QzrD_O - zZzCuXvNcn0e * rpGiIBuTNlZH) / nnsD2zWjRJMB N7D5sKpV45ND = (sIdjdeevyJnk * FgcCw_kJrYVq - letlHQocEiRj * lcsTaqL0O4Tu) / nnsD2zWjRJMB RvIlWjbM17sp = kAAZB_KmT2HB * r4LK7im0M5v1 - N7D5sKpV45ND * RYFr_AGVb5b_ cR0LK4Idqpa1 = kAAZB_KmT2HB * I2WfPwhphXJS - N7D5sKpV45ND * hS7rkDwK6Pzw if FMmD16A2grCG is nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b11001 + 0o27), 8): return (RvIlWjbM17sp, cR0LK4Idqpa1) elif FMmD16A2grCG is nzTpIcepk0o8(chr(1051 - 1003) + chr(111) + chr(0b110001), 8): return (roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xf8Mh'), chr(100) + chr(0b1101 + 0o130) + '\x63' + chr(0b11111 + 0o120) + chr(0b11 + 0o141) + chr(101))('\x75' + chr(116) + chr(0b101010 + 0o74) + '\x2d' + '\x38')), roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xf8Mh'), chr(0b101001 + 0o73) + chr(0b1100101) + chr(0b1100011) + chr(111) + '\x64' + chr(0b11101 + 0o110))(chr(2362 - 2245) + '\x74' + chr(0b11110 + 0o110) + chr(658 - 613) + chr(0b1100 + 0o54)))) else: RvIlWjbM17sp = nDF4gVNx0u9Q.asarray(RvIlWjbM17sp) cR0LK4Idqpa1 = nDF4gVNx0u9Q.asarray(cR0LK4Idqpa1) RvIlWjbM17sp[FMmD16A2grCG] = nDF4gVNx0u9Q.nan cR0LK4Idqpa1[FMmD16A2grCG] = nDF4gVNx0u9Q.nan return (RvIlWjbM17sp, cR0LK4Idqpa1)
noahbenson/neuropythy
neuropythy/geometry/util.py
lines_touch_2D
def lines_touch_2D(ab, cd): ''' lines_touch_2D((a,b), (c,d)) is equivalent to lines_colinear((a,b), (c,d)) | numpy.isfinite(line_intersection_2D((a,b), (c,d))[0]) ''' return lines_colinear(ab, cd) | np.isfinite(line_intersection_2D(ab, cd)[0])
python
def lines_touch_2D(ab, cd): ''' lines_touch_2D((a,b), (c,d)) is equivalent to lines_colinear((a,b), (c,d)) | numpy.isfinite(line_intersection_2D((a,b), (c,d))[0]) ''' return lines_colinear(ab, cd) | np.isfinite(line_intersection_2D(ab, cd)[0])
[ "def", "lines_touch_2D", "(", "ab", ",", "cd", ")", ":", "return", "lines_colinear", "(", "ab", ",", "cd", ")", "|", "np", ".", "isfinite", "(", "line_intersection_2D", "(", "ab", ",", "cd", ")", "[", "0", "]", ")" ]
lines_touch_2D((a,b), (c,d)) is equivalent to lines_colinear((a,b), (c,d)) | numpy.isfinite(line_intersection_2D((a,b), (c,d))[0])
[ "lines_touch_2D", "((", "a", "b", ")", "(", "c", "d", "))", "is", "equivalent", "to", "lines_colinear", "((", "a", "b", ")", "(", "c", "d", "))", "|", "numpy", ".", "isfinite", "(", "line_intersection_2D", "((", "a", "b", ")", "(", "c", "d", "))", ...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/util.py#L283-L288
train
Return true if the lines touch the 2D polygon.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiy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O6,QNQS9e6tJqMV,typojWN5Phrq,gufQJgTAhMnI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b10110 + 0o32) + '\157' + chr(0b110011) + chr(1300 - 1252) + chr(1178 - 1123), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + chr(0b110001) + chr(0b110110), 48902 - 48894), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(810 - 761) + chr(0b110111), 65269 - 65261), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + '\x31' + chr(2521 - 2467), 25747 - 25739), nzTpIcepk0o8('\060' + chr(0b110000 + 0o77) + '\061' + '\065' + chr(295 - 240), 36081 - 36073), nzTpIcepk0o8('\x30' + chr(111) + chr(51) + '\062', 51550 - 51542), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(111) + chr(855 - 806) + chr(49) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(2044 - 1996) + chr(0b1101111) + chr(0b110001) + chr(0b110010) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(0b100001 + 0o17) + '\157' + chr(49) + '\064' + chr(2528 - 2476), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(4210 - 4099) + chr(1164 - 1113) + chr(0b110000) + chr(54), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(54) + chr(0b110010), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(231 - 180) + chr(2495 - 2440) + chr(54), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110111) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + chr(0b11110 + 0o24), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(50) + '\x32' + chr(0b100011 + 0o17), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b100011 + 0o114) + chr(0b10001 + 0o43) + chr(0b110111), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(49) + chr(731 - 683) + '\x33', 0o10), nzTpIcepk0o8('\x30' + chr(8150 - 8039) + chr(0b101 + 0o55) + chr(0b10010 + 0o43) + chr(0b10010 + 0o37), 30360 - 30352), nzTpIcepk0o8(chr(48) + chr(111) + chr(2316 - 2266) + chr(52) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(1615 - 1567) + '\157' + chr(49) + chr(50) + chr(142 - 91), 44992 - 44984), nzTpIcepk0o8(chr(1903 - 1855) + chr(111) + '\062' + chr(0b11001 + 0o33) + chr(1913 - 1858), 40934 - 40926), nzTpIcepk0o8(chr(48) + chr(0b1101111 + 0o0) + chr(2279 - 2229) + chr(49), 39337 - 39329), nzTpIcepk0o8('\x30' + chr(12233 - 12122) + '\x31' + chr(54) + chr(316 - 264), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + '\063' + '\062', 0o10), nzTpIcepk0o8(chr(48) + chr(9006 - 8895) + '\062' + chr(0b10000 + 0o41) + '\x33', 0b1000), nzTpIcepk0o8('\060' + chr(0b10100 + 0o133) + chr(0b11101 + 0o26) + chr(54) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(3726 - 3615) + chr(2340 - 2290) + chr(53) + chr(0b101110 + 0o11), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(969 - 919) + chr(0b1 + 0o61) + chr(51), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + '\x37' + '\x35', 13090 - 13082), nzTpIcepk0o8(chr(2023 - 1975) + '\x6f' + '\x31' + chr(0b110001) + '\064', 8), nzTpIcepk0o8('\060' + chr(3957 - 3846) + chr(0b110011) + chr(0b110000) + chr(48), 54671 - 54663), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(111) + chr(2310 - 2256) + chr(0b0 + 0o67), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + chr(0b110 + 0o57) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(1858 - 1810) + chr(0b1101111) + chr(53) + chr(0b11000 + 0o31), 64410 - 64402), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b101111 + 0o2) + '\x32', 8), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + chr(0b11010 + 0o32) + '\062', 34252 - 34244), nzTpIcepk0o8('\060' + chr(111) + '\x31' + '\061' + chr(52), 8), nzTpIcepk0o8(chr(2273 - 2225) + chr(8039 - 7928) + chr(0b111 + 0o53) + chr(288 - 238) + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + '\x34' + '\x36', 0o10), nzTpIcepk0o8('\060' + chr(3978 - 3867) + '\065' + chr(0b10111 + 0o37), 28052 - 28044)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b1001010 + 0o45) + chr(0b100101 + 0o20) + '\x30', 55915 - 55907)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xe9'), chr(0b1100100) + '\x65' + '\x63' + chr(8320 - 8209) + chr(5611 - 5511) + chr(0b1100101))(chr(0b1110101) + '\164' + '\146' + '\055' + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def p_juXvGF3yoF(HmzFvPCBR3m5, CCTFMh7yGsWY): return uC0VwEqdp1WG(HmzFvPCBR3m5, CCTFMh7yGsWY) | roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\x86\x99w\xfe8j\x0b#\x1c\x93\x03\xcb'), chr(3167 - 3067) + chr(6540 - 6439) + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(116) + chr(102) + '\055' + chr(0b111000)))(G7KFUUEIqY5Z(HmzFvPCBR3m5, CCTFMh7yGsWY)[nzTpIcepk0o8(chr(0b10 + 0o56) + '\157' + chr(0b1 + 0o57), 0o10)])
noahbenson/neuropythy
neuropythy/geometry/util.py
segments_touch_2D
def segments_touch_2D(ab, cd): ''' segmentss_touch_2D((a,b), (c,d)) is equivalent to segments_colinear((a,b), (c,d)) | numpy.isfinite(segment_intersection_2D((a,b), (c,d))[0]) ''' return segments_colinear(ab, cd) | np.isfinite(segment_intersection_2D(ab, cd)[0])
python
def segments_touch_2D(ab, cd): ''' segmentss_touch_2D((a,b), (c,d)) is equivalent to segments_colinear((a,b), (c,d)) | numpy.isfinite(segment_intersection_2D((a,b), (c,d))[0]) ''' return segments_colinear(ab, cd) | np.isfinite(segment_intersection_2D(ab, cd)[0])
[ "def", "segments_touch_2D", "(", "ab", ",", "cd", ")", ":", "return", "segments_colinear", "(", "ab", ",", "cd", ")", "|", "np", ".", "isfinite", "(", "segment_intersection_2D", "(", "ab", ",", "cd", ")", "[", "0", "]", ")" ]
segmentss_touch_2D((a,b), (c,d)) is equivalent to segments_colinear((a,b), (c,d)) | numpy.isfinite(segment_intersection_2D((a,b), (c,d))[0])
[ "segmentss_touch_2D", "((", "a", "b", ")", "(", "c", "d", "))", "is", "equivalent", "to", "segments_colinear", "((", "a", "b", ")", "(", "c", "d", "))", "|", "numpy", ".", "isfinite", "(", "segment_intersection_2D", "((", "a", "b", ")", "(", "c", "d"...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/util.py#L290-L295
train
Return true if two segments touch the 2D segment.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf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0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(967 - 919) + chr(7306 - 7195) + chr(2374 - 2323) + '\x37' + chr(53), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\066' + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b11101 + 0o26) + '\x34' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(53) + chr(2162 - 2109), 39358 - 39350), nzTpIcepk0o8('\x30' + '\x6f' + chr(49) + chr(0b11011 + 0o32) + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\061' + chr(55) + chr(0b11100 + 0o31), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1000010 + 0o55) + chr(0b11111 + 0o22) + chr(50) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(0b11111 + 0o120) + '\063' + chr(48) + chr(0b100011 + 0o24), 31754 - 31746), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(111) + '\x31' + chr(0b101011 + 0o11) + '\x36', 45473 - 45465), nzTpIcepk0o8('\x30' + chr(111) + chr(53) + chr(0b100111 + 0o16), ord("\x08")), nzTpIcepk0o8(chr(1090 - 1042) + '\x6f' + '\x31' + chr(0b110011) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1001101 + 0o42) + '\063' + chr(0b110110), 29185 - 29177), nzTpIcepk0o8('\x30' + chr(9097 - 8986) + chr(0b110111) + chr(50), 60055 - 60047), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + chr(1624 - 1576), 55787 - 55779), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(111) + chr(0b1000 + 0o53) + chr(51) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b11001 + 0o30) + '\066' + '\060', 0b1000), nzTpIcepk0o8(chr(1246 - 1198) + '\157' + chr(1347 - 1297) + '\066' + chr(53), 12553 - 12545), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b101100 + 0o7) + chr(121 - 72), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + chr(0b11 + 0o64) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(209 - 161) + '\157' + chr(2282 - 2232) + '\061' + chr(1950 - 1897), ord("\x08")), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(0b1101111) + '\x32' + chr(0b100 + 0o56) + chr(0b110111), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\x32' + chr(0b1000 + 0o57) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2014 - 1963) + chr(2103 - 2052) + chr(0b0 + 0o65), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(0b110111) + '\064', 32559 - 32551), nzTpIcepk0o8(chr(0b100110 + 0o12) + '\157' + chr(0b11010 + 0o35) + '\060', 65439 - 65431), nzTpIcepk0o8(chr(1098 - 1050) + chr(6894 - 6783) + chr(0b110010) + chr(0b101110 + 0o7) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(1882 - 1834) + '\157' + chr(0b110011) + '\067' + chr(839 - 789), 0o10), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(6004 - 5893) + chr(49) + chr(0b1101 + 0o50), 0b1000), nzTpIcepk0o8(chr(0b100 + 0o54) + '\157' + chr(0b110001) + chr(2767 - 2714) + '\065', ord("\x08")), nzTpIcepk0o8(chr(496 - 448) + '\157' + chr(0b110011) + chr(1147 - 1092) + chr(49), 0b1000), nzTpIcepk0o8('\060' + chr(3633 - 3522) + '\062' + '\x35' + chr(54), 30612 - 30604), nzTpIcepk0o8('\060' + '\157' + chr(0b10 + 0o60) + '\067' + chr(0b101101 + 0o11), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + '\060', 58018 - 58010), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + chr(0b100100 + 0o15), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b100000 + 0o117) + '\x31' + '\065' + chr(51), 55022 - 55014), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010) + chr(0b110101), 46120 - 46112), nzTpIcepk0o8(chr(498 - 450) + chr(0b1101111) + chr(50) + chr(0b110010) + chr(0b110011), 57248 - 57240), nzTpIcepk0o8('\x30' + chr(7574 - 7463) + chr(51) + chr(1849 - 1796) + '\066', ord("\x08")), nzTpIcepk0o8(chr(924 - 876) + chr(0b1100011 + 0o14) + '\x33' + chr(2336 - 2286) + '\065', ord("\x08")), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\x6f' + '\x34' + '\064', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2100 - 2047) + chr(0b110000), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xd3'), '\144' + chr(8991 - 8890) + '\x63' + chr(560 - 449) + chr(0b100110 + 0o76) + '\x65')(chr(0b110001 + 0o104) + '\164' + '\146' + chr(0b101101) + chr(1920 - 1864)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def ULizhtcrQ0mX(HmzFvPCBR3m5, CCTFMh7yGsWY): return gMvz42W_4lyz(HmzFvPCBR3m5, CCTFMh7yGsWY) | roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xbca\x9f\x9d?\r\x15\xb0\x1exh+'), chr(100) + chr(101) + chr(0b1100011) + chr(111) + '\x64' + '\145')('\x75' + '\164' + chr(0b1100110) + '\055' + chr(2346 - 2290)))(BUrvOM60cbHP(HmzFvPCBR3m5, CCTFMh7yGsWY)[nzTpIcepk0o8('\060' + chr(10367 - 10256) + chr(0b11 + 0o55), 21596 - 21588)])
noahbenson/neuropythy
neuropythy/geometry/util.py
line_segment_intersection_2D
def line_segment_intersection_2D(p12arg, p34arg): ''' line_segment_intersection((a, b), (c, d)) yields the intersection point between the line passing through points a and b and the line segment that passes from point c to point d. If there is no intersection point, then (numpy.nan, numpy.nan) is returned. ''' (p1,p2) = p12arg (p3,p4) = p34arg pi = np.asarray(line_intersection_2D(p12arg, p34arg)) p3 = np.asarray(p3) u34 = p4 - p3 cfn = lambda px,iis: (px if iis is None or len(px.shape) == 1 or px.shape[1] == len(iis) else px[:,iis]) dfn = lambda a,b: a[0]*b[0] + a[1]*b[1] sfn = lambda a,b: ((a-b) if len(a.shape) == len(b.shape) else (np.transpose([a])-b) if len(a.shape) < len(b.shape) else (a - np.transpose([b]))) fn = lambda px,iis: (1 - ((dfn(cfn(u34,iis), sfn( px, cfn(p3,iis))) > 0) * (dfn(cfn(u34,iis), sfn(cfn(p4,iis), px)) > 0))) if len(pi.shape) == 1: if not np.isfinite(pi[0]): return (np.nan, np.nan) bad = fn(pi, None) return (np.nan, np.nan) if bad else pi else: nonpar = np.where(np.isfinite(pi[0]))[0] bad = fn(cfn(pi, nonpar), nonpar) (xi,yi) = pi bad = nonpar[np.where(bad)[0]] xi[bad] = np.nan yi[bad] = np.nan return (xi,yi)
python
def line_segment_intersection_2D(p12arg, p34arg): ''' line_segment_intersection((a, b), (c, d)) yields the intersection point between the line passing through points a and b and the line segment that passes from point c to point d. If there is no intersection point, then (numpy.nan, numpy.nan) is returned. ''' (p1,p2) = p12arg (p3,p4) = p34arg pi = np.asarray(line_intersection_2D(p12arg, p34arg)) p3 = np.asarray(p3) u34 = p4 - p3 cfn = lambda px,iis: (px if iis is None or len(px.shape) == 1 or px.shape[1] == len(iis) else px[:,iis]) dfn = lambda a,b: a[0]*b[0] + a[1]*b[1] sfn = lambda a,b: ((a-b) if len(a.shape) == len(b.shape) else (np.transpose([a])-b) if len(a.shape) < len(b.shape) else (a - np.transpose([b]))) fn = lambda px,iis: (1 - ((dfn(cfn(u34,iis), sfn( px, cfn(p3,iis))) > 0) * (dfn(cfn(u34,iis), sfn(cfn(p4,iis), px)) > 0))) if len(pi.shape) == 1: if not np.isfinite(pi[0]): return (np.nan, np.nan) bad = fn(pi, None) return (np.nan, np.nan) if bad else pi else: nonpar = np.where(np.isfinite(pi[0]))[0] bad = fn(cfn(pi, nonpar), nonpar) (xi,yi) = pi bad = nonpar[np.where(bad)[0]] xi[bad] = np.nan yi[bad] = np.nan return (xi,yi)
[ "def", "line_segment_intersection_2D", "(", "p12arg", ",", "p34arg", ")", ":", "(", "p1", ",", "p2", ")", "=", "p12arg", "(", "p3", ",", "p4", ")", "=", "p34arg", "pi", "=", "np", ".", "asarray", "(", "line_intersection_2D", "(", "p12arg", ",", "p34arg...
line_segment_intersection((a, b), (c, d)) yields the intersection point between the line passing through points a and b and the line segment that passes from point c to point d. If there is no intersection point, then (numpy.nan, numpy.nan) is returned.
[ "line_segment_intersection", "((", "a", "b", ")", "(", "c", "d", "))", "yields", "the", "intersection", "point", "between", "the", "line", "passing", "through", "points", "a", "and", "b", "and", "the", "line", "segment", "that", "passes", "from", "point", ...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/util.py#L297-L327
train
line_segment_intersection returns the intersection point between two line segments p12arg and p34arg.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRiM1qvaW7,WbNHlDKpyPtQ,z18h6aCn31dg,oxjHmqoBrCHG,GA4ANb_Tki5v,LdFlJ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xMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(10339 - 10228) + chr(2424 - 2374) + chr(0b110111 + 0o0) + '\x31', 13559 - 13551), nzTpIcepk0o8('\x30' + '\157' + chr(915 - 865) + chr(0b110011) + '\066', 60241 - 60233), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\065' + chr(0b10100 + 0o37), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + chr(2593 - 2539) + chr(294 - 243), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + '\065' + '\x34', 0o10), nzTpIcepk0o8(chr(81 - 33) + chr(8272 - 8161) + chr(0b110010) + chr(0b101000 + 0o12), 0o10), nzTpIcepk0o8(chr(2280 - 2232) + chr(111) + chr(161 - 111) + chr(53) + '\x37', 0b1000), nzTpIcepk0o8(chr(1014 - 966) + chr(9720 - 9609) + chr(50) + chr(0b10111 + 0o35) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(9646 - 9535) + chr(1073 - 1021) + chr(0b110110), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b11000 + 0o35) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + chr(2075 - 2026) + chr(51), 0o10), nzTpIcepk0o8(chr(1559 - 1511) + '\157' + chr(0b110010) + '\x33', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110100) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b100111 + 0o110) + chr(0b11000 + 0o33) + '\x32' + chr(681 - 629), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b100110 + 0o15) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b11110 + 0o22) + '\157' + chr(0b110011) + chr(0b110110) + chr(48), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b101100 + 0o103) + chr(0b110110) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(111) + chr(0b1001 + 0o52) + '\067', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + chr(0b100110 + 0o21) + '\x37', 0o10), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(8960 - 8849) + chr(50) + chr(0b1011 + 0o53) + '\061', 3854 - 3846), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b11011 + 0o30) + chr(52), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1000011 + 0o54) + chr(50) + chr(720 - 666) + chr(0b1101 + 0o50), 14073 - 14065), nzTpIcepk0o8(chr(1774 - 1726) + chr(111) + chr(0b110111) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b101101 + 0o3) + '\x6f' + chr(866 - 817) + '\062' + chr(53), 0o10), nzTpIcepk0o8(chr(48) + chr(7662 - 7551) + '\x31' + chr(0b110100) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010) + '\062', 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1844 - 1795) + '\x33' + chr(0b100010 + 0o22), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b101001 + 0o12) + chr(50) + chr(1927 - 1876), 0b1000), nzTpIcepk0o8('\060' + chr(3730 - 3619) + chr(50) + '\x34', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + chr(997 - 948) + chr(0b100101 + 0o20), 0o10), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(6801 - 6690) + chr(362 - 313) + '\x30' + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(1366 - 1318) + '\157' + chr(0b110100) + '\064', 7334 - 7326), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50) + chr(0b110100) + chr(0b1 + 0o65), ord("\x08")), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(0b1101111) + chr(0b1101 + 0o45) + '\x33' + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(9504 - 9393) + '\062' + chr(0b110111) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(1048 - 937) + '\x32' + '\062' + chr(2325 - 2270), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(864 - 815) + chr(0b110100) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(971 - 923) + chr(0b1101111) + chr(0b10001 + 0o41) + '\x30' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(1354 - 1306) + chr(6149 - 6038) + '\067' + '\065', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(6133 - 6022) + '\x33' + '\x35' + chr(0b10011 + 0o37), 50790 - 50782)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b101111 + 0o100) + '\065' + chr(48), 12825 - 12817)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x97'), chr(5201 - 5101) + chr(0b1100101) + chr(0b1010100 + 0o17) + chr(111) + chr(0b1000011 + 0o41) + chr(5043 - 4942))(chr(13436 - 13319) + '\164' + chr(0b1100110) + '\055' + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def lbqPrpjPBw23(BuLpGUbPcOlj, S0I5iN5MgKTd): (uTffoKvaS1oJ, KSkQTDFiUtnb) = BuLpGUbPcOlj (Qbl9difUQB1t, EmO6gnVRyDvE) = S0I5iN5MgKTd nMrXkRpTQ9Oo = nDF4gVNx0u9Q.asarray(G7KFUUEIqY5Z(BuLpGUbPcOlj, S0I5iN5MgKTd)) Qbl9difUQB1t = nDF4gVNx0u9Q.asarray(Qbl9difUQB1t) AGi9iq7F5_W6 = EmO6gnVRyDvE - Qbl9difUQB1t def rTgWIxEUF07A(gXBf7Xnkfcbz, FdkICBlkBXAN): return gXBf7Xnkfcbz if FdkICBlkBXAN is None or ftfygxgFas5X(roI3spqORKae(gXBf7Xnkfcbz, roI3spqORKae(ES5oEprVxulp(b'\xd5\xf6I\xfe\xdc+\x9d\xe1`ysu'), chr(0b111 + 0o135) + chr(8512 - 8411) + '\143' + chr(8222 - 8111) + '\144' + chr(0b110110 + 0o57))(chr(0b1110101) + '\164' + chr(3190 - 3088) + '\x2d' + '\x38'))) == nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001), ord("\x08")) or roI3spqORKae(gXBf7Xnkfcbz, roI3spqORKae(ES5oEprVxulp(b'\xd5\xf6I\xfe\xdc+\x9d\xe1`ysu'), chr(100) + chr(101) + chr(0b1100011) + chr(0b101 + 0o152) + chr(0b1100100) + '\x65')(chr(0b10 + 0o163) + chr(0b1110100) + chr(102) + chr(458 - 413) + '\070'))[nzTpIcepk0o8('\x30' + '\157' + '\061', 8)] == ftfygxgFas5X(FdkICBlkBXAN) else gXBf7Xnkfcbz[:, FdkICBlkBXAN] def Q4lP93YbRoVD(AQ9ceR9AaoT1, xFDEVQn5qSdh): return AQ9ceR9AaoT1[nzTpIcepk0o8('\060' + chr(8312 - 8201) + chr(48), 10881 - 10873)] * xFDEVQn5qSdh[nzTpIcepk0o8('\x30' + chr(0b11000 + 0o127) + '\060', 8)] + AQ9ceR9AaoT1[nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b1101 + 0o44), 8)] * xFDEVQn5qSdh[nzTpIcepk0o8('\x30' + '\x6f' + '\x31', 8)] def XEqqIMxyiKYZ(AQ9ceR9AaoT1, xFDEVQn5qSdh): return AQ9ceR9AaoT1 - xFDEVQn5qSdh if ftfygxgFas5X(roI3spqORKae(AQ9ceR9AaoT1, roI3spqORKae(ES5oEprVxulp(b'\xd5\xf6I\xfe\xdc+\x9d\xe1`ysu'), chr(7034 - 6934) + '\145' + '\x63' + chr(0b1101111) + chr(100) + chr(0b11011 + 0o112))(chr(0b1011111 + 0o26) + '\x74' + chr(4523 - 4421) + '\x2d' + '\x38'))) == ftfygxgFas5X(roI3spqORKae(xFDEVQn5qSdh, roI3spqORKae(ES5oEprVxulp(b'\xd5\xf6I\xfe\xdc+\x9d\xe1`ysu'), chr(8381 - 8281) + chr(101) + '\143' + '\157' + '\x64' + chr(0b1100101))(chr(9550 - 9433) + chr(0b1001101 + 0o47) + '\x66' + chr(1565 - 1520) + '\070'))) else roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xcd\xecJ\xdd\x9fb\xc0\xd3C'), chr(100) + '\145' + chr(99) + '\x6f' + chr(100) + chr(0b1100101))(chr(0b1110101) + '\164' + chr(0b1100110) + chr(0b11111 + 0o16) + chr(0b101010 + 0o16)))([AQ9ceR9AaoT1]) - xFDEVQn5qSdh if ftfygxgFas5X(roI3spqORKae(AQ9ceR9AaoT1, roI3spqORKae(ES5oEprVxulp(b'\xd5\xf6I\xfe\xdc+\x9d\xe1`ysu'), chr(100) + '\x65' + chr(0b1100011) + chr(6651 - 6540) + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(116) + '\146' + chr(1927 - 1882) + chr(0b100011 + 0o25)))) < ftfygxgFas5X(roI3spqORKae(xFDEVQn5qSdh, roI3spqORKae(ES5oEprVxulp(b'\xd5\xf6I\xfe\xdc+\x9d\xe1`ysu'), chr(7382 - 7282) + chr(0b1100101) + chr(6932 - 6833) + chr(0b1101111) + chr(0b1011010 + 0o12) + '\x65')(chr(7697 - 7580) + chr(116) + '\x66' + chr(0b101101) + chr(2940 - 2884)))) else AQ9ceR9AaoT1 - roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xcd\xecJ\xdd\x9fb\xc0\xd3C'), '\144' + chr(0b1100101) + '\143' + chr(111) + chr(0b1100100) + chr(0b101100 + 0o71))(chr(0b111110 + 0o67) + chr(6073 - 5957) + chr(102) + chr(45) + '\070'))([xFDEVQn5qSdh]) def oo8448oP2LJ8(gXBf7Xnkfcbz, FdkICBlkBXAN): return nzTpIcepk0o8('\060' + '\157' + chr(0b110001), 8) - (Q4lP93YbRoVD(rTgWIxEUF07A(AGi9iq7F5_W6, FdkICBlkBXAN), XEqqIMxyiKYZ(gXBf7Xnkfcbz, rTgWIxEUF07A(Qbl9difUQB1t, FdkICBlkBXAN))) > nzTpIcepk0o8(chr(0b110000) + chr(0b1101000 + 0o7) + '\x30', 8)) * (Q4lP93YbRoVD(rTgWIxEUF07A(AGi9iq7F5_W6, FdkICBlkBXAN), XEqqIMxyiKYZ(rTgWIxEUF07A(EmO6gnVRyDvE, FdkICBlkBXAN), gXBf7Xnkfcbz)) > nzTpIcepk0o8(chr(48) + '\x6f' + chr(48), 8)) if ftfygxgFas5X(roI3spqORKae(nMrXkRpTQ9Oo, roI3spqORKae(ES5oEprVxulp(b'\xd5\xf6I\xfe\xdc+\x9d\xe1`ysu'), chr(0b1100100) + chr(101) + chr(0b1100011) + chr(0b1100011 + 0o14) + chr(0b1100100) + '\x65')(chr(0b1110101) + '\164' + chr(0b1100 + 0o132) + '\055' + chr(56)))) == nzTpIcepk0o8(chr(0b110000) + '\157' + chr(589 - 540), 8): if not roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xf8\xc9S\xc3\xbbb\xe8\xd7^{z&'), chr(770 - 670) + chr(0b1000111 + 0o36) + '\143' + chr(0b11001 + 0o126) + chr(100) + '\145')(chr(0b1001 + 0o154) + chr(0b1100110 + 0o16) + chr(0b1100110) + '\055' + '\070'))(nMrXkRpTQ9Oo[nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101000 + 0o10), 8)]): return (roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xd7\xffE'), '\x64' + chr(0b1100101) + '\x63' + '\157' + '\144' + chr(101))('\x75' + chr(0b1110100) + chr(0b1100110) + chr(0b10000 + 0o35) + chr(56))), roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xd7\xffE'), chr(6815 - 6715) + '\145' + '\x63' + chr(0b1101111) + '\x64' + '\145')(chr(8616 - 8499) + '\x74' + chr(102) + chr(45) + chr(0b1 + 0o67)))) A2PkwDstJ70g = oo8448oP2LJ8(nMrXkRpTQ9Oo, None) return (roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xd7\xffE'), chr(4483 - 4383) + '\145' + '\143' + chr(111) + '\x64' + '\145')(chr(0b1110101) + chr(116) + chr(9562 - 9460) + chr(713 - 668) + '\070')), roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xd7\xffE'), chr(3158 - 3058) + chr(0b100110 + 0o77) + chr(99) + chr(3256 - 3145) + chr(100) + chr(0b1001001 + 0o34))('\165' + '\164' + chr(0b10 + 0o144) + chr(45) + '\x38'))) if A2PkwDstJ70g else nMrXkRpTQ9Oo else: EVBBXDEoHwBV = nDF4gVNx0u9Q.xWH4M7K6Qbd3(nDF4gVNx0u9Q.AWxpWpGwxU15(nMrXkRpTQ9Oo[nzTpIcepk0o8('\060' + '\x6f' + '\060', 8)]))[nzTpIcepk0o8(chr(48) + chr(111) + chr(48), 8)] A2PkwDstJ70g = oo8448oP2LJ8(rTgWIxEUF07A(nMrXkRpTQ9Oo, EVBBXDEoHwBV), EVBBXDEoHwBV) (RvIlWjbM17sp, cR0LK4Idqpa1) = nMrXkRpTQ9Oo A2PkwDstJ70g = EVBBXDEoHwBV[nDF4gVNx0u9Q.xWH4M7K6Qbd3(A2PkwDstJ70g)[nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\060', 8)]] RvIlWjbM17sp[A2PkwDstJ70g] = nDF4gVNx0u9Q.nan cR0LK4Idqpa1[A2PkwDstJ70g] = nDF4gVNx0u9Q.nan return (RvIlWjbM17sp, cR0LK4Idqpa1)
noahbenson/neuropythy
neuropythy/geometry/util.py
triangle_area
def triangle_area(a,b,c): ''' triangle_area(a, b, c) yields the area of the triangle whose vertices are given by the points a, b, and c. ''' (a,b,c) = [np.asarray(x) for x in (a,b,c)] sides = np.sqrt(np.sum([(p1 - p2)**2 for (p1,p2) in zip([b,c,a],[c,a,b])], axis=1)) s = 0.5 * np.sum(sides, axis=0) s = np.clip(s * np.prod(s - sides, axis=0), 0.0, None) return np.sqrt(s)
python
def triangle_area(a,b,c): ''' triangle_area(a, b, c) yields the area of the triangle whose vertices are given by the points a, b, and c. ''' (a,b,c) = [np.asarray(x) for x in (a,b,c)] sides = np.sqrt(np.sum([(p1 - p2)**2 for (p1,p2) in zip([b,c,a],[c,a,b])], axis=1)) s = 0.5 * np.sum(sides, axis=0) s = np.clip(s * np.prod(s - sides, axis=0), 0.0, None) return np.sqrt(s)
[ "def", "triangle_area", "(", "a", ",", "b", ",", "c", ")", ":", "(", "a", ",", "b", ",", "c", ")", "=", "[", "np", ".", "asarray", "(", "x", ")", "for", "x", "in", "(", "a", ",", "b", ",", "c", ")", "]", "sides", "=", "np", ".", "sqrt",...
triangle_area(a, b, c) yields the area of the triangle whose vertices are given by the points a, b, and c.
[ "triangle_area", "(", "a", "b", "c", ")", "yields", "the", "area", "of", "the", "triangle", "whose", "vertices", "are", "given", "by", "the", "points", "a", "b", "and", "c", "." ]
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/util.py#L329-L338
train
Calculates the area of a triangle in the graph.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2Q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8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b1101111) + chr(51) + '\x37' + chr(0b110000 + 0o6), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x34' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + chr(53) + '\063', 39740 - 39732), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110100) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(602 - 554) + chr(111) + chr(0b10000 + 0o42) + chr(0b110001) + '\065', 0o10), nzTpIcepk0o8(chr(48) + chr(5335 - 5224) + chr(0b110001) + chr(55) + chr(2393 - 2342), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b100 + 0o55) + chr(0b110010), 54011 - 54003), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(54) + '\065', 58740 - 58732), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b11010 + 0o30) + '\x33' + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(54) + chr(0b1000 + 0o54), 0b1000), nzTpIcepk0o8(chr(0b111 + 0o51) + '\x6f' + '\063' + '\061' + chr(1401 - 1352), 0b1000), nzTpIcepk0o8(chr(1884 - 1836) + chr(3821 - 3710) + chr(52) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(10666 - 10555) + chr(1382 - 1332) + chr(2341 - 2286) + '\x30', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(0b110111) + chr(1532 - 1481), ord("\x08")), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(111) + '\063' + chr(2568 - 2514) + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + chr(5156 - 5045) + chr(0b11011 + 0o26) + '\x33' + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(111) + chr(0b101001 + 0o14), 0b1000), nzTpIcepk0o8(chr(1001 - 953) + '\157' + chr(1251 - 1202) + chr(2297 - 2242) + chr(0b100111 + 0o15), 2788 - 2780), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + '\x32' + '\x35', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(50) + chr(1062 - 1008) + chr(50), 0b1000), nzTpIcepk0o8(chr(2196 - 2148) + chr(0b10110 + 0o131) + chr(0b110001) + '\067' + chr(1291 - 1239), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + chr(0b0 + 0o60) + '\067', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50) + chr(0b1101 + 0o43) + chr(54), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(49) + chr(0b101111 + 0o5) + '\062', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b100101 + 0o15) + chr(0b110000) + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11010 + 0o30) + chr(0b100110 + 0o17) + '\x33', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + chr(0b110010 + 0o0) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b100011 + 0o22) + '\060', 0o10), nzTpIcepk0o8(chr(1438 - 1390) + chr(111) + '\066' + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1475 - 1426) + chr(462 - 409) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1010101 + 0o32) + chr(1014 - 963) + chr(732 - 677), ord("\x08")), nzTpIcepk0o8(chr(2004 - 1956) + chr(111) + '\066' + '\061', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1535 - 1485) + chr(1083 - 1033) + chr(454 - 406), 0b1000), nzTpIcepk0o8(chr(811 - 763) + '\x6f' + '\063' + '\061' + chr(0b1100 + 0o53), 0o10), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(0b1101 + 0o142) + '\x32' + '\067' + chr(55), 20464 - 20456), nzTpIcepk0o8(chr(1996 - 1948) + '\157' + '\x32' + chr(0b110010) + '\061', 8), nzTpIcepk0o8('\060' + chr(111) + chr(51) + '\067' + chr(0b100010 + 0o22), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(51) + chr(1967 - 1915) + '\062', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b111100 + 0o63) + '\x33' + chr(0b101011 + 0o11) + chr(232 - 181), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1015 - 966) + chr(2457 - 2402) + '\063', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(663 - 610) + chr(144 - 96), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xd0'), chr(0b1100100) + chr(101) + '\143' + '\157' + '\144' + '\x65')(chr(2632 - 2515) + chr(11789 - 11673) + chr(0b1100110) + chr(0b10001 + 0o34) + chr(1515 - 1459)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Yrl9GtvpchQG(AQ9ceR9AaoT1, xFDEVQn5qSdh, teUmM7cKWZUa): (AQ9ceR9AaoT1, xFDEVQn5qSdh, teUmM7cKWZUa) = [nDF4gVNx0u9Q.asarray(bI5jsQ9OkQtj) for bI5jsQ9OkQtj in (AQ9ceR9AaoT1, xFDEVQn5qSdh, teUmM7cKWZUa)] WzgVyf7Mosly = nDF4gVNx0u9Q.sqrt(nDF4gVNx0u9Q.oclC8DLjA_lV([(uTffoKvaS1oJ - KSkQTDFiUtnb) ** nzTpIcepk0o8(chr(760 - 712) + '\157' + '\062', 44076 - 44068) for (uTffoKvaS1oJ, KSkQTDFiUtnb) in TxMFWa_Xzviv([xFDEVQn5qSdh, teUmM7cKWZUa, AQ9ceR9AaoT1], [teUmM7cKWZUa, AQ9ceR9AaoT1, xFDEVQn5qSdh])], axis=nzTpIcepk0o8(chr(0b110000) + chr(0b101011 + 0o104) + '\x31', ord("\x08")))) PmE5_h409JAA = 0.5 * nDF4gVNx0u9Q.oclC8DLjA_lV(WzgVyf7Mosly, axis=nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\060', 38578 - 38570)) PmE5_h409JAA = nDF4gVNx0u9Q.clip(PmE5_h409JAA * nDF4gVNx0u9Q.prod(PmE5_h409JAA - WzgVyf7Mosly, axis=nzTpIcepk0o8('\060' + chr(0b1101 + 0o142) + chr(918 - 870), 8)), 0.0, None) return roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\x8dS\x99U'), '\144' + chr(101) + chr(9289 - 9190) + '\x6f' + chr(0b1100100) + chr(0b100000 + 0o105))(chr(117) + chr(0b1110100) + chr(0b1100110) + chr(1155 - 1110) + chr(56)))(PmE5_h409JAA)
noahbenson/neuropythy
neuropythy/geometry/util.py
triangle_normal
def triangle_normal(a,b,c): ''' triangle_normal(a, b, c) yields the normal vector of the triangle whose vertices are given by the points a, b, and c. If the points are 2D points, then 3D normal vectors are still yielded, that are always (0,0,1) or (0,0,-1). This function auto-threads over matrices, in which case they must be in equivalent orientations, and the result is returned in whatever orientation they are given in. In some cases, the intended orientation of the matrices is ambiguous (e.g., if a, b, and c are 2 x 3 matrices), in which case the matrix is always assumed to be given in (dims x vertices) orientation. ''' (a,b,c) = [np.asarray(x) for x in (a,b,c)] if len(a.shape) == 1 and len(b.shape) == 1 and len(c.shape) == 1: return triangle_normal(*[np.transpose([x]) for x in (a,b,c)])[:,0] (a,b,c) = [np.transpose([x]) if len(x.shape) == 1 else x for x in (a,b,c)] # find a required number of dimensions, if possible if a.shape[0] in (2,3): dims = a.shape[0] tx = True else: dims = a.shape[1] (a,b,c) = [x.T for x in (a,b,c)] tx = False n = (a.shape[1] if a.shape[1] != 1 else b.shape[1] if b.shape[1] != 1 else c.shape[1] if c.shape[1] != 1 else 1) if dims == 2: (a,b,c) = [np.vstack((x, np.zeros((1,n)))) for x in (a,b,c)] ab = normalize(b - a) ac = normalize(c - a) res = np.cross(ab, ac, axisa=0, axisb=0) return res.T if tx else res
python
def triangle_normal(a,b,c): ''' triangle_normal(a, b, c) yields the normal vector of the triangle whose vertices are given by the points a, b, and c. If the points are 2D points, then 3D normal vectors are still yielded, that are always (0,0,1) or (0,0,-1). This function auto-threads over matrices, in which case they must be in equivalent orientations, and the result is returned in whatever orientation they are given in. In some cases, the intended orientation of the matrices is ambiguous (e.g., if a, b, and c are 2 x 3 matrices), in which case the matrix is always assumed to be given in (dims x vertices) orientation. ''' (a,b,c) = [np.asarray(x) for x in (a,b,c)] if len(a.shape) == 1 and len(b.shape) == 1 and len(c.shape) == 1: return triangle_normal(*[np.transpose([x]) for x in (a,b,c)])[:,0] (a,b,c) = [np.transpose([x]) if len(x.shape) == 1 else x for x in (a,b,c)] # find a required number of dimensions, if possible if a.shape[0] in (2,3): dims = a.shape[0] tx = True else: dims = a.shape[1] (a,b,c) = [x.T for x in (a,b,c)] tx = False n = (a.shape[1] if a.shape[1] != 1 else b.shape[1] if b.shape[1] != 1 else c.shape[1] if c.shape[1] != 1 else 1) if dims == 2: (a,b,c) = [np.vstack((x, np.zeros((1,n)))) for x in (a,b,c)] ab = normalize(b - a) ac = normalize(c - a) res = np.cross(ab, ac, axisa=0, axisb=0) return res.T if tx else res
[ "def", "triangle_normal", "(", "a", ",", "b", ",", "c", ")", ":", "(", "a", ",", "b", ",", "c", ")", "=", "[", "np", ".", "asarray", "(", "x", ")", "for", "x", "in", "(", "a", ",", "b", ",", "c", ")", "]", "if", "len", "(", "a", ".", ...
triangle_normal(a, b, c) yields the normal vector of the triangle whose vertices are given by the points a, b, and c. If the points are 2D points, then 3D normal vectors are still yielded, that are always (0,0,1) or (0,0,-1). This function auto-threads over matrices, in which case they must be in equivalent orientations, and the result is returned in whatever orientation they are given in. In some cases, the intended orientation of the matrices is ambiguous (e.g., if a, b, and c are 2 x 3 matrices), in which case the matrix is always assumed to be given in (dims x vertices) orientation.
[ "triangle_normal", "(", "a", "b", "c", ")", "yields", "the", "normal", "vector", "of", "the", "triangle", "whose", "vertices", "are", "given", "by", "the", "points", "a", "b", "and", "c", ".", "If", "the", "points", "are", "2D", "points", "then", "3D",...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/util.py#L340-L369
train
This function returns the normal vector of the triangle whose vertices are given by a b and c.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPT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eYozM,MdkNqd1bagO6,QNQS9e6tJqMV,typojWN5Phrq,gufQJgTAhMnI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + chr(0b10110 + 0o34) + chr(0b110010 + 0o3), 0o10), nzTpIcepk0o8(chr(290 - 242) + chr(0b1001111 + 0o40) + chr(49) + chr(1267 - 1212) + '\x37', 0b1000), nzTpIcepk0o8(chr(0b100110 + 0o12) + '\157' + chr(50) + chr(48) + '\062', ord("\x08")), nzTpIcepk0o8(chr(766 - 718) + chr(0b1011100 + 0o23) + chr(2101 - 2052) + chr(49) + chr(54), 47917 - 47909), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b1101111) + '\062' + chr(0b101101 + 0o10) + '\060', ord("\x08")), nzTpIcepk0o8(chr(250 - 202) + '\x6f' + chr(0b1110 + 0o47) + chr(887 - 832), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001) + chr(0b110110) + chr(50), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b100101 + 0o15) + '\x35' + chr(49), 0b1000), nzTpIcepk0o8(chr(1823 - 1775) + chr(111) + chr(50) + chr(51) + chr(0b110100), 0o10), nzTpIcepk0o8('\060' + chr(9226 - 9115) + chr(0b110010) + '\062' + '\x34', 508 - 500), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + '\066' + chr(1082 - 1029), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(0b11011 + 0o34) + '\x33', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b110010 + 0o75) + chr(1616 - 1566) + '\063' + chr(54), 0o10), nzTpIcepk0o8(chr(48) + chr(0b11101 + 0o122) + chr(0b101101 + 0o5) + chr(0b100011 + 0o16) + '\x32', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(51) + chr(0b101100 + 0o10) + chr(2654 - 2601), 0b1000), nzTpIcepk0o8(chr(429 - 381) + '\157' + chr(0b110111) + '\060', 0b1000), nzTpIcepk0o8(chr(1399 - 1351) + chr(7563 - 7452) + '\x32' + chr(1923 - 1873) + '\x33', 8863 - 8855), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + chr(0b110010), 31626 - 31618), nzTpIcepk0o8(chr(1465 - 1417) + '\157' + '\x33' + '\x34' + chr(0b110101), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(887 - 837) + chr(0b11010 + 0o31) + '\062', 0b1000), nzTpIcepk0o8('\060' + chr(11115 - 11004) + '\065' + chr(0b110111), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1032 - 983) + chr(0b11110 + 0o31) + chr(0b111 + 0o56), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b1001 + 0o52) + '\064', 0o10), nzTpIcepk0o8(chr(0b100 + 0o54) + '\157' + chr(50) + chr(0b110110) + chr(54), 65136 - 65128), nzTpIcepk0o8(chr(1124 - 1076) + chr(111) + chr(0b110101) + chr(0b10000 + 0o40), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b101101 + 0o5) + chr(0b110100) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110101) + chr(0b110111), 8), nzTpIcepk0o8(chr(48) + chr(0b1001011 + 0o44) + chr(51) + chr(2718 - 2663) + chr(0b110100), 0o10), nzTpIcepk0o8('\060' + chr(699 - 588) + '\062' + chr(50) + chr(756 - 705), 8), nzTpIcepk0o8(chr(307 - 259) + chr(0b1101111) + chr(54) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b1011111 + 0o20) + '\x32' + chr(2716 - 2663) + '\066', 2727 - 2719), nzTpIcepk0o8(chr(0b110000) + chr(5790 - 5679) + chr(0b110011) + chr(1152 - 1102) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b100000 + 0o20) + '\x6f' + chr(51) + chr(0b110001) + '\063', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010) + chr(50) + '\x36', 50935 - 50927), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(2056 - 1945) + chr(49) + chr(0b110110) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b10 + 0o57) + '\x31' + '\x32', 20836 - 20828), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + chr(2308 - 2253) + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b111001 + 0o66) + chr(0b110011) + chr(0b110000) + chr(0b10001 + 0o41), 0b1000), nzTpIcepk0o8(chr(48) + chr(8963 - 8852) + '\x35' + chr(50), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b10100 + 0o133) + chr(657 - 606) + '\062' + chr(2885 - 2831), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(4085 - 3974) + chr(0b101000 + 0o15) + chr(0b101100 + 0o4), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'{'), chr(100) + chr(0b1100101) + chr(8960 - 8861) + chr(111) + '\x64' + chr(0b1100101))(chr(11644 - 11527) + '\164' + '\x66' + chr(0b101100 + 0o1) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def RphYVh3UYbbP(AQ9ceR9AaoT1, xFDEVQn5qSdh, teUmM7cKWZUa): (AQ9ceR9AaoT1, xFDEVQn5qSdh, teUmM7cKWZUa) = [nDF4gVNx0u9Q.asarray(bI5jsQ9OkQtj) for bI5jsQ9OkQtj in (AQ9ceR9AaoT1, xFDEVQn5qSdh, teUmM7cKWZUa)] if ftfygxgFas5X(roI3spqORKae(AQ9ceR9AaoT1, roI3spqORKae(ES5oEprVxulp(b'9\x17\xe0\x03\x98\x16@\xe8\xda\xc3\xcd\x9d'), '\144' + '\x65' + chr(0b1100011) + chr(0b111000 + 0o67) + '\x64' + '\x65')('\x75' + chr(0b1011010 + 0o32) + '\x66' + chr(45) + chr(56)))) == nzTpIcepk0o8('\060' + chr(111) + '\061', ord("\x08")) and ftfygxgFas5X(roI3spqORKae(xFDEVQn5qSdh, roI3spqORKae(ES5oEprVxulp(b'9\x17\xe0\x03\x98\x16@\xe8\xda\xc3\xcd\x9d'), chr(3582 - 3482) + '\x65' + chr(0b1100011) + chr(6549 - 6438) + chr(0b1100100 + 0o0) + chr(101))(chr(6273 - 6156) + chr(0b1110100) + '\x66' + chr(1692 - 1647) + chr(56)))) == nzTpIcepk0o8(chr(710 - 662) + chr(0b1101111) + chr(0b10110 + 0o33), 8) and (ftfygxgFas5X(roI3spqORKae(teUmM7cKWZUa, roI3spqORKae(ES5oEprVxulp(b'9\x17\xe0\x03\x98\x16@\xe8\xda\xc3\xcd\x9d'), '\x64' + chr(101) + '\x63' + chr(0b1101011 + 0o4) + chr(8661 - 8561) + chr(101))(chr(0b1110101) + chr(116) + chr(8699 - 8597) + chr(0b101101) + chr(0b111000)))) == nzTpIcepk0o8(chr(2294 - 2246) + chr(0b1101111) + '\x31', 8)): return RphYVh3UYbbP(*[roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'!\r\xe3 \xdb_\x1d\xda\xf9'), '\x64' + chr(0b1011111 + 0o6) + chr(0b10101 + 0o116) + '\157' + chr(100) + '\145')(chr(10652 - 10535) + '\x74' + chr(839 - 737) + '\x2d' + chr(56)))([bI5jsQ9OkQtj]) for bI5jsQ9OkQtj in (AQ9ceR9AaoT1, xFDEVQn5qSdh, teUmM7cKWZUa)])[:, nzTpIcepk0o8('\x30' + chr(111) + chr(48), 0b1000)] (AQ9ceR9AaoT1, xFDEVQn5qSdh, teUmM7cKWZUa) = [nDF4gVNx0u9Q.transpose([bI5jsQ9OkQtj]) if ftfygxgFas5X(bI5jsQ9OkQtj.lhbM092AFW8f) == nzTpIcepk0o8(chr(0b110000) + chr(0b1100111 + 0o10) + chr(1074 - 1025), 8) else bI5jsQ9OkQtj for bI5jsQ9OkQtj in (AQ9ceR9AaoT1, xFDEVQn5qSdh, teUmM7cKWZUa)] if roI3spqORKae(AQ9ceR9AaoT1, roI3spqORKae(ES5oEprVxulp(b'9\x17\xe0\x03\x98\x16@\xe8\xda\xc3\xcd\x9d'), chr(8274 - 8174) + '\x65' + chr(5774 - 5675) + chr(0b111 + 0o150) + chr(9009 - 8909) + chr(0b1100101))('\165' + '\164' + chr(0b10 + 0o144) + chr(45) + chr(56)))[nzTpIcepk0o8(chr(48) + chr(7690 - 7579) + chr(178 - 130), 8)] in (nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(11912 - 11801) + chr(0b1001 + 0o51), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(51), ord("\x08"))): OG3SLSuytFrL = AQ9ceR9AaoT1.lhbM092AFW8f[nzTpIcepk0o8(chr(0b110000) + chr(5252 - 5141) + chr(48), 8)] L1XUDGNrDyiW = nzTpIcepk0o8(chr(1090 - 1042) + '\157' + chr(0b110001), 8) else: OG3SLSuytFrL = AQ9ceR9AaoT1.lhbM092AFW8f[nzTpIcepk0o8(chr(362 - 314) + '\157' + '\061', 8)] (AQ9ceR9AaoT1, xFDEVQn5qSdh, teUmM7cKWZUa) = [bI5jsQ9OkQtj.hq6XE4_Nhd6R for bI5jsQ9OkQtj in (AQ9ceR9AaoT1, xFDEVQn5qSdh, teUmM7cKWZUa)] L1XUDGNrDyiW = nzTpIcepk0o8('\060' + '\x6f' + chr(1104 - 1056), 8) NoZxuO7wjArS = AQ9ceR9AaoT1.lhbM092AFW8f[nzTpIcepk0o8(chr(48) + chr(0b111111 + 0o60) + chr(0b110001), 8)] if AQ9ceR9AaoT1.lhbM092AFW8f[nzTpIcepk0o8(chr(2026 - 1978) + chr(111) + chr(49), 8)] != nzTpIcepk0o8(chr(1337 - 1289) + chr(0b1000001 + 0o56) + chr(1463 - 1414), 8) else xFDEVQn5qSdh.lhbM092AFW8f[nzTpIcepk0o8('\x30' + chr(1722 - 1611) + '\061', 8)] if xFDEVQn5qSdh.lhbM092AFW8f[nzTpIcepk0o8('\060' + '\x6f' + chr(0b11000 + 0o31), 8)] != nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b11000 + 0o127) + '\x31', 8) else teUmM7cKWZUa.lhbM092AFW8f[nzTpIcepk0o8(chr(1402 - 1354) + chr(111) + '\x31', 8)] if teUmM7cKWZUa.lhbM092AFW8f[nzTpIcepk0o8('\060' + '\157' + '\061', 8)] != nzTpIcepk0o8(chr(0b10 + 0o56) + chr(0b1101111) + chr(1518 - 1469), 8) else nzTpIcepk0o8('\060' + chr(111) + chr(0b101 + 0o54), 8) if OG3SLSuytFrL == nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(111) + '\062', 8): (AQ9ceR9AaoT1, xFDEVQn5qSdh, teUmM7cKWZUa) = [nDF4gVNx0u9Q.vstack((bI5jsQ9OkQtj, nDF4gVNx0u9Q.UmwwEp7MzR6q((nzTpIcepk0o8('\060' + '\157' + '\061', 8), NoZxuO7wjArS)))) for bI5jsQ9OkQtj in (AQ9ceR9AaoT1, xFDEVQn5qSdh, teUmM7cKWZUa)] HmzFvPCBR3m5 = euRgWTY4eBYM(xFDEVQn5qSdh - AQ9ceR9AaoT1) GpVwEzHnhx0a = euRgWTY4eBYM(teUmM7cKWZUa - AQ9ceR9AaoT1) _XdQFJpnzJor = nDF4gVNx0u9Q.cross(HmzFvPCBR3m5, GpVwEzHnhx0a, axisa=nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(0b1101111) + '\060', 8), axisb=nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110000), 8)) return roI3spqORKae(_XdQFJpnzJor, roI3spqORKae(ES5oEprVxulp(b'=\x0e\xb4\x16\xed\x1b-\xe7\xf4\xf0\xc3\xa9'), '\x64' + chr(0b1100101) + chr(99) + chr(111) + '\144' + '\145')(chr(0b1110101) + chr(8987 - 8871) + chr(0b111001 + 0o55) + chr(1517 - 1472) + '\x38')) if L1XUDGNrDyiW else _XdQFJpnzJor
noahbenson/neuropythy
neuropythy/geometry/util.py
cartesian_to_barycentric_3D
def cartesian_to_barycentric_3D(tri, xy): ''' cartesian_to_barycentric_3D(tri,xy) is identical to cartesian_to_barycentric_2D(tri,xy) except it works on 3D data. Note that if tri is a 3 x 3 x n, a 3 x n x 3 or an n x 3 x 3 matrix, the first dimension must always be the triangle vertices and the second 3-sized dimension must be the (x,y,z) coordinates. ''' xy = np.asarray(xy) tri = np.asarray(tri) if len(xy.shape) == 1: return cartesian_to_barycentric_3D(np.transpose(np.asarray([tri]), (1,2,0)), np.asarray([xy]).T)[:,0] xy = xy if xy.shape[0] == 3 else xy.T if tri.shape[0] == 3: tri = tri if tri.shape[1] == 3 else np.transpose(tri, (0,2,1)) elif tri.shape[1] == 3: tri = tri.T if tri.shape[0] == 3 else np.transpose(tri, (1,2,0)) elif tri.shape[2] == 3: tri = np.transpose(tri, (2,1,0) if tri.shape[1] == 3 else (2,0,1)) if tri.shape[0] != 3 or tri.shape[1] != 3: raise ValueError('Triangle array did not have dimensions of sizes 3 and 3') if xy.shape[0] != 3: raise ValueError('coordinate matrix did not have a dimension of size 3') if tri.shape[2] != xy.shape[1]: raise ValueError('number of triangles and coordinates must match') # The algorithm here is borrowed from this stack-exchange post: # http://gamedev.stackexchange.com/questions/23743 # in which it is attributed to Christer Ericson's book Real-Time Collision Detection. v0 = tri[1] - tri[0] v1 = tri[2] - tri[0] v2 = xy - tri[0] d00 = np.sum(v0 * v0, axis=0) d01 = np.sum(v0 * v1, axis=0) d11 = np.sum(v1 * v1, axis=0) d20 = np.sum(v2 * v0, axis=0) d21 = np.sum(v2 * v1, axis=0) den = d00*d11 - d01*d01 zero = np.isclose(den, 0) unit = 1 - zero den += zero l2 = unit * (d11 * d20 - d01 * d21) / den l3 = unit * (d00 * d21 - d01 * d20) / den return np.asarray([1.0 - l2 - l3, l2])
python
def cartesian_to_barycentric_3D(tri, xy): ''' cartesian_to_barycentric_3D(tri,xy) is identical to cartesian_to_barycentric_2D(tri,xy) except it works on 3D data. Note that if tri is a 3 x 3 x n, a 3 x n x 3 or an n x 3 x 3 matrix, the first dimension must always be the triangle vertices and the second 3-sized dimension must be the (x,y,z) coordinates. ''' xy = np.asarray(xy) tri = np.asarray(tri) if len(xy.shape) == 1: return cartesian_to_barycentric_3D(np.transpose(np.asarray([tri]), (1,2,0)), np.asarray([xy]).T)[:,0] xy = xy if xy.shape[0] == 3 else xy.T if tri.shape[0] == 3: tri = tri if tri.shape[1] == 3 else np.transpose(tri, (0,2,1)) elif tri.shape[1] == 3: tri = tri.T if tri.shape[0] == 3 else np.transpose(tri, (1,2,0)) elif tri.shape[2] == 3: tri = np.transpose(tri, (2,1,0) if tri.shape[1] == 3 else (2,0,1)) if tri.shape[0] != 3 or tri.shape[1] != 3: raise ValueError('Triangle array did not have dimensions of sizes 3 and 3') if xy.shape[0] != 3: raise ValueError('coordinate matrix did not have a dimension of size 3') if tri.shape[2] != xy.shape[1]: raise ValueError('number of triangles and coordinates must match') # The algorithm here is borrowed from this stack-exchange post: # http://gamedev.stackexchange.com/questions/23743 # in which it is attributed to Christer Ericson's book Real-Time Collision Detection. v0 = tri[1] - tri[0] v1 = tri[2] - tri[0] v2 = xy - tri[0] d00 = np.sum(v0 * v0, axis=0) d01 = np.sum(v0 * v1, axis=0) d11 = np.sum(v1 * v1, axis=0) d20 = np.sum(v2 * v0, axis=0) d21 = np.sum(v2 * v1, axis=0) den = d00*d11 - d01*d01 zero = np.isclose(den, 0) unit = 1 - zero den += zero l2 = unit * (d11 * d20 - d01 * d21) / den l3 = unit * (d00 * d21 - d01 * d20) / den return np.asarray([1.0 - l2 - l3, l2])
[ "def", "cartesian_to_barycentric_3D", "(", "tri", ",", "xy", ")", ":", "xy", "=", "np", ".", "asarray", "(", "xy", ")", "tri", "=", "np", ".", "asarray", "(", "tri", ")", "if", "len", "(", "xy", ".", "shape", ")", "==", "1", ":", "return", "carte...
cartesian_to_barycentric_3D(tri,xy) is identical to cartesian_to_barycentric_2D(tri,xy) except it works on 3D data. Note that if tri is a 3 x 3 x n, a 3 x n x 3 or an n x 3 x 3 matrix, the first dimension must always be the triangle vertices and the second 3-sized dimension must be the (x,y,z) coordinates.
[ "cartesian_to_barycentric_3D", "(", "tri", "xy", ")", "is", "identical", "to", "cartesian_to_barycentric_2D", "(", "tri", "xy", ")", "except", "it", "works", "on", "3D", "data", ".", "Note", "that", "if", "tri", "is", "a", "3", "x", "3", "x", "n", "a", ...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/util.py#L371-L413
train
This function converts a 3D triangle to a barycentric 3D system.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZ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,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(0b1010 + 0o145) + chr(1573 - 1522) + '\067' + chr(48), 0b1000), nzTpIcepk0o8(chr(2050 - 2002) + '\x6f' + chr(0b100 + 0o56) + '\x31' + '\x33', ord("\x08")), nzTpIcepk0o8(chr(1458 - 1410) + chr(111) + chr(0b110010) + '\063', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b111001 + 0o66) + '\067' + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(735 - 624) + chr(194 - 145) + chr(952 - 901) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b1101111) + chr(0b10 + 0o60) + chr(55) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b10111 + 0o130) + chr(1441 - 1392) + chr(0b110100) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b10010 + 0o40) + chr(174 - 120), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(52) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(675 - 627) + '\x6f' + chr(0b110101) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(111) + chr(50) + '\x30', 0b1000), nzTpIcepk0o8('\060' + chr(7804 - 7693) + chr(1479 - 1428), 0b1000), nzTpIcepk0o8(chr(1635 - 1587) + '\157' + '\067' + chr(629 - 581), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + '\063' + chr(51), 24228 - 24220), nzTpIcepk0o8(chr(48) + chr(0b1101110 + 0o1) + chr(0b101111 + 0o10), ord("\x08")), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(0b110011 + 0o74) + '\061' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(1141 - 1093) + '\x6f' + chr(1787 - 1736) + chr(48) + chr(50), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + chr(1057 - 1007), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001) + chr(1772 - 1717) + '\063', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + '\x37' + '\060', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\061' + '\061' + chr(0b10110 + 0o33), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x37' + chr(0b1000 + 0o53), 45808 - 45800), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + chr(51) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + chr(55) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(242 - 194) + '\x6f' + '\063' + '\x30' + chr(54), 0b1000), nzTpIcepk0o8(chr(1799 - 1751) + chr(0b10011 + 0o134) + '\067' + chr(1397 - 1346), 8), nzTpIcepk0o8('\x30' + chr(111) + '\063' + '\063' + '\062', 21526 - 21518), nzTpIcepk0o8('\060' + chr(0b110001 + 0o76) + '\063' + '\x31' + chr(2540 - 2487), 29918 - 29910), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(2482 - 2431) + '\067' + '\060', 8), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + chr(0b110010 + 0o2) + '\066', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(788 - 738) + chr(0b110100) + chr(49), 0b1000), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(111) + '\x34' + chr(52), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(2375 - 2264) + chr(49) + chr(52) + chr(0b1001 + 0o50), 0o10), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(0b1101111) + chr(51) + chr(2126 - 2076) + '\061', ord("\x08")), nzTpIcepk0o8(chr(679 - 631) + chr(0b1101111) + '\063' + chr(1877 - 1829) + chr(182 - 128), 8), nzTpIcepk0o8('\x30' + chr(0b100100 + 0o113) + chr(57 - 7) + chr(0b110101) + chr(1722 - 1673), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\061' + chr(1417 - 1369) + chr(0b100100 + 0o14), 44591 - 44583), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110010) + '\x30' + chr(0b10011 + 0o42), 0b1000), nzTpIcepk0o8('\x30' + chr(8310 - 8199) + chr(0b10110 + 0o34) + chr(0b11 + 0o63) + chr(51), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + chr(0b0 + 0o61) + '\067', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b111100 + 0o63) + chr(2449 - 2396) + '\060', 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xd6'), chr(0b1100100) + chr(6715 - 6614) + '\143' + chr(0b1110 + 0o141) + '\x64' + chr(101))(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(0b11110 + 0o17) + chr(380 - 324)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def ZUV0eXhSRaUp(oRQG7sQgHvpU, Kacl9Si1wTrL): Kacl9Si1wTrL = nDF4gVNx0u9Q.asarray(Kacl9Si1wTrL) oRQG7sQgHvpU = nDF4gVNx0u9Q.asarray(oRQG7sQgHvpU) if ftfygxgFas5X(roI3spqORKae(Kacl9Si1wTrL, roI3spqORKae(ES5oEprVxulp(b'\x94\xe3qrl\x80QWe\x7f(e'), chr(0b1100100) + chr(4234 - 4133) + '\143' + chr(2570 - 2459) + '\x64' + chr(6152 - 6051))('\165' + chr(0b1110100) + '\146' + chr(0b10110 + 0o27) + chr(0b111000)))) == nzTpIcepk0o8(chr(1033 - 985) + chr(5531 - 5420) + chr(521 - 472), 0b1000): return ZUV0eXhSRaUp(roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\x8c\xf9rQ/\xc9\x0ceF'), chr(0b1100100) + chr(0b1011111 + 0o6) + chr(0b1100011) + '\x6f' + chr(0b1000110 + 0o36) + '\x65')('\165' + '\164' + '\x66' + '\055' + '\070'))(roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\x99\xf8rM.\xd8\x1a'), '\144' + '\x65' + '\143' + '\157' + '\x64' + chr(101))(chr(0b1100110 + 0o17) + chr(0b1110100) + chr(0b1100110) + chr(0b11110 + 0o17) + chr(0b11000 + 0o40)))([oRQG7sQgHvpU]), (nzTpIcepk0o8(chr(1210 - 1162) + '\x6f' + chr(0b11110 + 0o23), 8), nzTpIcepk0o8('\060' + '\x6f' + chr(1664 - 1614), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(48), 0b1000))), roI3spqORKae(nDF4gVNx0u9Q.asarray([Kacl9Si1wTrL]), roI3spqORKae(ES5oEprVxulp(b'\x90\xfa%g\x19\x8d<XKL&Q'), '\x64' + chr(3432 - 3331) + chr(0b1100011) + '\157' + '\x64' + '\145')(chr(11880 - 11763) + '\164' + chr(0b1100110) + '\x2d' + chr(0b111000))))[:, nzTpIcepk0o8('\x30' + chr(0b1011111 + 0o20) + chr(48), 8)] Kacl9Si1wTrL = Kacl9Si1wTrL if Kacl9Si1wTrL.lhbM092AFW8f[nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(111) + chr(48), 8)] == nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33', 8) else Kacl9Si1wTrL.hq6XE4_Nhd6R if roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'\x94\xe3qrl\x80QWe\x7f(e'), chr(100) + chr(101) + '\143' + chr(0b1101111) + chr(0b1100100) + chr(0b101010 + 0o73))(chr(0b1000101 + 0o60) + chr(0b1110100) + '\x66' + '\055' + chr(0b111000)))[nzTpIcepk0o8('\060' + chr(0b1011001 + 0o26) + chr(0b110000), 8)] == nzTpIcepk0o8(chr(831 - 783) + chr(0b111011 + 0o64) + chr(0b100101 + 0o16), 8): oRQG7sQgHvpU = oRQG7sQgHvpU if oRQG7sQgHvpU.lhbM092AFW8f[nzTpIcepk0o8(chr(0b110000) + '\157' + '\061', 8)] == nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b1101111) + chr(93 - 42), 8) else nDF4gVNx0u9Q.transpose(oRQG7sQgHvpU, (nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(0b1101111) + chr(48), 8), nzTpIcepk0o8('\060' + chr(111) + '\062', 8), nzTpIcepk0o8(chr(1592 - 1544) + chr(111) + chr(0b0 + 0o61), 8))) elif roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'\x94\xe3qrl\x80QWe\x7f(e'), '\144' + chr(101) + chr(219 - 120) + '\157' + chr(0b1000010 + 0o42) + chr(0b11010 + 0o113))('\165' + '\164' + chr(102) + '\x2d' + chr(56)))[nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001), 8)] == nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b1101 + 0o46), 8): oRQG7sQgHvpU = oRQG7sQgHvpU.hq6XE4_Nhd6R if oRQG7sQgHvpU.lhbM092AFW8f[nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b1010111 + 0o30) + chr(0b1010 + 0o46), 8)] == nzTpIcepk0o8(chr(1311 - 1263) + chr(4914 - 4803) + chr(0b1110 + 0o45), 8) else nDF4gVNx0u9Q.transpose(oRQG7sQgHvpU, (nzTpIcepk0o8('\x30' + chr(3375 - 3264) + chr(49), 8), nzTpIcepk0o8('\x30' + '\x6f' + '\x32', 8), nzTpIcepk0o8(chr(48) + '\157' + '\x30', 8))) elif roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'\x94\xe3qrl\x80QWe\x7f(e'), '\x64' + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(100) + chr(0b1011100 + 0o11))(chr(0b1100000 + 0o25) + chr(0b1110100) + '\146' + '\x2d' + chr(1385 - 1329)))[nzTpIcepk0o8(chr(48) + chr(0b10000 + 0o137) + chr(50), 8)] == nzTpIcepk0o8(chr(48) + chr(3017 - 2906) + '\063', 8): oRQG7sQgHvpU = nDF4gVNx0u9Q.transpose(oRQG7sQgHvpU, (nzTpIcepk0o8('\060' + chr(111) + '\x32', 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31', 8), nzTpIcepk0o8('\060' + chr(0b1 + 0o156) + chr(0b1101 + 0o43), 8)) if oRQG7sQgHvpU.lhbM092AFW8f[nzTpIcepk0o8(chr(0b11100 + 0o24) + '\157' + chr(0b110001), 8)] == nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51), 8) else (nzTpIcepk0o8('\060' + '\157' + chr(0b110010), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1165 - 1117), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b110000 + 0o77) + chr(0b11110 + 0o23), 8))) if roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'\x94\xe3qrl\x80QWe\x7f(e'), chr(0b1100100) + chr(101) + chr(0b10 + 0o141) + '\157' + chr(0b1100100) + chr(0b1000 + 0o135))(chr(0b1110101) + chr(0b100010 + 0o122) + chr(0b1100110) + chr(45) + chr(0b10001 + 0o47)))[nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110000), 8)] != nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b101110 + 0o5), 8) or roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'\x94\xe3qrl\x80QWe\x7f(e'), '\x64' + chr(2805 - 2704) + chr(7310 - 7211) + chr(11995 - 11884) + chr(100) + '\x65')(chr(10468 - 10351) + chr(0b1111 + 0o145) + chr(0b1000110 + 0o40) + chr(0b101101) + chr(0b111000)))[nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061', 8)] != nzTpIcepk0o8('\060' + chr(10392 - 10281) + '\x33', 8): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b"\xac\xf9z^2\xde\x0fs\x03IbqY\xa2'l\xabv[\xd6&O\xf9\x17\xa7M\xbf\xed\x9c\x8f\xccA\x0f\xa2\xaf\xc6.\xf6\x93\xe0\x9e\xab`V&\xdc\x106\x10\x08qm\\\xfb4"), chr(0b1100100) + chr(5055 - 4954) + chr(6481 - 6382) + '\x6f' + '\144' + chr(7829 - 7728))('\165' + chr(116) + chr(0b1100110) + chr(1164 - 1119) + '\070')) if roI3spqORKae(Kacl9Si1wTrL, roI3spqORKae(ES5oEprVxulp(b'\x94\xe3qrl\x80QWe\x7f(e'), chr(0b1011100 + 0o10) + '\x65' + chr(99) + '\157' + chr(0b10000 + 0o124) + '\145')(chr(0b1110101) + chr(116) + '\146' + '\x2d' + '\070'))[nzTpIcepk0o8('\060' + chr(8957 - 8846) + chr(0b1010 + 0o46), 8)] != nzTpIcepk0o8(chr(48) + chr(11240 - 11129) + chr(0b110011), 8): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\x9b\xe4|M8\xd0\rwWM0nY\xafua\xba2\x1f\xd1-\x1b\xb7\x10\xb2\x1b\xb2\xac\x8e\x83\x81EA\xb5\xaf\xc4%\xeb\xc0\xe6\x97\xe53P:\x99\x10\x7fYM00'), chr(9747 - 9647) + chr(101) + '\x63' + chr(10045 - 9934) + chr(0b1001100 + 0o30) + chr(0b1000 + 0o135))(chr(117) + chr(0b1110100) + chr(0b1100110) + chr(45) + chr(397 - 341))) if roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'\x94\xe3qrl\x80QWe\x7f(e'), chr(0b110000 + 0o64) + '\145' + chr(0b1001111 + 0o24) + chr(0b1101111) + '\x64' + chr(0b1010001 + 0o24))(chr(0b1101101 + 0o10) + chr(0b1110100) + '\146' + chr(45) + '\x38'))[nzTpIcepk0o8(chr(644 - 596) + chr(0b1101111) + chr(0b110010), 8)] != roI3spqORKae(Kacl9Si1wTrL, roI3spqORKae(ES5oEprVxulp(b'\x94\xe3qrl\x80QWe\x7f(e'), chr(0b11100 + 0o110) + chr(8806 - 8705) + chr(99) + '\157' + '\x64' + '\x65')('\x75' + '\x74' + '\x66' + chr(0b101101 + 0o0) + chr(56)))[nzTpIcepk0o8(chr(48) + '\x6f' + '\061', 8)]: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\x96\xfe~]9\xcbCyE\x08dqQ\xbaio\xaew\x08\x98(U\xbd_\xa5T\xb5\xbf\x9c\x8f\xcfE\x15\xb4\xb5\x89-\xf0\xc0\xfb\xd8\xe6rK?\xd1'), '\144' + '\145' + chr(8057 - 7958) + chr(4333 - 4222) + chr(0b1100100) + '\145')('\165' + chr(116) + '\x66' + chr(0b11101 + 0o20) + chr(516 - 460))) a_25nCkImxKI = oRQG7sQgHvpU[nzTpIcepk0o8(chr(1645 - 1597) + chr(0b1101111) + chr(0b110001), 8)] - oRQG7sQgHvpU[nzTpIcepk0o8('\060' + chr(2892 - 2781) + '\060', 8)] pDhUq4x6UMmH = oRQG7sQgHvpU[nzTpIcepk0o8(chr(48) + chr(111) + chr(1278 - 1228), 8)] - oRQG7sQgHvpU[nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110000), 8)] uFA9Lk4IxvMH = Kacl9Si1wTrL - oRQG7sQgHvpU[nzTpIcepk0o8('\x30' + chr(2551 - 2440) + chr(0b101000 + 0o10), 8)] _a3_TsNQIavm = nDF4gVNx0u9Q.oclC8DLjA_lV(a_25nCkImxKI * a_25nCkImxKI, axis=nzTpIcepk0o8(chr(0b110000) + chr(11022 - 10911) + chr(0b110000), 8)) dtDjwmLMtwJN = nDF4gVNx0u9Q.oclC8DLjA_lV(a_25nCkImxKI * pDhUq4x6UMmH, axis=nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\060', 8)) Cm6not745q5H = nDF4gVNx0u9Q.oclC8DLjA_lV(pDhUq4x6UMmH * pDhUq4x6UMmH, axis=nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2024 - 1976), 8)) GfLtDYgw6gy8 = nDF4gVNx0u9Q.oclC8DLjA_lV(uFA9Lk4IxvMH * a_25nCkImxKI, axis=nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1813 - 1765), 8)) n1xgCOuZVhIv = nDF4gVNx0u9Q.oclC8DLjA_lV(uFA9Lk4IxvMH * pDhUq4x6UMmH, axis=nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1128 - 1080), 8)) nlXsT_LUVPQ8 = _a3_TsNQIavm * Cm6not745q5H - dtDjwmLMtwJN * dtDjwmLMtwJN AHjoqqAl9T4L = nDF4gVNx0u9Q.SRWC_OfU1mLH(nlXsT_LUVPQ8, nzTpIcepk0o8('\x30' + chr(11594 - 11483) + '\060', 8)) FMmD16A2grCG = nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31', 8) - AHjoqqAl9T4L nlXsT_LUVPQ8 += AHjoqqAl9T4L Iz9ShXZXw2p3 = FMmD16A2grCG * (Cm6not745q5H * GfLtDYgw6gy8 - dtDjwmLMtwJN * n1xgCOuZVhIv) / nlXsT_LUVPQ8 M7_30vzmBKwa = FMmD16A2grCG * (_a3_TsNQIavm * n1xgCOuZVhIv - dtDjwmLMtwJN * GfLtDYgw6gy8) / nlXsT_LUVPQ8 return roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\x99\xf8rM.\xd8\x1a'), '\x64' + '\145' + '\x63' + chr(0b1101111) + chr(0b1011111 + 0o5) + chr(0b1100101))(chr(0b1000000 + 0o65) + '\164' + '\146' + chr(0b101101 + 0o0) + chr(56)))([1.0 - Iz9ShXZXw2p3 - M7_30vzmBKwa, Iz9ShXZXw2p3])
noahbenson/neuropythy
neuropythy/geometry/util.py
cartesian_to_barycentric_2D
def cartesian_to_barycentric_2D(tri, xy): ''' cartesian_to_barycentric_2D(tri, xy) yields a (2 x n) barycentric coordinate matrix (or just a tuple if xy is a single (x, y) coordinate) of the first two barycentric coordinates for the triangle coordinate array tri. The array tri should be 3 (vertices) x 2 (coordinates) x n (triangles) unless xy is a tuple, in which case it should be a (3 x 2) matrix. ''' xy = np.asarray(xy) tri = np.asarray(tri) if len(xy.shape) == 1: return cartesian_to_barycentric_2D(np.transpose(np.asarray([tri]), (1,2,0)), np.asarray([xy]).T)[:,0] xy = xy if xy.shape[0] == 2 else xy.T if tri.shape[0] == 3: tri = tri if tri.shape[1] == 2 else np.transpose(tri, (0,2,1)) elif tri.shape[1] == 3: tri = tri.T if tri.shape[0] == 2 else np.transpose(tri, (1,2,0)) elif tri.shape[2] == 3: tri = np.transpose(tri, (2,1,0) if tri.shape[1] == 2 else (2,0,1)) if tri.shape[0] != 3 or tri.shape[1] != 2: raise ValueError('Triangle array did not have dimensions of sizes 3 and 2') if xy.shape[0] != 2: raise ValueError('coordinate matrix did not have a dimension of size 2') if tri.shape[2] != xy.shape[1]: raise ValueError('number of triangles and coordinates must match') # Okay, everything's the right shape... (x,y) = xy ((x1,y1), (x2,y2), (x3,y3)) = tri x_x3 = x - x3 x1_x3 = x1 - x3 x3_x2 = x3 - x2 y_y3 = y - y3 y1_y3 = y1 - y3 y2_y3 = y2 - y3 num1 = (y2_y3*x_x3 + x3_x2*y_y3) num2 = (-y1_y3*x_x3 + x1_x3*y_y3) den = (y2_y3*x1_x3 + x3_x2*y1_y3) zero = np.isclose(den, 0) den += zero unit = 1 - zero l1 = unit * num1 / den l2 = unit * num2 / den return np.asarray((l1, l2))
python
def cartesian_to_barycentric_2D(tri, xy): ''' cartesian_to_barycentric_2D(tri, xy) yields a (2 x n) barycentric coordinate matrix (or just a tuple if xy is a single (x, y) coordinate) of the first two barycentric coordinates for the triangle coordinate array tri. The array tri should be 3 (vertices) x 2 (coordinates) x n (triangles) unless xy is a tuple, in which case it should be a (3 x 2) matrix. ''' xy = np.asarray(xy) tri = np.asarray(tri) if len(xy.shape) == 1: return cartesian_to_barycentric_2D(np.transpose(np.asarray([tri]), (1,2,0)), np.asarray([xy]).T)[:,0] xy = xy if xy.shape[0] == 2 else xy.T if tri.shape[0] == 3: tri = tri if tri.shape[1] == 2 else np.transpose(tri, (0,2,1)) elif tri.shape[1] == 3: tri = tri.T if tri.shape[0] == 2 else np.transpose(tri, (1,2,0)) elif tri.shape[2] == 3: tri = np.transpose(tri, (2,1,0) if tri.shape[1] == 2 else (2,0,1)) if tri.shape[0] != 3 or tri.shape[1] != 2: raise ValueError('Triangle array did not have dimensions of sizes 3 and 2') if xy.shape[0] != 2: raise ValueError('coordinate matrix did not have a dimension of size 2') if tri.shape[2] != xy.shape[1]: raise ValueError('number of triangles and coordinates must match') # Okay, everything's the right shape... (x,y) = xy ((x1,y1), (x2,y2), (x3,y3)) = tri x_x3 = x - x3 x1_x3 = x1 - x3 x3_x2 = x3 - x2 y_y3 = y - y3 y1_y3 = y1 - y3 y2_y3 = y2 - y3 num1 = (y2_y3*x_x3 + x3_x2*y_y3) num2 = (-y1_y3*x_x3 + x1_x3*y_y3) den = (y2_y3*x1_x3 + x3_x2*y1_y3) zero = np.isclose(den, 0) den += zero unit = 1 - zero l1 = unit * num1 / den l2 = unit * num2 / den return np.asarray((l1, l2))
[ "def", "cartesian_to_barycentric_2D", "(", "tri", ",", "xy", ")", ":", "xy", "=", "np", ".", "asarray", "(", "xy", ")", "tri", "=", "np", ".", "asarray", "(", "tri", ")", "if", "len", "(", "xy", ".", "shape", ")", "==", "1", ":", "return", "carte...
cartesian_to_barycentric_2D(tri, xy) yields a (2 x n) barycentric coordinate matrix (or just a tuple if xy is a single (x, y) coordinate) of the first two barycentric coordinates for the triangle coordinate array tri. The array tri should be 3 (vertices) x 2 (coordinates) x n (triangles) unless xy is a tuple, in which case it should be a (3 x 2) matrix.
[ "cartesian_to_barycentric_2D", "(", "tri", "xy", ")", "yields", "a", "(", "2", "x", "n", ")", "barycentric", "coordinate", "matrix", "(", "or", "just", "a", "tuple", "if", "xy", "is", "a", "single", "(", "x", "y", ")", "coordinate", ")", "of", "the", ...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/util.py#L415-L457
train
Returns a 2D matrix that contains the barycentric coordinates of a triangle and a 2D coordinates.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZR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oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(111) + '\x31' + chr(55) + '\x32', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b10000 + 0o41) + '\x34' + chr(1133 - 1082), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(11525 - 11414) + '\061' + chr(52) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\064' + chr(0b1010 + 0o50), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b100101 + 0o112) + chr(49) + chr(0b1001 + 0o52) + '\x34', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b10111 + 0o35) + chr(2241 - 2193), 0o10), nzTpIcepk0o8(chr(886 - 838) + chr(111) + '\x32' + chr(0b110110) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(723 - 675) + chr(10339 - 10228) + chr(50) + '\x30' + '\x35', 0b1000), nzTpIcepk0o8('\060' + chr(0b1010100 + 0o33) + chr(51) + chr(0b110101 + 0o0) + '\x35', 0b1000), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b1101111) + chr(1079 - 1029) + '\067', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1000001 + 0o56) + '\x31' + '\067' + '\067', 26794 - 26786), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\157' + '\x33' + '\062' + chr(1229 - 1176), 0b1000), nzTpIcepk0o8('\060' + chr(1862 - 1751) + chr(1053 - 1004) + chr(0b110110) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(7081 - 6970) + '\x33', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b11101 + 0o26) + chr(50) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(52) + chr(0b1 + 0o65), 0b1000), nzTpIcepk0o8('\060' + chr(4954 - 4843) + chr(49) + '\065', 41862 - 41854), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + '\x31' + '\x31', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(49) + chr(2784 - 2730) + chr(49), ord("\x08")), nzTpIcepk0o8('\x30' + chr(1749 - 1638) + chr(0b100100 + 0o17) + chr(2607 - 2553) + '\066', 0b1000), nzTpIcepk0o8('\060' + chr(353 - 242) + '\063' + '\062' + chr(0b110101 + 0o1), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b0 + 0o62) + '\064' + chr(111 - 59), 0b1000), nzTpIcepk0o8('\x30' + chr(12090 - 11979) + chr(0b110011) + chr(0b110010) + '\064', 38716 - 38708), nzTpIcepk0o8(chr(48) + chr(111) + '\x37' + '\x36', 34449 - 34441), nzTpIcepk0o8('\x30' + '\157' + '\x31' + chr(2209 - 2154) + chr(1734 - 1686), 33197 - 33189), nzTpIcepk0o8(chr(954 - 906) + '\x6f' + chr(0b110001) + chr(0b110001) + chr(2429 - 2375), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + chr(0b110100) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + '\065', 0o10), nzTpIcepk0o8(chr(1779 - 1731) + chr(0b1101111) + '\x33' + '\x32' + '\x36', 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + chr(53) + chr(0b1101 + 0o52), ord("\x08")), nzTpIcepk0o8(chr(1222 - 1174) + chr(111) + chr(957 - 907) + chr(1997 - 1947) + '\x31', 20214 - 20206), nzTpIcepk0o8(chr(48) + '\157' + chr(49) + chr(48) + chr(0b110010), 0o10), nzTpIcepk0o8('\x30' + chr(2403 - 2292) + '\063' + chr(0b110011) + chr(0b110000), 0o10), nzTpIcepk0o8('\060' + '\157' + '\065' + '\x34', 0b1000), nzTpIcepk0o8(chr(423 - 375) + chr(0b1101111) + chr(54) + chr(0b110110 + 0o0), 2816 - 2808), nzTpIcepk0o8('\060' + '\x6f' + chr(0b101111 + 0o7), 0o10), nzTpIcepk0o8(chr(447 - 399) + chr(9544 - 9433) + '\x32' + chr(0b110001) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(111) + chr(52) + chr(0b110001 + 0o5), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b101 + 0o56) + chr(0b100000 + 0o20) + '\x34', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b10001 + 0o136) + chr(1851 - 1802) + '\x33', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(358 - 247) + '\x35' + '\x30', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'T'), '\x64' + chr(101) + chr(99) + chr(924 - 813) + '\x64' + chr(101))('\165' + chr(0b1110100) + '\x66' + '\x2d' + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def ik5dCtX4Qbj1(oRQG7sQgHvpU, Kacl9Si1wTrL): Kacl9Si1wTrL = nDF4gVNx0u9Q.asarray(Kacl9Si1wTrL) oRQG7sQgHvpU = nDF4gVNx0u9Q.asarray(oRQG7sQgHvpU) if ftfygxgFas5X(roI3spqORKae(Kacl9Si1wTrL, roI3spqORKae(ES5oEprVxulp(b'\x16\x0b\x03ol\x19\x83\xc4\xab@G\xb3'), chr(972 - 872) + chr(0b1011010 + 0o13) + '\x63' + '\157' + '\x64' + chr(101))(chr(0b11100 + 0o131) + chr(0b1000 + 0o154) + chr(0b1100110) + chr(965 - 920) + '\x38'))) == nzTpIcepk0o8(chr(992 - 944) + '\157' + chr(49), 32117 - 32109): return ik5dCtX4Qbj1(roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\x0e\x11\x00L/P\xde\xf6\x88'), '\x64' + chr(0b1100101) + chr(99) + '\157' + chr(2656 - 2556) + '\x65')(chr(7009 - 6892) + chr(116) + '\x66' + chr(0b101101) + '\070'))(roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\x1b\x10\x00P.A\xc8'), chr(0b1000 + 0o134) + chr(0b1100100 + 0o1) + chr(0b1001101 + 0o26) + '\157' + chr(100) + '\x65')('\165' + chr(116) + chr(0b10000 + 0o126) + chr(45) + '\x38'))([oRQG7sQgHvpU]), (nzTpIcepk0o8('\060' + chr(111) + chr(1917 - 1868), 8), nzTpIcepk0o8('\x30' + '\x6f' + '\062', 29513 - 29505), nzTpIcepk0o8(chr(936 - 888) + chr(0b1101111) + chr(48), 0b1000))), roI3spqORKae(nDF4gVNx0u9Q.asarray([Kacl9Si1wTrL]), roI3spqORKae(ES5oEprVxulp(b'\x12\x12Wz\x19\x14\xee\xcb\x85sI\x87'), chr(100) + chr(8361 - 8260) + chr(0b1100011) + '\x6f' + '\x64' + chr(0b1100101))(chr(0b1000011 + 0o62) + chr(11456 - 11340) + chr(0b110101 + 0o61) + '\055' + chr(1801 - 1745))))[:, nzTpIcepk0o8(chr(48) + chr(111) + '\060', 8)] Kacl9Si1wTrL = Kacl9Si1wTrL if Kacl9Si1wTrL.lhbM092AFW8f[nzTpIcepk0o8('\x30' + chr(111) + chr(0b110000), 8)] == nzTpIcepk0o8('\060' + chr(5111 - 5000) + chr(50), 8) else Kacl9Si1wTrL.hq6XE4_Nhd6R if roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'\x16\x0b\x03ol\x19\x83\xc4\xab@G\xb3'), chr(100) + chr(313 - 212) + chr(4219 - 4120) + chr(0b1101111) + chr(100) + chr(0b1100101))(chr(117) + chr(0b11111 + 0o125) + chr(5382 - 5280) + chr(45) + '\070'))[nzTpIcepk0o8('\060' + '\157' + '\060', 8)] == nzTpIcepk0o8(chr(1815 - 1767) + chr(11500 - 11389) + '\063', 8): oRQG7sQgHvpU = oRQG7sQgHvpU if oRQG7sQgHvpU.lhbM092AFW8f[nzTpIcepk0o8('\x30' + chr(0b110000 + 0o77) + '\x31', 8)] == nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50), 8) else nDF4gVNx0u9Q.transpose(oRQG7sQgHvpU, (nzTpIcepk0o8(chr(48) + chr(111) + chr(48), 8), nzTpIcepk0o8(chr(1347 - 1299) + chr(0b1101111) + chr(50), 8), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31', 8))) elif roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'\x16\x0b\x03ol\x19\x83\xc4\xab@G\xb3'), chr(0b100011 + 0o101) + chr(0b1100101) + '\143' + '\157' + '\x64' + '\145')('\165' + chr(0b1110100) + chr(0b1100110) + '\055' + '\x38'))[nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(2865 - 2754) + chr(49), 8)] == nzTpIcepk0o8('\x30' + '\x6f' + chr(0b100 + 0o57), 8): oRQG7sQgHvpU = oRQG7sQgHvpU.hq6XE4_Nhd6R if oRQG7sQgHvpU.lhbM092AFW8f[nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1583 - 1535), 8)] == nzTpIcepk0o8('\060' + chr(111) + chr(0b1010 + 0o50), 8) else nDF4gVNx0u9Q.transpose(oRQG7sQgHvpU, (nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061', 8), nzTpIcepk0o8(chr(0b1011 + 0o45) + '\x6f' + chr(0b110010), 8), nzTpIcepk0o8(chr(0b0 + 0o60) + '\157' + chr(0b110000), 8))) elif roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'\x16\x0b\x03ol\x19\x83\xc4\xab@G\xb3'), chr(100) + chr(0b10110 + 0o117) + '\143' + '\x6f' + '\x64' + '\145')(chr(117) + '\164' + chr(7732 - 7630) + '\x2d' + chr(0b101111 + 0o11)))[nzTpIcepk0o8(chr(0b110000) + chr(0b100001 + 0o116) + '\x32', 8)] == nzTpIcepk0o8('\x30' + chr(0b1001 + 0o146) + '\x33', 8): oRQG7sQgHvpU = nDF4gVNx0u9Q.transpose(oRQG7sQgHvpU, (nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b100110 + 0o14), 8), nzTpIcepk0o8(chr(881 - 833) + '\x6f' + chr(49), 8), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\157' + chr(0b110000), 8)) if oRQG7sQgHvpU.lhbM092AFW8f[nzTpIcepk0o8(chr(48) + chr(111) + '\061', 8)] == nzTpIcepk0o8(chr(337 - 289) + chr(111) + '\062', 8) else (nzTpIcepk0o8('\060' + '\x6f' + chr(0b1010 + 0o50), 8), nzTpIcepk0o8(chr(207 - 159) + chr(111) + '\060', 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(49), 8))) if roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'\x16\x0b\x03ol\x19\x83\xc4\xab@G\xb3'), chr(100) + chr(101) + chr(99) + chr(0b1100 + 0o143) + chr(0b111111 + 0o45) + '\x65')('\x75' + chr(0b1110100) + chr(3196 - 3094) + '\x2d' + chr(56)))[nzTpIcepk0o8('\060' + '\x6f' + chr(0b110000), 8)] != nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110000 + 0o3), 8) or roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'\x16\x0b\x03ol\x19\x83\xc4\xab@G\xb3'), chr(0b1001110 + 0o26) + '\145' + '\143' + '\x6f' + '\x64' + chr(0b1010 + 0o133))(chr(11794 - 11677) + chr(0b1110100) + '\146' + '\055' + '\070'))[nzTpIcepk0o8(chr(48) + '\157' + chr(49), 8)] != nzTpIcepk0o8(chr(0b110000) + chr(0b1011110 + 0o21) + chr(1727 - 1677), 8): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b".\x11\x08C2G\xdd\xe0\xcdv\r\xa7\x13z\xf1\x82d\xedQ\x98\xb9\xd0\xf4V\x198\xc5=\xb2\xc6\xfc'\xb6__i\xe1U\xe4d\x1cC\x12K&E\xc2\xa5\xde7\x1e\xbb\x16#\xe3"), chr(0b110100 + 0o60) + chr(0b110110 + 0o57) + chr(99) + chr(0b1000110 + 0o51) + '\x64' + chr(0b11110 + 0o107))(chr(0b111100 + 0o71) + chr(116) + chr(4438 - 4336) + '\055' + chr(0b101110 + 0o12))) if roI3spqORKae(Kacl9Si1wTrL, roI3spqORKae(ES5oEprVxulp(b'\x16\x0b\x03ol\x19\x83\xc4\xab@G\xb3'), '\x64' + '\x65' + chr(5218 - 5119) + chr(9201 - 9090) + '\144' + chr(101))(chr(0b111011 + 0o72) + chr(0b1110100) + chr(3725 - 3623) + chr(0b100 + 0o51) + '\070'))[nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110000), 8)] != nzTpIcepk0o8('\x30' + chr(111) + chr(0b10 + 0o60), 8): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\x19\x0c\x0eP8I\xdf\xe4\x99r_\xb8\x13w\xa3\x8fu\xa9\x15\x9f\xb2\x84\xbaQ\x0cn\xc8|\xa0\xca\xb1#\xf8H_k\xeaH\xb7b\x15\rAM:\x00\xc2\xec\x97r_\xe7'), '\x64' + '\145' + '\x63' + '\x6f' + chr(0b101101 + 0o67) + chr(101))(chr(0b11001 + 0o134) + '\164' + '\146' + '\x2d' + chr(56))) if roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'\x16\x0b\x03ol\x19\x83\xc4\xab@G\xb3'), '\144' + '\145' + '\x63' + chr(0b1101111) + chr(0b1001011 + 0o31) + '\x65')(chr(10524 - 10407) + chr(116) + chr(0b1100110) + chr(0b100011 + 0o12) + chr(0b10111 + 0o41)))[nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(111) + '\062', 8)] != roI3spqORKae(Kacl9Si1wTrL, roI3spqORKae(ES5oEprVxulp(b'\x16\x0b\x03ol\x19\x83\xc4\xab@G\xb3'), chr(100) + chr(101) + chr(99) + '\x6f' + chr(0b1100100) + '\x65')('\165' + '\164' + chr(4178 - 4076) + '\055' + chr(3106 - 3050)))[nzTpIcepk0o8('\060' + chr(0b111000 + 0o67) + chr(1824 - 1775), 8)]: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\x14\x16\x0c@9R\x91\xea\x8b7\x0b\xa7\x1bb\xbf\x81a\xec\x02\xd6\xb7\xca\xb0\x1e\x1b!\xcfo\xb2\xc6\xff#\xacIE&\xe2S\xb7\x7fZ\x0e\x00V?H'), chr(0b1100100) + chr(1603 - 1502) + chr(0b111110 + 0o45) + chr(0b101110 + 0o101) + chr(8754 - 8654) + chr(0b1100101))(chr(0b1010 + 0o153) + chr(0b1110100) + chr(102) + '\x2d' + chr(1819 - 1763))) (bI5jsQ9OkQtj, Fi3yzxctM1zW) = Kacl9Si1wTrL ((yZDwVNk0Rmbq, zZzCuXvNcn0e), (rpGiIBuTNlZH, IEn9C8QzrD_O), (sIdjdeevyJnk, letlHQocEiRj)) = oRQG7sQgHvpU pwyVoheRfJoI = bI5jsQ9OkQtj - sIdjdeevyJnk alad_4U6lqDo = yZDwVNk0Rmbq - sIdjdeevyJnk YmURgIms7vRR = sIdjdeevyJnk - rpGiIBuTNlZH WrcE61HnpdgZ = Fi3yzxctM1zW - letlHQocEiRj VTsjX3niVk7K = zZzCuXvNcn0e - letlHQocEiRj HeVLvX9DouNg = IEn9C8QzrD_O - letlHQocEiRj aTHTDWo89naC = HeVLvX9DouNg * pwyVoheRfJoI + YmURgIms7vRR * WrcE61HnpdgZ h62fIhVbYvr2 = -VTsjX3niVk7K * pwyVoheRfJoI + alad_4U6lqDo * WrcE61HnpdgZ nlXsT_LUVPQ8 = HeVLvX9DouNg * alad_4U6lqDo + YmURgIms7vRR * VTsjX3niVk7K AHjoqqAl9T4L = nDF4gVNx0u9Q.SRWC_OfU1mLH(nlXsT_LUVPQ8, nzTpIcepk0o8(chr(0b110000) + chr(7195 - 7084) + chr(0b10101 + 0o33), 8)) nlXsT_LUVPQ8 += AHjoqqAl9T4L FMmD16A2grCG = nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b11100 + 0o25), 8) - AHjoqqAl9T4L gClKuP9l0z9K = FMmD16A2grCG * aTHTDWo89naC / nlXsT_LUVPQ8 Iz9ShXZXw2p3 = FMmD16A2grCG * h62fIhVbYvr2 / nlXsT_LUVPQ8 return roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\x1b\x10\x00P.A\xc8'), chr(754 - 654) + chr(101) + chr(4266 - 4167) + '\157' + chr(4931 - 4831) + '\x65')('\x75' + chr(0b101101 + 0o107) + chr(0b1100110) + chr(0b1111 + 0o36) + '\x38'))((gClKuP9l0z9K, Iz9ShXZXw2p3))
noahbenson/neuropythy
neuropythy/geometry/util.py
barycentric_to_cartesian
def barycentric_to_cartesian(tri, bc): ''' barycentric_to_cartesian(tri, bc) yields the d x n coordinate matrix of the given barycentric coordinate matrix (also d x n) bc interpolated in the n triangles given in the array tri. See also cartesian_to_barycentric. If tri and bc represent one triangle and coordinate, then just the coordinate and not a matrix is returned. The value d, dimensions, must be 2 or 3. ''' bc = np.asarray(bc) tri = np.asarray(tri) if len(bc.shape) == 1: return barycentric_to_cartesian(np.transpose(np.asarray([tri]), (1,2,0)), np.asarray([bc]).T)[:,0] bc = bc if bc.shape[0] == 2 else bc.T if bc.shape[0] != 2: raise ValueError('barycentric matrix did not have a dimension of size 2') n = bc.shape[1] # we know how many bc's there are now; lets reorient tri to match with the last dimension as n if len(tri.shape) == 2: tri = np.transpose([tri for _ in range(n)], (1,2,0)) # the possible orientations of tri: if tri.shape[0] == 3: if tri.shape[1] in [2,3] and tri.shape[2] == n: pass # default orientation elif tri.shape[1] == n and tri.shape[2] in [2,3]: tri = np.transpose(tri, (0,2,1)) else: raise ValueError('could not deduce triangle dimensions') elif tri.shape[1] == 3: if tri.shape[0] in [2,3] and tri.shape[2] == n: tri = np.transpose(tri, (1,0,2)) elif tri.shape[0] == n and tri.shape[2] in [2,3]: tri = np.transpose(tri, (1,2,0)) else: raise ValueError('could not deduce triangle dimensions') elif tri.shape[2] == 3: if tri.shape[0] in [2,3] and tri.shape[1] == n: tri = np.transpose(tri, (2,0,1)) elif tri.shape[0] == n and tri.shape[1] in [2,3]: tri = np.transpose(tri, (2,1,0)) else: raise ValueError('could not deduce triangle dimensions') else: raise ValueError('At least one dimension of triangles must be 3') if tri.shape[0] != 3 or (tri.shape[1] not in [2,3]): raise ValueError('Triangle array did not have dimensions of sizes 3 and (2 or 3)') if tri.shape[2] != n: raise ValueError('number of triangles and coordinates must match') (l1,l2) = bc (p1, p2, p3) = tri l3 = (1 - l1 - l2) return np.asarray([x1*l1 + x2*l2 + x3*l3 for (x1,x2,x3) in zip(p1, p2, p3)])
python
def barycentric_to_cartesian(tri, bc): ''' barycentric_to_cartesian(tri, bc) yields the d x n coordinate matrix of the given barycentric coordinate matrix (also d x n) bc interpolated in the n triangles given in the array tri. See also cartesian_to_barycentric. If tri and bc represent one triangle and coordinate, then just the coordinate and not a matrix is returned. The value d, dimensions, must be 2 or 3. ''' bc = np.asarray(bc) tri = np.asarray(tri) if len(bc.shape) == 1: return barycentric_to_cartesian(np.transpose(np.asarray([tri]), (1,2,0)), np.asarray([bc]).T)[:,0] bc = bc if bc.shape[0] == 2 else bc.T if bc.shape[0] != 2: raise ValueError('barycentric matrix did not have a dimension of size 2') n = bc.shape[1] # we know how many bc's there are now; lets reorient tri to match with the last dimension as n if len(tri.shape) == 2: tri = np.transpose([tri for _ in range(n)], (1,2,0)) # the possible orientations of tri: if tri.shape[0] == 3: if tri.shape[1] in [2,3] and tri.shape[2] == n: pass # default orientation elif tri.shape[1] == n and tri.shape[2] in [2,3]: tri = np.transpose(tri, (0,2,1)) else: raise ValueError('could not deduce triangle dimensions') elif tri.shape[1] == 3: if tri.shape[0] in [2,3] and tri.shape[2] == n: tri = np.transpose(tri, (1,0,2)) elif tri.shape[0] == n and tri.shape[2] in [2,3]: tri = np.transpose(tri, (1,2,0)) else: raise ValueError('could not deduce triangle dimensions') elif tri.shape[2] == 3: if tri.shape[0] in [2,3] and tri.shape[1] == n: tri = np.transpose(tri, (2,0,1)) elif tri.shape[0] == n and tri.shape[1] in [2,3]: tri = np.transpose(tri, (2,1,0)) else: raise ValueError('could not deduce triangle dimensions') else: raise ValueError('At least one dimension of triangles must be 3') if tri.shape[0] != 3 or (tri.shape[1] not in [2,3]): raise ValueError('Triangle array did not have dimensions of sizes 3 and (2 or 3)') if tri.shape[2] != n: raise ValueError('number of triangles and coordinates must match') (l1,l2) = bc (p1, p2, p3) = tri l3 = (1 - l1 - l2) return np.asarray([x1*l1 + x2*l2 + x3*l3 for (x1,x2,x3) in zip(p1, p2, p3)])
[ "def", "barycentric_to_cartesian", "(", "tri", ",", "bc", ")", ":", "bc", "=", "np", ".", "asarray", "(", "bc", ")", "tri", "=", "np", ".", "asarray", "(", "tri", ")", "if", "len", "(", "bc", ".", "shape", ")", "==", "1", ":", "return", "barycent...
barycentric_to_cartesian(tri, bc) yields the d x n coordinate matrix of the given barycentric coordinate matrix (also d x n) bc interpolated in the n triangles given in the array tri. See also cartesian_to_barycentric. If tri and bc represent one triangle and coordinate, then just the coordinate and not a matrix is returned. The value d, dimensions, must be 2 or 3.
[ "barycentric_to_cartesian", "(", "tri", "bc", ")", "yields", "the", "d", "x", "n", "coordinate", "matrix", "of", "the", "given", "barycentric", "coordinate", "matrix", "(", "also", "d", "x", "n", ")", "bc", "interpolated", "in", "the", "n", "triangles", "g...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/util.py#L459-L504
train
Given a barycentric array tri returns the d x n coordinate matrix of the given barycentric array bc interpolated in the given n triangles and the value d x n coordinate matrix of the given barycentric array tri.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhl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ertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(2662 - 2551) + '\x35' + '\x30', 15758 - 15750), nzTpIcepk0o8(chr(1158 - 1110) + '\x6f' + '\062' + chr(0b101110 + 0o7) + chr(0b1101 + 0o45), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1100010 + 0o15) + chr(49) + '\x34' + chr(363 - 313), 0o10), nzTpIcepk0o8(chr(2066 - 2018) + chr(0b11001 + 0o126) + chr(49) + chr(48) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50) + '\061' + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(385 - 337) + chr(0b111001 + 0o66) + '\062' + chr(0b110000) + chr(2069 - 2016), 19063 - 19055), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\067' + chr(49), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b11001 + 0o30) + chr(0b110000) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\157' + chr(49) + chr(51) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(1587 - 1539) + chr(6830 - 6719) + '\x32' + '\x31' + chr(55), 8), nzTpIcepk0o8(chr(2147 - 2099) + '\157' + chr(0b110001) + '\x36' + '\x33', 41540 - 41532), nzTpIcepk0o8(chr(0b110000) + chr(3757 - 3646) + '\x36' + chr(0b11 + 0o56), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b10111 + 0o34) + '\064' + chr(49), 0b1000), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(779 - 668) + chr(1684 - 1634) + '\x33' + '\062', 51591 - 51583), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + '\064' + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(10887 - 10776) + '\062' + '\066', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + chr(0b110100) + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + chr(0b110101) + chr(48), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + chr(50) + chr(48), 20582 - 20574), nzTpIcepk0o8('\060' + '\x6f' + '\x34' + chr(0b110010), 26783 - 26775), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(52) + chr(50), 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49) + chr(0b110011) + '\x34', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b11110 + 0o121) + chr(2571 - 2520) + chr(0b11 + 0o60) + chr(0b101010 + 0o7), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(50) + '\061' + chr(0b101 + 0o60), 58372 - 58364), nzTpIcepk0o8(chr(48) + chr(3152 - 3041) + '\x31' + '\x32' + chr(0b1110 + 0o42), 44511 - 44503), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(52) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(111) + chr(476 - 425) + '\x37' + chr(0b100101 + 0o16), 0o10), nzTpIcepk0o8(chr(1371 - 1323) + chr(0b11111 + 0o120) + chr(50) + chr(0b110100) + chr(1834 - 1784), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + chr(50) + chr(0b110110), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(623 - 572) + chr(55) + '\061', 10418 - 10410), nzTpIcepk0o8('\060' + chr(0b1000011 + 0o54) + chr(0b110011) + chr(0b110100) + chr(2717 - 2662), 45175 - 45167), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1101111) + chr(49) + chr(0b110011) + chr(2079 - 2026), 0o10), nzTpIcepk0o8(chr(0b101000 + 0o10) + '\x6f' + chr(49) + '\066' + '\x32', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + chr(50) + '\x31', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b10100 + 0o133) + chr(760 - 710) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + '\062' + chr(0b110100), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(2397 - 2345) + chr(0b101011 + 0o6), 46886 - 46878), nzTpIcepk0o8('\060' + chr(1838 - 1727) + '\x32' + chr(51) + '\x34', 42616 - 42608), nzTpIcepk0o8(chr(1291 - 1243) + '\x6f' + chr(0b110011) + chr(0b11 + 0o61) + chr(49), 8), nzTpIcepk0o8('\x30' + '\157' + '\062' + '\x37' + chr(0b110101), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(11621 - 11510) + chr(0b101 + 0o60) + chr(0b11 + 0o55), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x06'), '\x64' + '\x65' + '\143' + '\x6f' + '\144' + '\x65')('\x75' + chr(6823 - 6707) + '\146' + '\055' + chr(854 - 798)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def JqTyiyQwbzjK(oRQG7sQgHvpU, oVpVmq4alZLt): oVpVmq4alZLt = nDF4gVNx0u9Q.asarray(oVpVmq4alZLt) oRQG7sQgHvpU = nDF4gVNx0u9Q.asarray(oRQG7sQgHvpU) if ftfygxgFas5X(roI3spqORKae(oVpVmq4alZLt, roI3spqORKae(ES5oEprVxulp(b'D\xc2\x00\n\xbf\xbc\x0b\x04\x1d\xd8KW'), chr(6122 - 6022) + chr(0b1100101) + chr(9445 - 9346) + chr(111) + chr(0b1100100) + chr(0b10001 + 0o124))(chr(0b11101 + 0o130) + chr(1984 - 1868) + '\x66' + chr(0b100110 + 0o7) + chr(0b111000)))) == nzTpIcepk0o8('\x30' + '\157' + chr(0b110001), ord("\x08")): return JqTyiyQwbzjK(roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\\\xd8\x03)\xfc\xf5V6>'), '\x64' + chr(0b1100 + 0o131) + '\x63' + '\157' + '\x64' + '\x65')(chr(0b1001010 + 0o53) + chr(0b1110100) + chr(102) + '\x2d' + '\070'))(roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'I\xd9\x035\xfd\xe4@'), '\x64' + chr(101) + '\143' + chr(0b1101111) + chr(100) + chr(3831 - 3730))('\165' + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(56)))([oRQG7sQgHvpU]), (nzTpIcepk0o8('\060' + chr(7543 - 7432) + '\x31', 8), nzTpIcepk0o8('\060' + chr(2669 - 2558) + chr(610 - 560), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b111001 + 0o66) + chr(48), 0b1000))), roI3spqORKae(nDF4gVNx0u9Q.asarray([oVpVmq4alZLt]), roI3spqORKae(ES5oEprVxulp(b'@\xdbT\x1f\xca\xb1f\x0b3\xebEc'), chr(0b1100100) + '\145' + chr(0b101011 + 0o70) + chr(3568 - 3457) + chr(100) + chr(101))(chr(0b1110101) + chr(10234 - 10118) + chr(0b1100110) + chr(0b110 + 0o47) + chr(0b111000))))[:, nzTpIcepk0o8('\x30' + chr(0b100111 + 0o110) + chr(0b11111 + 0o21), 8)] oVpVmq4alZLt = oVpVmq4alZLt if oVpVmq4alZLt.lhbM092AFW8f[nzTpIcepk0o8(chr(0b110000) + chr(7483 - 7372) + '\060', 8)] == nzTpIcepk0o8('\x30' + chr(111) + '\x32', 8) else oVpVmq4alZLt.hq6XE4_Nhd6R if roI3spqORKae(oVpVmq4alZLt, roI3spqORKae(ES5oEprVxulp(b'D\xc2\x00\n\xbf\xbc\x0b\x04\x1d\xd8KW'), '\144' + chr(0b1100101) + '\143' + chr(0b110010 + 0o75) + chr(100) + '\145')(chr(0b1110101) + chr(0b1110100) + chr(0b1001011 + 0o33) + chr(45) + '\070'))[nzTpIcepk0o8(chr(1701 - 1653) + chr(0b1100010 + 0o15) + '\x30', 8)] != nzTpIcepk0o8(chr(48) + chr(111) + chr(196 - 146), 8): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'J\xcb\x10>\xec\xe0W1)\xe6\x10\x11\x8c\xfb\x90d\xce\x10\xf0FK8\xf9\xe3?R\xdb\xca\xb7\x8f\x82}\x13\xb1v=L\xf9\x8f\xceA\xc5\x0cg\xe0\xe3\x1962\xf5\x16\x11\xd3'), '\x64' + '\145' + chr(0b1100011) + chr(111) + chr(1448 - 1348) + chr(0b1100101))('\165' + chr(116) + chr(102) + chr(0b101101) + chr(522 - 466))) NoZxuO7wjArS = oVpVmq4alZLt.lhbM092AFW8f[nzTpIcepk0o8('\x30' + chr(0b1010 + 0o145) + chr(49), 8)] if ftfygxgFas5X(roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'D\xc2\x00\n\xbf\xbc\x0b\x04\x1d\xd8KW'), '\144' + chr(4185 - 4084) + chr(0b1001 + 0o132) + chr(0b1101111) + chr(0b11111 + 0o105) + chr(6194 - 6093))(chr(0b110111 + 0o76) + '\x74' + chr(5721 - 5619) + chr(1057 - 1012) + '\x38'))) == nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b11111 + 0o23), 8): oRQG7sQgHvpU = nDF4gVNx0u9Q.transpose([oRQG7sQgHvpU for zIqcgNgQ9U6F in bbT2xIe5pzk7(NoZxuO7wjArS)], (nzTpIcepk0o8(chr(0b101001 + 0o7) + '\157' + chr(0b110001), 8), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b1101111) + chr(0b1000 + 0o52), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(48), 8))) if roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'D\xc2\x00\n\xbf\xbc\x0b\x04\x1d\xd8KW'), chr(852 - 752) + chr(0b1100101) + '\143' + chr(0b1101111) + chr(0b1100010 + 0o2) + '\145')(chr(8314 - 8197) + chr(116) + chr(102) + chr(0b101101) + '\070'))[nzTpIcepk0o8(chr(48) + '\157' + '\x30', 8)] == nzTpIcepk0o8(chr(121 - 73) + '\157' + '\x33', 65131 - 65123): if roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'D\xc2\x00\n\xbf\xbc\x0b\x04\x1d\xd8KW'), chr(6667 - 6567) + chr(101) + chr(452 - 353) + '\x6f' + chr(0b1000100 + 0o40) + chr(0b1011111 + 0o6))(chr(3660 - 3543) + '\164' + chr(0b1100110) + chr(335 - 290) + chr(0b111000)))[nzTpIcepk0o8('\060' + '\157' + '\061', 8)] in [nzTpIcepk0o8(chr(0b110000) + chr(0b1011011 + 0o24) + chr(1313 - 1263), 8), nzTpIcepk0o8('\060' + chr(0b10 + 0o155) + chr(0b0 + 0o63), 8)] and roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'D\xc2\x00\n\xbf\xbc\x0b\x04\x1d\xd8KW'), chr(0b1100100) + '\x65' + '\x63' + '\x6f' + chr(0b1001000 + 0o34) + '\x65')(chr(0b1110101) + '\x74' + chr(102) + chr(45) + '\x38'))[nzTpIcepk0o8('\060' + chr(0b1101111) + chr(50), 8)] == NoZxuO7wjArS: pass elif roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'D\xc2\x00\n\xbf\xbc\x0b\x04\x1d\xd8KW'), chr(0b1100100) + chr(1398 - 1297) + chr(4132 - 4033) + chr(0b1101111) + '\x64' + chr(9224 - 9123))('\x75' + chr(5344 - 5228) + chr(102) + chr(0b11 + 0o52) + chr(0b100000 + 0o30)))[nzTpIcepk0o8(chr(2095 - 2047) + chr(0b101100 + 0o103) + chr(0b110001 + 0o0), 8)] == NoZxuO7wjArS and roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'D\xc2\x00\n\xbf\xbc\x0b\x04\x1d\xd8KW'), '\x64' + '\x65' + chr(2864 - 2765) + chr(0b1101111) + chr(8221 - 8121) + chr(4780 - 4679))(chr(0b1110101) + chr(116) + chr(5323 - 5221) + chr(45) + chr(0b111000)))[nzTpIcepk0o8(chr(1939 - 1891) + chr(8901 - 8790) + '\x32', 8)] in [nzTpIcepk0o8(chr(48) + chr(0b1010010 + 0o35) + '\x32', 8), nzTpIcepk0o8('\x30' + '\x6f' + '\063', 8)]: oRQG7sQgHvpU = nDF4gVNx0u9Q.transpose(oRQG7sQgHvpU, (nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(7036 - 6925) + '\060', 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2489 - 2439), 8), nzTpIcepk0o8(chr(2057 - 2009) + chr(0b1101111) + chr(923 - 874), 8))) else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b"K\xc5\x17+\xeb\xa5W*/\xaf\x17T\x85\xef\x87s\x87\x1c\xa2KC2\xbe\xe15\x06\x9f\xcb\xbb\x9c\x89.\x1b\xfe|'"), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(5563 - 5452) + chr(100) + chr(101))(chr(117) + '\164' + chr(0b1000001 + 0o45) + chr(1902 - 1857) + chr(0b1110 + 0o52))) elif roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'D\xc2\x00\n\xbf\xbc\x0b\x04\x1d\xd8KW'), '\144' + '\x65' + '\143' + chr(111) + chr(3415 - 3315) + chr(101))(chr(0b1001 + 0o154) + chr(0b1110100) + chr(102) + chr(0b11100 + 0o21) + '\070'))[nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(111) + chr(49), 8)] == nzTpIcepk0o8(chr(0b110 + 0o52) + '\x6f' + '\x33', 8): if roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'D\xc2\x00\n\xbf\xbc\x0b\x04\x1d\xd8KW'), '\144' + chr(0b1100101) + chr(0b1100011) + '\x6f' + '\144' + chr(0b1110 + 0o127))(chr(0b1000000 + 0o65) + chr(0b101011 + 0o111) + chr(102) + chr(0b101101) + chr(56)))[nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(111) + '\060', 8)] in [nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062', 8), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011), 8)] and roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'D\xc2\x00\n\xbf\xbc\x0b\x04\x1d\xd8KW'), chr(0b1100100) + '\145' + chr(298 - 199) + chr(5831 - 5720) + '\x64' + chr(0b1000011 + 0o42))(chr(117) + chr(116) + '\146' + chr(45) + chr(2448 - 2392)))[nzTpIcepk0o8('\x30' + '\157' + chr(2289 - 2239), 8)] == NoZxuO7wjArS: oRQG7sQgHvpU = nDF4gVNx0u9Q.transpose(oRQG7sQgHvpU, (nzTpIcepk0o8('\060' + chr(0b1000000 + 0o57) + chr(0b100110 + 0o13), 8), nzTpIcepk0o8('\060' + '\157' + chr(0b10 + 0o56), 8), nzTpIcepk0o8(chr(1041 - 993) + '\x6f' + '\x32', 8))) elif roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'D\xc2\x00\n\xbf\xbc\x0b\x04\x1d\xd8KW'), chr(100) + '\x65' + '\143' + chr(0b1101111) + chr(100) + '\x65')('\x75' + '\x74' + chr(0b1100110) + '\055' + chr(56)))[nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(111) + chr(1444 - 1396), 8)] == NoZxuO7wjArS and roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'D\xc2\x00\n\xbf\xbc\x0b\x04\x1d\xd8KW'), chr(0b1100100) + '\145' + chr(0b1100011) + chr(0b1010110 + 0o31) + '\144' + '\145')(chr(0b11110 + 0o127) + chr(12840 - 12724) + chr(0b1100110) + '\055' + chr(56)))[nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010), 8)] in [nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062', 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(792 - 741), 8)]: oRQG7sQgHvpU = nDF4gVNx0u9Q.transpose(oRQG7sQgHvpU, (nzTpIcepk0o8(chr(0b110000) + chr(8457 - 8346) + chr(0b100110 + 0o13), 8), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\x6f' + chr(0b110010), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b111010 + 0o65) + '\x30', 8))) else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b"K\xc5\x17+\xeb\xa5W*/\xaf\x17T\x85\xef\x87s\x87\x1c\xa2KC2\xbe\xe15\x06\x9f\xcb\xbb\x9c\x89.\x1b\xfe|'"), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(2368 - 2257) + chr(287 - 187) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(0b1000101 + 0o41) + '\055' + '\070')) elif roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'D\xc2\x00\n\xbf\xbc\x0b\x04\x1d\xd8KW'), '\144' + chr(101) + '\x63' + chr(8982 - 8871) + chr(100) + '\x65')(chr(0b1000011 + 0o62) + chr(0b1011111 + 0o25) + chr(2345 - 2243) + chr(1634 - 1589) + '\070'))[nzTpIcepk0o8(chr(0b110000) + chr(0b101100 + 0o103) + chr(1816 - 1766), 8)] == nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b101010 + 0o105) + chr(51), 8): if roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'D\xc2\x00\n\xbf\xbc\x0b\x04\x1d\xd8KW'), chr(100) + '\x65' + '\x63' + chr(0b1110 + 0o141) + chr(0b1100100) + chr(101))('\165' + chr(0b1010001 + 0o43) + '\146' + chr(0b101101) + chr(0b11011 + 0o35)))[nzTpIcepk0o8(chr(0b100 + 0o54) + '\157' + chr(1436 - 1388), 8)] in [nzTpIcepk0o8(chr(2204 - 2156) + chr(111) + chr(0b101110 + 0o4), 8), nzTpIcepk0o8('\x30' + '\157' + chr(2350 - 2299), 8)] and roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'D\xc2\x00\n\xbf\xbc\x0b\x04\x1d\xd8KW'), chr(0b111011 + 0o51) + '\x65' + '\143' + chr(1205 - 1094) + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(116) + chr(102) + chr(0b10100 + 0o31) + chr(0b111000)))[nzTpIcepk0o8('\060' + chr(0b1101111) + chr(49), 8)] == NoZxuO7wjArS: oRQG7sQgHvpU = nDF4gVNx0u9Q.transpose(oRQG7sQgHvpU, (nzTpIcepk0o8('\060' + '\x6f' + chr(283 - 233), 8), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(1089 - 978) + '\060', 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b101101 + 0o4), 8))) elif roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'D\xc2\x00\n\xbf\xbc\x0b\x04\x1d\xd8KW'), chr(9805 - 9705) + chr(0b110101 + 0o60) + '\x63' + '\157' + chr(0b1010010 + 0o22) + '\x65')('\x75' + chr(116) + '\146' + '\055' + chr(56)))[nzTpIcepk0o8(chr(1484 - 1436) + '\x6f' + chr(48), 8)] == NoZxuO7wjArS and roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'D\xc2\x00\n\xbf\xbc\x0b\x04\x1d\xd8KW'), chr(0b101100 + 0o70) + chr(101) + chr(99) + chr(0b1101111) + '\144' + chr(101))(chr(117) + chr(0b1110100) + chr(102) + chr(249 - 204) + '\x38'))[nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31', 8)] in [nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b101010 + 0o105) + '\x32', 8), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063', 8)]: oRQG7sQgHvpU = nDF4gVNx0u9Q.transpose(oRQG7sQgHvpU, (nzTpIcepk0o8(chr(48) + '\x6f' + chr(50), 8), nzTpIcepk0o8(chr(48) + chr(1473 - 1362) + chr(925 - 876), 8), nzTpIcepk0o8(chr(0b110000) + chr(3522 - 3411) + chr(172 - 124), 8))) else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b"K\xc5\x17+\xeb\xa5W*/\xaf\x17T\x85\xef\x87s\x87\x1c\xa2KC2\xbe\xe15\x06\x9f\xcb\xbb\x9c\x89.\x1b\xfe|'"), chr(0b1100100) + chr(101) + '\x63' + chr(0b1101111) + chr(0b101110 + 0o66) + '\x65')(chr(117) + '\164' + chr(102) + chr(45) + chr(0b11101 + 0o33))) else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'i\xdeB+\xea\xe4J1{\xe0\x1dT\xc1\xfe\x8d{\xc2\x06\xa3KM2\xf9\xe26\x06\x8f\xd0\xbf\x98\x89:\x1e\xf4atL\xe9\x92\xc9\x08\xc8\x07g\xbc'), '\x64' + '\x65' + '\x63' + '\x6f' + chr(2234 - 2134) + '\x65')(chr(826 - 709) + chr(4695 - 4579) + chr(102) + '\x2d' + chr(0b111000))) if roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'D\xc2\x00\n\xbf\xbc\x0b\x04\x1d\xd8KW'), '\144' + '\145' + '\x63' + chr(111) + chr(0b110010 + 0o62) + '\145')(chr(117) + '\164' + chr(102) + chr(0b11011 + 0o22) + '\x38'))[nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110000), 8)] != nzTpIcepk0o8(chr(48) + chr(111) + chr(0b10001 + 0o42), 8) or roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'D\xc2\x00\n\xbf\xbc\x0b\x04\x1d\xd8KW'), '\144' + '\x65' + chr(0b1100011) + chr(0b1001110 + 0o41) + '\x64' + '\x65')('\165' + chr(0b10010 + 0o142) + chr(0b100001 + 0o105) + '\x2d' + chr(0b111000)))[nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1070 - 1021), 8)] not in [nzTpIcepk0o8(chr(528 - 480) + chr(7547 - 7436) + chr(50), 8), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b1101111) + chr(0b1010 + 0o51), 8)]: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'|\xd8\x0b&\xe1\xe2U {\xee\x01C\x80\xe3\xc4r\xce\x0c\xf0LM(\xf9\xe51P\x9e\x82\xb2\x90\x8a8\x1c\xe2{;O\xef\xc1\xd2N\x8a\x11.\xf5\xe0Jeh\xaf\x12_\x85\xba\xcc$\x87\x07\xa2\x02\x11u'), chr(199 - 99) + '\145' + '\143' + '\x6f' + '\x64' + '\145')(chr(117) + chr(0b111110 + 0o66) + '\146' + chr(0b10010 + 0o33) + chr(56))) if roI3spqORKae(oRQG7sQgHvpU, roI3spqORKae(ES5oEprVxulp(b'D\xc2\x00\n\xbf\xbc\x0b\x04\x1d\xd8KW'), chr(0b1100100) + '\145' + chr(99) + chr(4905 - 4794) + chr(9749 - 9649) + chr(5616 - 5515))(chr(0b11000 + 0o135) + chr(3720 - 3604) + chr(102) + chr(0b101101) + chr(0b0 + 0o70)))[nzTpIcepk0o8('\x30' + chr(111) + chr(50), 8)] != NoZxuO7wjArS: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'F\xdf\x0f%\xea\xf7\x19*=\xaf\x07C\x88\xfb\x8aq\xcb\r\xa3\x02C2\xbd\xad3I\x94\xd0\xb2\x90\x89<\x06\xf4atL\xe9\x92\xc9\x08\xc7\x033\xec\xed'), chr(100) + chr(0b1100101) + '\x63' + chr(111) + chr(9718 - 9618) + chr(0b1001100 + 0o31))('\165' + chr(0b1110100) + chr(0b1100110) + chr(45) + chr(0b110010 + 0o6))) (gClKuP9l0z9K, Iz9ShXZXw2p3) = oVpVmq4alZLt (uTffoKvaS1oJ, KSkQTDFiUtnb, Qbl9difUQB1t) = oRQG7sQgHvpU M7_30vzmBKwa = nzTpIcepk0o8('\060' + '\157' + '\x31', 8) - gClKuP9l0z9K - Iz9ShXZXw2p3 return roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'I\xd9\x035\xfd\xe4@'), chr(0b110 + 0o136) + chr(2594 - 2493) + chr(0b1100011) + chr(111) + '\144' + chr(0b1100101))(chr(0b1100111 + 0o16) + '\x74' + chr(0b101110 + 0o70) + chr(859 - 814) + chr(0b111000)))([yZDwVNk0Rmbq * gClKuP9l0z9K + rpGiIBuTNlZH * Iz9ShXZXw2p3 + sIdjdeevyJnk * M7_30vzmBKwa for (yZDwVNk0Rmbq, rpGiIBuTNlZH, sIdjdeevyJnk) in TxMFWa_Xzviv(uTffoKvaS1oJ, KSkQTDFiUtnb, Qbl9difUQB1t)])
noahbenson/neuropythy
neuropythy/geometry/util.py
triangle_address
def triangle_address(fx, pt): ''' triangle_address(FX, P) yields an address coordinate (t,r) for the point P in the triangle defined by the (3 x d)-sized coordinate matrix FX, in which each row of the matrix is the d-dimensional vector representing the respective triangle vertx for triangle [A,B,C]. The resulting coordinates (t,r) (0 <= t <= 1, 0 <= r <= 1) address the point P such that, if t gives the fraction of the angle from vector AB to vector AC that is made by the angle between vectors AB and AP, and r gives the fraction ||AP||/||AR|| where R is the point of intersection between lines AP and BC. If P is a (d x n)-sized matrix of points, then a (2 x n) matrix of addresses is returned. ''' fx = np.asarray(fx) pt = np.asarray(pt) # The triangle vectors... ab = fx[1] - fx[0] ac = fx[2] - fx[0] bc = fx[2] - fx[1] ap = np.asarray([pt_i - a_i for (pt_i, a_i) in zip(pt, fx[0])]) # get the unnormalized distance... r = np.sqrt((ap ** 2).sum(0)) # now we can find the angle... unit = 1 - r.astype(bool) t0 = vector_angle(ab, ac) t = vector_angle(ap + [ab_i * unit for ab_i in ab], ab) sint = np.sin(t) sindt = np.sin(t0 - t) # finding r0 is tricker--we use this fancy formula based on the law of sines q0 = np.sqrt((bc ** 2).sum(0)) # B->C distance beta = vector_angle(-ab, bc) # Angle at B sinGamma = np.sin(math.pi - beta - t0) sinBeta = np.sin(beta) r0 = q0 * sinBeta * sinGamma / (sinBeta * sindt + sinGamma * sint) return np.asarray([t/t0, r/r0])
python
def triangle_address(fx, pt): ''' triangle_address(FX, P) yields an address coordinate (t,r) for the point P in the triangle defined by the (3 x d)-sized coordinate matrix FX, in which each row of the matrix is the d-dimensional vector representing the respective triangle vertx for triangle [A,B,C]. The resulting coordinates (t,r) (0 <= t <= 1, 0 <= r <= 1) address the point P such that, if t gives the fraction of the angle from vector AB to vector AC that is made by the angle between vectors AB and AP, and r gives the fraction ||AP||/||AR|| where R is the point of intersection between lines AP and BC. If P is a (d x n)-sized matrix of points, then a (2 x n) matrix of addresses is returned. ''' fx = np.asarray(fx) pt = np.asarray(pt) # The triangle vectors... ab = fx[1] - fx[0] ac = fx[2] - fx[0] bc = fx[2] - fx[1] ap = np.asarray([pt_i - a_i for (pt_i, a_i) in zip(pt, fx[0])]) # get the unnormalized distance... r = np.sqrt((ap ** 2).sum(0)) # now we can find the angle... unit = 1 - r.astype(bool) t0 = vector_angle(ab, ac) t = vector_angle(ap + [ab_i * unit for ab_i in ab], ab) sint = np.sin(t) sindt = np.sin(t0 - t) # finding r0 is tricker--we use this fancy formula based on the law of sines q0 = np.sqrt((bc ** 2).sum(0)) # B->C distance beta = vector_angle(-ab, bc) # Angle at B sinGamma = np.sin(math.pi - beta - t0) sinBeta = np.sin(beta) r0 = q0 * sinBeta * sinGamma / (sinBeta * sindt + sinGamma * sint) return np.asarray([t/t0, r/r0])
[ "def", "triangle_address", "(", "fx", ",", "pt", ")", ":", "fx", "=", "np", ".", "asarray", "(", "fx", ")", "pt", "=", "np", ".", "asarray", "(", "pt", ")", "# The triangle vectors...", "ab", "=", "fx", "[", "1", "]", "-", "fx", "[", "0", "]", ...
triangle_address(FX, P) yields an address coordinate (t,r) for the point P in the triangle defined by the (3 x d)-sized coordinate matrix FX, in which each row of the matrix is the d-dimensional vector representing the respective triangle vertx for triangle [A,B,C]. The resulting coordinates (t,r) (0 <= t <= 1, 0 <= r <= 1) address the point P such that, if t gives the fraction of the angle from vector AB to vector AC that is made by the angle between vectors AB and AP, and r gives the fraction ||AP||/||AR|| where R is the point of intersection between lines AP and BC. If P is a (d x n)-sized matrix of points, then a (2 x n) matrix of addresses is returned.
[ "triangle_address", "(", "FX", "P", ")", "yields", "an", "address", "coordinate", "(", "t", "r", ")", "for", "the", "point", "P", "in", "the", "triangle", "defined", "by", "the", "(", "3", "x", "d", ")", "-", "sized", "coordinate", "matrix", "FX", "i...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/util.py#L506-L538
train
This function returns the address of a triangle at a given point.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,j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b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(427 - 379) + '\x6f' + '\067' + chr(0b110100), 3122 - 3114), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + chr(0b110000 + 0o0) + chr(49), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b10011 + 0o41), 24020 - 24012), nzTpIcepk0o8(chr(2065 - 2017) + '\x6f' + '\x31' + chr(0b100111 + 0o11) + chr(0b110110), 25755 - 25747), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b100111 + 0o13) + chr(0b11010 + 0o31) + '\062', 0o10), nzTpIcepk0o8(chr(0b11101 + 0o23) + '\x6f' + chr(400 - 349) + chr(0b110101) + chr(1083 - 1035), 0b1000), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(111) + chr(0b101111 + 0o4) + chr(0b100001 + 0o25) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(48) + chr(0b11111 + 0o120) + chr(0b11001 + 0o32) + '\x32' + chr(55), ord("\x08")), nzTpIcepk0o8('\060' + chr(2016 - 1905) + chr(0b101010 + 0o7) + chr(0b10001 + 0o41) + chr(0b110101), 57076 - 57068), nzTpIcepk0o8('\060' + chr(0b1001001 + 0o46) + '\061' + chr(1060 - 1007) + chr(53), 0o10), nzTpIcepk0o8(chr(1658 - 1610) + '\157' + chr(0b110010) + '\x33' + '\x31', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b100000 + 0o22) + chr(1398 - 1347) + chr(49), 8), nzTpIcepk0o8(chr(0b100 + 0o54) + '\157' + '\063' + chr(1609 - 1554) + chr(0b110110), 63006 - 62998), nzTpIcepk0o8(chr(0b110000) + '\157' + '\061' + chr(0b11010 + 0o27) + '\x33', 19695 - 19687), nzTpIcepk0o8(chr(1724 - 1676) + chr(0b1101111) + chr(49) + chr(54), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(1271 - 1217) + chr(0b10100 + 0o35), 48137 - 48129), nzTpIcepk0o8('\x30' + chr(1658 - 1547) + chr(0b101011 + 0o6) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1100110 + 0o11) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(111) + '\x31' + '\062', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\x34' + chr(0b110110), 26870 - 26862), nzTpIcepk0o8('\060' + '\157' + chr(488 - 437), 0b1000), nzTpIcepk0o8(chr(0b101010 + 0o6) + '\x6f' + '\062' + '\x32' + chr(0b0 + 0o61), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\x31' + '\062' + '\064', 16408 - 16400), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50) + chr(0b110101) + chr(1908 - 1860), ord("\x08")), nzTpIcepk0o8(chr(1219 - 1171) + chr(111) + chr(0b110001) + chr(841 - 788) + '\x36', 49892 - 49884), nzTpIcepk0o8(chr(0b110000) + chr(0b1110 + 0o141) + chr(2292 - 2243) + '\x35' + chr(0b10 + 0o61), 9777 - 9769), nzTpIcepk0o8(chr(404 - 356) + '\x6f' + '\061' + '\062' + chr(0b110100), 8), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(0b1101111) + chr(0b110010) + chr(0b110110) + '\066', 0b1000), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\157' + '\062' + chr(0b10100 + 0o34), 48082 - 48074), nzTpIcepk0o8(chr(2093 - 2045) + chr(111) + chr(0b100100 + 0o16) + chr(48) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(0b1101111) + chr(0b110010) + chr(560 - 510) + chr(0b110100), 45856 - 45848), nzTpIcepk0o8('\060' + chr(9450 - 9339) + chr(49) + chr(0b100110 + 0o16) + chr(54), 0o10), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b1101000 + 0o7) + chr(50) + chr(0b110111) + '\064', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1011000 + 0o27) + chr(0b100110 + 0o15) + chr(0b1000 + 0o53), 1592 - 1584), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(145 - 96) + chr(0b110111) + chr(0b1100 + 0o53), 22423 - 22415), nzTpIcepk0o8('\x30' + chr(111) + '\x33' + chr(1667 - 1613) + '\x30', 20185 - 20177), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + '\067' + '\062', 0b1000), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(111) + chr(55 - 5) + '\061' + chr(0b10100 + 0o37), 4670 - 4662), nzTpIcepk0o8(chr(828 - 780) + '\157' + chr(2057 - 2007) + '\061' + '\062', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + chr(53), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(513 - 402) + chr(53) + chr(0b110000), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x12'), chr(3888 - 3788) + chr(0b1100101) + chr(99) + '\157' + chr(0b1100100) + chr(10092 - 9991))(chr(0b1100010 + 0o23) + '\164' + chr(0b1100110) + '\x2d' + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def uP8y7GdQd4HB(J06siaksrbfJ, i9cIicSKupwD): J06siaksrbfJ = nDF4gVNx0u9Q.asarray(J06siaksrbfJ) i9cIicSKupwD = nDF4gVNx0u9Q.asarray(i9cIicSKupwD) HmzFvPCBR3m5 = J06siaksrbfJ[nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b1101111) + '\x31', 8955 - 8947)] - J06siaksrbfJ[nzTpIcepk0o8(chr(1683 - 1635) + '\157' + chr(1082 - 1034), 0o10)] GpVwEzHnhx0a = J06siaksrbfJ[nzTpIcepk0o8('\060' + chr(0b1101111) + chr(50), 37247 - 37239)] - J06siaksrbfJ[nzTpIcepk0o8(chr(48) + chr(0b111011 + 0o64) + '\060', 8)] oVpVmq4alZLt = J06siaksrbfJ[nzTpIcepk0o8(chr(48) + chr(111) + chr(548 - 498), 8)] - J06siaksrbfJ[nzTpIcepk0o8(chr(1956 - 1908) + chr(111) + chr(0b110001), 8)] XXT0nlRZsV4Y = nDF4gVNx0u9Q.asarray([x4R_nQVBRuYe - jBqyT0YcwUaS for (x4R_nQVBRuYe, jBqyT0YcwUaS) in TxMFWa_Xzviv(i9cIicSKupwD, J06siaksrbfJ[nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b1101111) + chr(0b110000), 8)])]) LCrwg7lcbmU9 = nDF4gVNx0u9Q.sqrt((XXT0nlRZsV4Y ** nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(0b1101111) + chr(50), 8)).oclC8DLjA_lV(nzTpIcepk0o8(chr(220 - 172) + '\x6f' + '\060', 8))) FMmD16A2grCG = nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061', 8) - LCrwg7lcbmU9.astype(TVUhqOt5_BbS) ZQD_k7DUYnCx = koYEIcf86yR7(HmzFvPCBR3m5, GpVwEzHnhx0a) h3Vc_4wxEbgd = koYEIcf86yR7(XXT0nlRZsV4Y + [hiHmYY3t9utz * FMmD16A2grCG for hiHmYY3t9utz in HmzFvPCBR3m5], HmzFvPCBR3m5) cNUl9zSYpt8X = nDF4gVNx0u9Q.TMleLVztqSLZ(h3Vc_4wxEbgd) Jlinc8B0kP7s = nDF4gVNx0u9Q.TMleLVztqSLZ(ZQD_k7DUYnCx - h3Vc_4wxEbgd) UPgDJ5bmMGkU = nDF4gVNx0u9Q.sqrt((oVpVmq4alZLt ** nzTpIcepk0o8(chr(48) + '\157' + chr(50), 8)).oclC8DLjA_lV(nzTpIcepk0o8('\x30' + chr(0b1001000 + 0o47) + '\x30', 8))) ckp_CDGnFsFr = koYEIcf86yR7(-HmzFvPCBR3m5, oVpVmq4alZLt) fQh26rw9TWVT = nDF4gVNx0u9Q.TMleLVztqSLZ(aQg01EfWg1cd.nMrXkRpTQ9Oo - ckp_CDGnFsFr - ZQD_k7DUYnCx) x7M519WS_m3M = nDF4gVNx0u9Q.TMleLVztqSLZ(ckp_CDGnFsFr) a2vuJMOBrLrT = UPgDJ5bmMGkU * x7M519WS_m3M * fQh26rw9TWVT / (x7M519WS_m3M * Jlinc8B0kP7s + fQh26rw9TWVT * cNUl9zSYpt8X) return roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b']\xb2e4\xe8\x89\x8d'), chr(1485 - 1385) + chr(101) + '\x63' + chr(111) + chr(100) + chr(0b1010110 + 0o17))(chr(117) + chr(12210 - 12094) + chr(0b101010 + 0o74) + chr(0b101101) + chr(56)))([h3Vc_4wxEbgd / ZQD_k7DUYnCx, LCrwg7lcbmU9 / a2vuJMOBrLrT])
noahbenson/neuropythy
neuropythy/geometry/util.py
triangle_unaddress
def triangle_unaddress(fx, tr): ''' triangle_unaddress(FX, tr) yields the point P, inside the reference triangle given by the (3 x d)-sized coordinate matrix FX, that is addressed by the address coordinate tr, which may either be a 2-d vector or a (2 x n)-sized matrix. ''' fx = np.asarray(fx) tr = np.asarray(tr) # the triangle vectors... ab = fx[1] - fx[0] ac = fx[2] - fx[0] bc = fx[2] - fx[1] return np.asarray([ax + tr[1]*(abx + tr[0]*bcx) for (ax, bcx, abx) in zip(fx[0], bc, ab)])
python
def triangle_unaddress(fx, tr): ''' triangle_unaddress(FX, tr) yields the point P, inside the reference triangle given by the (3 x d)-sized coordinate matrix FX, that is addressed by the address coordinate tr, which may either be a 2-d vector or a (2 x n)-sized matrix. ''' fx = np.asarray(fx) tr = np.asarray(tr) # the triangle vectors... ab = fx[1] - fx[0] ac = fx[2] - fx[0] bc = fx[2] - fx[1] return np.asarray([ax + tr[1]*(abx + tr[0]*bcx) for (ax, bcx, abx) in zip(fx[0], bc, ab)])
[ "def", "triangle_unaddress", "(", "fx", ",", "tr", ")", ":", "fx", "=", "np", ".", "asarray", "(", "fx", ")", "tr", "=", "np", ".", "asarray", "(", "tr", ")", "# the triangle vectors...", "ab", "=", "fx", "[", "1", "]", "-", "fx", "[", "0", "]", ...
triangle_unaddress(FX, tr) yields the point P, inside the reference triangle given by the (3 x d)-sized coordinate matrix FX, that is addressed by the address coordinate tr, which may either be a 2-d vector or a (2 x n)-sized matrix.
[ "triangle_unaddress", "(", "FX", "tr", ")", "yields", "the", "point", "P", "inside", "the", "reference", "triangle", "given", "by", "the", "(", "3", "x", "d", ")", "-", "sized", "coordinate", "matrix", "FX", "that", "is", "addressed", "by", "the", "addre...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/util.py#L540-L552
train
This function unaddresses a triangle given a 3x3 coordinate matrix FX and a 3x3 coordinate matrix tr.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q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,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(0b1011101 + 0o22) + chr(1666 - 1615) + chr(1606 - 1555) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(373 - 323) + '\063' + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(3401 - 3290) + chr(50) + chr(0b110110) + chr(0b10011 + 0o40), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + '\x37' + chr(1961 - 1906), 31014 - 31006), nzTpIcepk0o8(chr(0b110000) + chr(9508 - 9397) + chr(0b110011) + chr(0b110001) + chr(0b110111), 0o10), nzTpIcepk0o8('\x30' + chr(5972 - 5861) + chr(49) + chr(0b110000) + chr(0b110001), 41448 - 41440), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(3124 - 3013) + chr(887 - 838) + '\060' + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + chr(2702 - 2647) + chr(0b100 + 0o62), ord("\x08")), nzTpIcepk0o8(chr(192 - 144) + chr(11544 - 11433) + chr(51) + '\x34', 204 - 196), nzTpIcepk0o8(chr(0b110000) + '\157' + '\061' + chr(0b110111) + chr(905 - 855), 0b1000), nzTpIcepk0o8(chr(1861 - 1813) + '\x6f' + chr(1595 - 1546) + chr(55) + chr(51), 0b1000), nzTpIcepk0o8('\x30' + chr(0b10000 + 0o137) + '\x37' + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b1101111) + chr(0b1000 + 0o51) + chr(0b110011) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b10000 + 0o40) + '\x6f' + chr(50) + '\x35' + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(111) + chr(49) + chr(51), 0o10), nzTpIcepk0o8('\060' + chr(7166 - 7055) + chr(0b1111 + 0o44) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b1101111) + chr(0b110001) + '\x35' + chr(50), 0b1000), nzTpIcepk0o8('\060' + chr(738 - 627) + '\x33' + chr(52) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(11380 - 11269) + '\x31' + chr(0b11101 + 0o32) + '\061', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + '\061' + chr(0b11101 + 0o30), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + chr(48) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(1801 - 1753) + chr(0b1101111) + chr(0b100 + 0o55) + '\x37' + '\x32', 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + '\060' + chr(0b110100), 55696 - 55688), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x32' + chr(1597 - 1547), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(1478 - 1427) + chr(0b1000 + 0o51) + '\060', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + chr(0b110111) + chr(50), 8), nzTpIcepk0o8(chr(0b100000 + 0o20) + '\157' + '\061' + chr(0b11100 + 0o24) + '\062', 0o10), nzTpIcepk0o8(chr(48) + chr(6386 - 6275) + '\063' + chr(53) + chr(0b11011 + 0o31), ord("\x08")), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\157' + chr(2299 - 2250) + '\x30' + '\063', 8), nzTpIcepk0o8('\060' + '\x6f' + '\062' + chr(0b101110 + 0o4) + chr(0b101 + 0o62), 17134 - 17126), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31' + chr(0b100111 + 0o15) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b0 + 0o60) + '\157' + chr(0b110011) + '\x32' + chr(0b11101 + 0o31), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010 + 0o1) + '\061' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(127 - 79) + chr(0b1101111) + chr(0b110001) + '\x36' + chr(0b110110), 0o10), nzTpIcepk0o8('\x30' + chr(0b1100101 + 0o12) + chr(0b110001) + chr(0b110001) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101000 + 0o12) + '\x30' + chr(2195 - 2141), 0o10), nzTpIcepk0o8('\x30' + chr(0b10111 + 0o130) + chr(1771 - 1721) + '\x37' + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(737 - 684) + chr(51), 46013 - 46005), nzTpIcepk0o8(chr(1827 - 1779) + chr(5567 - 5456) + chr(0b100101 + 0o14) + chr(383 - 334) + chr(52), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11111 + 0o22) + chr(54) + chr(2047 - 1999), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\x6f' + '\x35' + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xf4'), '\x64' + chr(0b1100101) + chr(0b1001011 + 0o30) + '\x6f' + chr(0b100 + 0o140) + chr(101))('\x75' + chr(116) + chr(0b1100110) + chr(45) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def FRAZLIFhfPu0(J06siaksrbfJ, lKSl3irCMAog): J06siaksrbfJ = nDF4gVNx0u9Q.asarray(J06siaksrbfJ) lKSl3irCMAog = nDF4gVNx0u9Q.asarray(lKSl3irCMAog) HmzFvPCBR3m5 = J06siaksrbfJ[nzTpIcepk0o8('\x30' + chr(111) + '\061', ord("\x08"))] - J06siaksrbfJ[nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(0b1100110 + 0o11) + '\x30', 0b1000)] GpVwEzHnhx0a = J06siaksrbfJ[nzTpIcepk0o8('\060' + '\x6f' + chr(1492 - 1442), ord("\x08"))] - J06siaksrbfJ[nzTpIcepk0o8('\060' + chr(0b110001 + 0o76) + '\x30', 8)] oVpVmq4alZLt = J06siaksrbfJ[nzTpIcepk0o8(chr(48) + chr(0b1100 + 0o143) + chr(0b11100 + 0o26), 8)] - J06siaksrbfJ[nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49), 8)] return roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xbb\xe8\xd2\xcd\xbd 9'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(111) + '\144' + chr(3618 - 3517))(chr(0b1001011 + 0o52) + chr(116) + '\146' + chr(389 - 344) + chr(832 - 776)))([ZtB7KOLCW2Hk + lKSl3irCMAog[nzTpIcepk0o8(chr(0b101000 + 0o10) + '\x6f' + '\x31', 8)] * (Zu8c3OPDueWC + lKSl3irCMAog[nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(111) + chr(48), 8)] * r2IZX1FVc_42) for (ZtB7KOLCW2Hk, r2IZX1FVc_42, Zu8c3OPDueWC) in TxMFWa_Xzviv(J06siaksrbfJ[nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x30', 8)], oVpVmq4alZLt, HmzFvPCBR3m5)])
noahbenson/neuropythy
neuropythy/geometry/util.py
det4D
def det4D(m): ''' det4D(array) yields the determinate of the given matrix array, which may have more than 2 dimensions, in which case the later dimensions are multiplied and added point-wise. ''' # I just solved this in Mathematica, copy-pasted, and replaced the string '] m' with ']*m': # Mathematica code: Det@Table[m[i][j], {i, 0, 3}, {j, 0, 3}] return (m[0][3]*m[1][2]*m[2][1]*m[3][0] - m[0][2]*m[1][3]*m[2][1]*m[3][0] - m[0][3]*m[1][1]*m[2][2]*m[3][0] + m[0][1]*m[1][3]*m[2][2]*m[3][0] + m[0][2]*m[1][1]*m[2][3]*m[3][0] - m[0][1]*m[1][2]*m[2][3]*m[3][0] - m[0][3]*m[1][2]*m[2][0]*m[3][1] + m[0][2]*m[1][3]*m[2][0]*m[3][1] + m[0][3]*m[1][0]*m[2][2]*m[3][1] - m[0][0]*m[1][3]*m[2][2]*m[3][1] - m[0][2]*m[1][0]*m[2][3]*m[3][1] + m[0][0]*m[1][2]*m[2][3]*m[3][1] + m[0][3]*m[1][1]*m[2][0]*m[3][2] - m[0][1]*m[1][3]*m[2][0]*m[3][2] - m[0][3]*m[1][0]*m[2][1]*m[3][2] + m[0][0]*m[1][3]*m[2][1]*m[3][2] + m[0][1]*m[1][0]*m[2][3]*m[3][2] - m[0][0]*m[1][1]*m[2][3]*m[3][2] - m[0][2]*m[1][1]*m[2][0]*m[3][3] + m[0][1]*m[1][2]*m[2][0]*m[3][3] + m[0][2]*m[1][0]*m[2][1]*m[3][3] - m[0][0]*m[1][2]*m[2][1]*m[3][3] - m[0][1]*m[1][0]*m[2][2]*m[3][3] + m[0][0]*m[1][1]*m[2][2]*m[3][3])
python
def det4D(m): ''' det4D(array) yields the determinate of the given matrix array, which may have more than 2 dimensions, in which case the later dimensions are multiplied and added point-wise. ''' # I just solved this in Mathematica, copy-pasted, and replaced the string '] m' with ']*m': # Mathematica code: Det@Table[m[i][j], {i, 0, 3}, {j, 0, 3}] return (m[0][3]*m[1][2]*m[2][1]*m[3][0] - m[0][2]*m[1][3]*m[2][1]*m[3][0] - m[0][3]*m[1][1]*m[2][2]*m[3][0] + m[0][1]*m[1][3]*m[2][2]*m[3][0] + m[0][2]*m[1][1]*m[2][3]*m[3][0] - m[0][1]*m[1][2]*m[2][3]*m[3][0] - m[0][3]*m[1][2]*m[2][0]*m[3][1] + m[0][2]*m[1][3]*m[2][0]*m[3][1] + m[0][3]*m[1][0]*m[2][2]*m[3][1] - m[0][0]*m[1][3]*m[2][2]*m[3][1] - m[0][2]*m[1][0]*m[2][3]*m[3][1] + m[0][0]*m[1][2]*m[2][3]*m[3][1] + m[0][3]*m[1][1]*m[2][0]*m[3][2] - m[0][1]*m[1][3]*m[2][0]*m[3][2] - m[0][3]*m[1][0]*m[2][1]*m[3][2] + m[0][0]*m[1][3]*m[2][1]*m[3][2] + m[0][1]*m[1][0]*m[2][3]*m[3][2] - m[0][0]*m[1][1]*m[2][3]*m[3][2] - m[0][2]*m[1][1]*m[2][0]*m[3][3] + m[0][1]*m[1][2]*m[2][0]*m[3][3] + m[0][2]*m[1][0]*m[2][1]*m[3][3] - m[0][0]*m[1][2]*m[2][1]*m[3][3] - m[0][1]*m[1][0]*m[2][2]*m[3][3] + m[0][0]*m[1][1]*m[2][2]*m[3][3])
[ "def", "det4D", "(", "m", ")", ":", "# I just solved this in Mathematica, copy-pasted, and replaced the string '] m' with ']*m':", "# Mathematica code: Det@Table[m[i][j], {i, 0, 3}, {j, 0, 3}]", "return", "(", "m", "[", "0", "]", "[", "3", "]", "*", "m", "[", "1", "]", "[...
det4D(array) yields the determinate of the given matrix array, which may have more than 2 dimensions, in which case the later dimensions are multiplied and added point-wise.
[ "det4D", "(", "array", ")", "yields", "the", "determinate", "of", "the", "given", "matrix", "array", "which", "may", "have", "more", "than", "2", "dimensions", "in", "which", "case", "the", "later", "dimensions", "are", "multiplied", "and", "added", "point",...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/util.py#L614-L632
train
Returns the determinate of the given matrix array which may have more than 2 dimensions and added point - wise.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZ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,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + chr(53) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1000110 + 0o51) + chr(50) + chr(0b110001) + '\066', 0b1000), nzTpIcepk0o8(chr(217 - 169) + chr(9851 - 9740) + chr(2333 - 2283) + chr(55), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b11011 + 0o27) + chr(0b110001) + chr(1443 - 1390), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b100 + 0o57) + chr(49) + chr(0b110101), 28484 - 28476), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + '\061' + chr(0b1001 + 0o47), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b0 + 0o61) + '\065' + chr(0b110001), 54902 - 54894), nzTpIcepk0o8('\x30' + chr(5481 - 5370) + '\x33' + chr(0b0 + 0o65) + '\x33', 25287 - 25279), nzTpIcepk0o8(chr(153 - 105) + '\x6f' + chr(0b110001) + chr(0b110000) + '\060', 39239 - 39231), nzTpIcepk0o8('\060' + '\157' + '\062' + chr(0b110010) + '\060', 51862 - 51854), nzTpIcepk0o8('\x30' + chr(0b100100 + 0o113) + chr(0b110010) + chr(0b110101) + '\064', 0o10), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(1640 - 1529) + '\062' + chr(49) + '\061', 0b1000), nzTpIcepk0o8('\x30' + chr(0b100001 + 0o116) + '\x36' + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + '\060' + chr(1148 - 1095), 41471 - 41463), nzTpIcepk0o8(chr(1434 - 1386) + '\x6f' + chr(0b110011) + '\x33' + chr(1916 - 1866), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + chr(0b110001 + 0o1) + chr(1511 - 1456), ord("\x08")), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\157' + chr(999 - 948) + chr(0b110001), 3472 - 3464), nzTpIcepk0o8(chr(1128 - 1080) + chr(0b1101111) + '\x33' + chr(0b110111) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + chr(0b110011) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(12145 - 12034) + chr(0b110000 + 0o1) + '\x35' + chr(0b100100 + 0o17), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b100100 + 0o113) + chr(0b10111 + 0o33) + chr(49), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + '\062', 0o10), nzTpIcepk0o8('\060' + chr(8808 - 8697) + chr(0b11 + 0o60) + chr(0b11101 + 0o25) + '\066', 9394 - 9386), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(191 - 141) + chr(1064 - 1014) + '\x33', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1011110 + 0o21) + '\062' + chr(0b110010) + chr(1106 - 1058), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + chr(0b110 + 0o53) + chr(0b110110), 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + '\x33' + '\x30', 57999 - 57991), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + chr(0b110100) + chr(0b110010), 6728 - 6720), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(10704 - 10593) + chr(0b110011 + 0o0) + chr(0b1011 + 0o53) + chr(432 - 382), 35402 - 35394), nzTpIcepk0o8(chr(48) + chr(0b10110 + 0o131) + chr(0b110101 + 0o0) + '\065', ord("\x08")), nzTpIcepk0o8(chr(344 - 296) + '\157' + chr(468 - 417) + chr(53) + chr(0b10010 + 0o36), ord("\x08")), nzTpIcepk0o8(chr(2054 - 2006) + '\157' + '\x36' + chr(51), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + chr(0b110110) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\x6f' + chr(0b1 + 0o60) + '\x30' + chr(635 - 584), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101011 + 0o4) + chr(0b101000 + 0o13) + '\x37' + '\064', 8), nzTpIcepk0o8('\060' + '\x6f' + '\x35' + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + chr(0b110111) + chr(0b11111 + 0o22), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + '\x31' + chr(538 - 489), 23898 - 23890), nzTpIcepk0o8('\060' + '\x6f' + chr(0b101 + 0o57) + chr(0b1001 + 0o54), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49) + chr(0b110001) + chr(0b110010), 61339 - 61331)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\157' + '\065' + chr(894 - 846), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x81'), chr(0b1011000 + 0o14) + '\145' + chr(0b10011 + 0o120) + chr(0b1101111) + chr(100) + chr(0b1111 + 0o126))(chr(117) + '\x74' + chr(0b1100110 + 0o0) + '\055' + chr(0b110110 + 0o2)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def LY_Vp8pEiXI8(tF75nqoNENFL): return tF75nqoNENFL[nzTpIcepk0o8(chr(0b110000) + chr(9770 - 9659) + '\060', ord("\x08"))][nzTpIcepk0o8(chr(0b100100 + 0o14) + '\157' + chr(51), 0o10)] * tF75nqoNENFL[nzTpIcepk0o8('\060' + '\157' + '\061', 0b1000)][nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b101111 + 0o3), 0b1000)] * tF75nqoNENFL[nzTpIcepk0o8(chr(1041 - 993) + '\x6f' + '\x32', 8)][nzTpIcepk0o8('\x30' + chr(10987 - 10876) + '\061', 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(1999 - 1951) + chr(0b100101 + 0o112) + chr(0b10110 + 0o35), 8)][nzTpIcepk0o8('\060' + chr(111) + '\060', 8)] - tF75nqoNENFL[nzTpIcepk0o8(chr(261 - 213) + chr(0b1100010 + 0o15) + chr(0b110000), 8)][nzTpIcepk0o8(chr(0b110000) + chr(0b1010001 + 0o36) + chr(0b110010), 8)] * tF75nqoNENFL[nzTpIcepk0o8('\060' + chr(0b110101 + 0o72) + chr(2045 - 1996), 8)][nzTpIcepk0o8('\x30' + '\157' + chr(859 - 808), 8)] * tF75nqoNENFL[nzTpIcepk0o8('\060' + chr(111) + '\x32', 8)][nzTpIcepk0o8(chr(1871 - 1823) + '\x6f' + chr(0b11 + 0o56), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(2005 - 1957) + chr(0b1101111) + chr(51), 8)][nzTpIcepk0o8(chr(0b111 + 0o51) + chr(0b1101111) + '\060', 8)] - tF75nqoNENFL[nzTpIcepk0o8(chr(48) + '\157' + chr(0b110000), 8)][nzTpIcepk0o8(chr(539 - 491) + chr(111) + chr(51), 8)] * tF75nqoNENFL[nzTpIcepk0o8('\x30' + chr(0b111100 + 0o63) + chr(338 - 289), 8)][nzTpIcepk0o8(chr(760 - 712) + '\157' + '\061', 8)] * tF75nqoNENFL[nzTpIcepk0o8('\060' + '\x6f' + chr(532 - 482), 8)][nzTpIcepk0o8(chr(48) + chr(111) + '\062', 8)] * tF75nqoNENFL[nzTpIcepk0o8('\060' + chr(4769 - 4658) + chr(0b101101 + 0o6), 8)][nzTpIcepk0o8('\x30' + chr(0b110111 + 0o70) + chr(0b110000), 8)] + tF75nqoNENFL[nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(48), 8)][nzTpIcepk0o8('\060' + chr(111) + chr(1686 - 1637), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(1766 - 1718) + '\157' + chr(0b10110 + 0o33), 8)][nzTpIcepk0o8(chr(0b110000) + chr(9688 - 9577) + chr(51), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(0b1000 + 0o50) + '\x6f' + chr(2413 - 2363), 8)][nzTpIcepk0o8('\060' + chr(0b1101111) + chr(409 - 359), 8)] * tF75nqoNENFL[nzTpIcepk0o8('\x30' + chr(2882 - 2771) + '\x33', 8)][nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b100010 + 0o115) + chr(48), 8)] + tF75nqoNENFL[nzTpIcepk0o8('\060' + '\x6f' + '\x30', 8)][nzTpIcepk0o8('\060' + chr(0b11010 + 0o125) + chr(0b11100 + 0o26), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001), 8)][nzTpIcepk0o8('\060' + chr(0b1101111) + chr(387 - 338), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32', 8)][nzTpIcepk0o8(chr(48) + chr(0b10 + 0o155) + chr(1482 - 1431), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(2014 - 1966) + chr(0b1101111) + '\063', 8)][nzTpIcepk0o8(chr(48) + chr(12022 - 11911) + chr(0b110000), 8)] - tF75nqoNENFL[nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b1101111) + chr(48), 8)][nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2182 - 2133), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(0b11101 + 0o23) + '\157' + chr(0b100 + 0o55), 8)][nzTpIcepk0o8(chr(0b10000 + 0o40) + '\157' + chr(2304 - 2254), 8)] * tF75nqoNENFL[nzTpIcepk0o8('\x30' + chr(1090 - 979) + chr(0b110010), 8)][nzTpIcepk0o8('\060' + chr(0b110 + 0o151) + chr(0b11101 + 0o26), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(2362 - 2251) + chr(51), 8)][nzTpIcepk0o8('\x30' + chr(111) + chr(0b110000), 8)] - tF75nqoNENFL[nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110000), 8)][nzTpIcepk0o8(chr(48) + chr(0b1010100 + 0o33) + '\063', 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49), 8)][nzTpIcepk0o8(chr(48) + chr(3530 - 3419) + '\x32', 8)] * tF75nqoNENFL[nzTpIcepk0o8('\060' + chr(111) + chr(50), 8)][nzTpIcepk0o8(chr(324 - 276) + '\x6f' + chr(0b110000), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(48) + '\157' + chr(510 - 459), 8)][nzTpIcepk0o8('\060' + chr(0b1010011 + 0o34) + chr(0b100000 + 0o21), 8)] + tF75nqoNENFL[nzTpIcepk0o8(chr(48) + chr(111) + '\060', 8)][nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10001 + 0o41), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(1781 - 1733) + chr(7454 - 7343) + chr(0b11110 + 0o23), 8)][nzTpIcepk0o8('\060' + chr(0b1101111) + chr(51), 8)] * tF75nqoNENFL[nzTpIcepk0o8('\x30' + chr(9502 - 9391) + chr(50), 8)][nzTpIcepk0o8('\060' + '\157' + '\060', 8)] * tF75nqoNENFL[nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110 + 0o55), 8)][nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(4245 - 4134) + chr(0b110001), 8)] + tF75nqoNENFL[nzTpIcepk0o8('\060' + chr(11848 - 11737) + chr(0b110000), 8)][nzTpIcepk0o8('\x30' + chr(0b1011000 + 0o27) + chr(0b110011), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061', 8)][nzTpIcepk0o8(chr(48) + chr(11565 - 11454) + chr(48), 8)] * tF75nqoNENFL[nzTpIcepk0o8('\x30' + chr(0b1101010 + 0o5) + chr(925 - 875), 8)][nzTpIcepk0o8(chr(1835 - 1787) + chr(0b1101111) + chr(0b110010), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1101001 + 0o6) + chr(0b100100 + 0o17), 8)][nzTpIcepk0o8('\060' + chr(0b1011100 + 0o23) + chr(49), 8)] - tF75nqoNENFL[nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b100111 + 0o110) + '\x30', 8)][nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(4255 - 4144) + chr(432 - 384), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(111) + chr(49), 8)][nzTpIcepk0o8(chr(810 - 762) + chr(0b1011110 + 0o21) + '\063', 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(48) + '\x6f' + chr(50), 8)][nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(111) + '\x32', 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(1325 - 1277) + '\x6f' + '\x33', 8)][nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001), 8)] - tF75nqoNENFL[nzTpIcepk0o8(chr(1988 - 1940) + '\x6f' + chr(1027 - 979), 8)][nzTpIcepk0o8('\x30' + chr(0b1011011 + 0o24) + chr(2012 - 1962), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001), 8)][nzTpIcepk0o8(chr(48) + chr(0b1010101 + 0o32) + chr(0b110000), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(2296 - 2248) + '\157' + chr(50), 8)][nzTpIcepk0o8(chr(1639 - 1591) + chr(111) + '\x33', 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(0b11010 + 0o26) + '\157' + chr(0b110011), 8)][nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1292 - 1243), 8)] + tF75nqoNENFL[nzTpIcepk0o8('\060' + '\x6f' + chr(0b10010 + 0o36), 8)][nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10101 + 0o33), 8)] * tF75nqoNENFL[nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061', 8)][nzTpIcepk0o8(chr(974 - 926) + chr(111) + chr(343 - 293), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(48) + '\157' + chr(50), 8)][nzTpIcepk0o8('\x30' + chr(111) + '\063', 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(0b1101 + 0o43) + '\x6f' + chr(236 - 185), 8)][nzTpIcepk0o8(chr(48) + '\157' + chr(657 - 608), 8)] + tF75nqoNENFL[nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(0b1 + 0o156) + chr(1532 - 1484), 8)][nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(0b110000) + chr(9945 - 9834) + chr(0b110001), 8)][nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(48) + chr(1773 - 1662) + chr(50), 8)][nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(9022 - 8911) + chr(0b11000 + 0o30), 8)] * tF75nqoNENFL[nzTpIcepk0o8('\x30' + chr(0b1101111) + '\063', 8)][nzTpIcepk0o8(chr(0b100 + 0o54) + '\x6f' + chr(0b101001 + 0o11), 8)] - tF75nqoNENFL[nzTpIcepk0o8('\060' + '\x6f' + chr(48), 8)][nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(300 - 252) + '\x6f' + chr(1173 - 1124), 8)][nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011), 8)] * tF75nqoNENFL[nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50), 8)][nzTpIcepk0o8(chr(0b101001 + 0o7) + '\157' + '\060', 8)] * tF75nqoNENFL[nzTpIcepk0o8('\x30' + '\x6f' + chr(1088 - 1037), 8)][nzTpIcepk0o8(chr(48) + chr(6092 - 5981) + chr(0b11101 + 0o25), 8)] - tF75nqoNENFL[nzTpIcepk0o8(chr(0b110000) + '\157' + '\x30', 8)][nzTpIcepk0o8(chr(48) + chr(111) + chr(0b1100 + 0o47), 8)] * tF75nqoNENFL[nzTpIcepk0o8('\060' + '\x6f' + chr(49), 8)][nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1640 - 1592), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(845 - 797) + '\157' + '\062', 8)][nzTpIcepk0o8('\060' + chr(111) + '\061', 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b1101101 + 0o2) + '\063', 8)][nzTpIcepk0o8('\x30' + chr(111) + chr(2449 - 2399), 8)] + tF75nqoNENFL[nzTpIcepk0o8(chr(0b110000) + '\157' + '\060', 8)][nzTpIcepk0o8(chr(0b101100 + 0o4) + '\157' + chr(0b100011 + 0o15), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(48) + '\157' + chr(0b11000 + 0o31), 8)][nzTpIcepk0o8(chr(2211 - 2163) + chr(0b1101111) + chr(0b110011), 8)] * tF75nqoNENFL[nzTpIcepk0o8('\x30' + '\x6f' + chr(50), 8)][nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061', 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(48) + chr(0b1000010 + 0o55) + '\063', 8)][nzTpIcepk0o8('\060' + '\x6f' + '\x32', 8)] + tF75nqoNENFL[nzTpIcepk0o8('\060' + chr(111) + chr(0b100111 + 0o11), 8)][nzTpIcepk0o8(chr(690 - 642) + chr(0b1101111) + '\x31', 8)] * tF75nqoNENFL[nzTpIcepk0o8('\060' + '\x6f' + '\061', 8)][nzTpIcepk0o8(chr(0b110000) + '\157' + chr(668 - 620), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32', 8)][nzTpIcepk0o8('\060' + '\157' + chr(0b110011), 8)] * tF75nqoNENFL[nzTpIcepk0o8('\x30' + '\x6f' + chr(1105 - 1054), 8)][nzTpIcepk0o8(chr(0b10101 + 0o33) + '\x6f' + chr(1327 - 1277), 8)] - tF75nqoNENFL[nzTpIcepk0o8(chr(231 - 183) + '\157' + '\x30', 8)][nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(404 - 356), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(843 - 795) + chr(0b110011 + 0o74) + '\061', 8)][nzTpIcepk0o8(chr(0b10110 + 0o32) + '\157' + chr(49), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32', 8)][nzTpIcepk0o8('\060' + chr(0b1001100 + 0o43) + '\x33', 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(48) + chr(6298 - 6187) + '\063', 8)][nzTpIcepk0o8(chr(1696 - 1648) + '\157' + chr(0b11100 + 0o26), 8)] - tF75nqoNENFL[nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1100001 + 0o16) + chr(1424 - 1376), 8)][nzTpIcepk0o8('\060' + chr(2704 - 2593) + chr(50), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(412 - 364) + chr(0b110 + 0o151) + chr(0b110001), 8)][nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(1696 - 1648) + chr(0b11111 + 0o120) + chr(0b1111 + 0o43), 8)][nzTpIcepk0o8('\x30' + '\157' + chr(1798 - 1750), 8)] * tF75nqoNENFL[nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011), 8)][nzTpIcepk0o8(chr(0b110000) + '\157' + chr(297 - 246), 8)] + tF75nqoNENFL[nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(111) + chr(1494 - 1446), 8)][nzTpIcepk0o8('\x30' + '\x6f' + '\x31', 8)] * tF75nqoNENFL[nzTpIcepk0o8('\060' + '\157' + chr(0b110001), 8)][nzTpIcepk0o8(chr(873 - 825) + chr(111) + chr(0b110010), 8)] * tF75nqoNENFL[nzTpIcepk0o8('\x30' + '\157' + '\062', 8)][nzTpIcepk0o8(chr(1784 - 1736) + chr(111) + '\060', 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(111) + chr(0b110011), 8)][nzTpIcepk0o8(chr(0b111 + 0o51) + '\157' + '\x33', 8)] + tF75nqoNENFL[nzTpIcepk0o8(chr(0b110000) + chr(0b100011 + 0o114) + chr(48), 8)][nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b100101 + 0o15), 8)] * tF75nqoNENFL[nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1399 - 1350), 8)][nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(0b1101111) + chr(48), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(48) + chr(0b1001100 + 0o43) + chr(2019 - 1969), 8)][nzTpIcepk0o8(chr(48) + chr(8503 - 8392) + chr(0b110001), 8)] * tF75nqoNENFL[nzTpIcepk0o8('\x30' + '\157' + '\063', 8)][nzTpIcepk0o8(chr(932 - 884) + '\157' + '\x33', 8)] - tF75nqoNENFL[nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110000), 8)][nzTpIcepk0o8(chr(1450 - 1402) + chr(111) + chr(0b1001 + 0o47), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(0b1010 + 0o46) + '\x6f' + chr(0b1011 + 0o46), 8)][nzTpIcepk0o8(chr(48) + chr(7185 - 7074) + chr(50), 8)] * tF75nqoNENFL[nzTpIcepk0o8('\060' + chr(111) + chr(1135 - 1085), 8)][nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49), 8)] * tF75nqoNENFL[nzTpIcepk0o8('\x30' + chr(3569 - 3458) + chr(817 - 766), 8)][nzTpIcepk0o8(chr(0b11 + 0o55) + '\x6f' + chr(0b10111 + 0o34), 8)] - tF75nqoNENFL[nzTpIcepk0o8(chr(48) + chr(111) + chr(0b10101 + 0o33), 8)][nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001), 8)] * tF75nqoNENFL[nzTpIcepk0o8('\060' + '\x6f' + chr(1886 - 1837), 8)][nzTpIcepk0o8('\060' + chr(111) + chr(0b110000), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(297 - 249) + '\157' + '\062', 8)][nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(0b0 + 0o60) + chr(1345 - 1234) + chr(461 - 410), 8)][nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51), 8)] + tF75nqoNENFL[nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(133 - 85), 8)][nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b10010 + 0o36), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061', 8)][nzTpIcepk0o8(chr(48) + chr(0b1100101 + 0o12) + chr(2107 - 2058), 8)] * tF75nqoNENFL[nzTpIcepk0o8('\060' + '\157' + chr(0b110010), 8)][nzTpIcepk0o8('\060' + chr(8408 - 8297) + chr(0b110010), 8)] * tF75nqoNENFL[nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x33', 8)][nzTpIcepk0o8('\060' + chr(0b1101111) + chr(51), 8)]
noahbenson/neuropythy
neuropythy/geometry/util.py
det_4x3
def det_4x3(a,b,c,d): ''' det_4x3(a,b,c,d) yields the determinate of the matrix formed the given rows, which may have more than 1 dimension, in which case the later dimensions are multiplied and added point-wise. The point's must be 3D points; the matrix is given a fourth column of 1s and the resulting determinant is of this matrix. ''' # I just solved this in Mathematica, copy-pasted, and replaced the string '] m' with ']*m': # Mathematica code: Det@Table[If[j == 3, 1, i[j]], {i, {a, b, c, d}}, {j, 0, 3}] return (a[1]*b[2]*c[0] + a[2]*b[0]*c[1] - a[2]*b[1]*c[0] - a[0]*b[2]*c[1] - a[1]*b[0]*c[2] + a[0]*b[1]*c[2] + a[2]*b[1]*d[0] - a[1]*b[2]*d[0] - a[2]*c[1]*d[0] + b[2]*c[1]*d[0] + a[1]*c[2]*d[0] - b[1]*c[2]*d[0] - a[2]*b[0]*d[1] + a[0]*b[2]*d[1] + a[2]*c[0]*d[1] - b[2]*c[0]*d[1] - a[0]*c[2]*d[1] + b[0]*c[2]*d[1] + a[1]*b[0]*d[2] - a[0]*b[1]*d[2] - a[1]*c[0]*d[2] + b[1]*c[0]*d[2] + a[0]*c[1]*d[2] - b[0]*c[1]*d[2])
python
def det_4x3(a,b,c,d): ''' det_4x3(a,b,c,d) yields the determinate of the matrix formed the given rows, which may have more than 1 dimension, in which case the later dimensions are multiplied and added point-wise. The point's must be 3D points; the matrix is given a fourth column of 1s and the resulting determinant is of this matrix. ''' # I just solved this in Mathematica, copy-pasted, and replaced the string '] m' with ']*m': # Mathematica code: Det@Table[If[j == 3, 1, i[j]], {i, {a, b, c, d}}, {j, 0, 3}] return (a[1]*b[2]*c[0] + a[2]*b[0]*c[1] - a[2]*b[1]*c[0] - a[0]*b[2]*c[1] - a[1]*b[0]*c[2] + a[0]*b[1]*c[2] + a[2]*b[1]*d[0] - a[1]*b[2]*d[0] - a[2]*c[1]*d[0] + b[2]*c[1]*d[0] + a[1]*c[2]*d[0] - b[1]*c[2]*d[0] - a[2]*b[0]*d[1] + a[0]*b[2]*d[1] + a[2]*c[0]*d[1] - b[2]*c[0]*d[1] - a[0]*c[2]*d[1] + b[0]*c[2]*d[1] + a[1]*b[0]*d[2] - a[0]*b[1]*d[2] - a[1]*c[0]*d[2] + b[1]*c[0]*d[2] + a[0]*c[1]*d[2] - b[0]*c[1]*d[2])
[ "def", "det_4x3", "(", "a", ",", "b", ",", "c", ",", "d", ")", ":", "# I just solved this in Mathematica, copy-pasted, and replaced the string '] m' with ']*m':", "# Mathematica code: Det@Table[If[j == 3, 1, i[j]], {i, {a, b, c, d}}, {j, 0, 3}]", "return", "(", "a", "[", "1", "...
det_4x3(a,b,c,d) yields the determinate of the matrix formed the given rows, which may have more than 1 dimension, in which case the later dimensions are multiplied and added point-wise. The point's must be 3D points; the matrix is given a fourth column of 1s and the resulting determinant is of this matrix.
[ "det_4x3", "(", "a", "b", "c", "d", ")", "yields", "the", "determinate", "of", "the", "matrix", "formed", "the", "given", "rows", "which", "may", "have", "more", "than", "1", "dimension", "in", "which", "case", "the", "later", "dimensions", "are", "multi...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/util.py#L633-L647
train
This function is used to compute the determinate of the matrix formed by a 4x3 transformation.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahX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zk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(5375 - 5264) + chr(0b110011) + '\060' + chr(0b110101), 16535 - 16527), nzTpIcepk0o8(chr(0b110000) + chr(1079 - 968) + '\x36' + chr(0b110001), 28357 - 28349), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(4772 - 4661) + chr(0b100101 + 0o16) + chr(0b110000) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b11 + 0o55) + '\x6f' + chr(0b10110 + 0o34) + chr(55) + chr(2715 - 2660), 24434 - 24426), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(772 - 723) + chr(503 - 451) + chr(53), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + '\067' + '\x33', 0o10), nzTpIcepk0o8('\x30' + chr(7107 - 6996) + chr(0b110010 + 0o1) + '\x30', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(760 - 711) + '\067' + chr(0b110011), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + chr(1629 - 1581) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(942 - 894) + chr(111) + chr(49) + '\064' + chr(51), ord("\x08")), nzTpIcepk0o8('\060' + chr(9129 - 9018) + chr(152 - 101) + '\x35' + chr(1725 - 1671), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\063' + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(2368 - 2257) + chr(0b110001) + '\x30' + '\x32', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(0b110101) + '\065', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(54) + '\061', 8), nzTpIcepk0o8('\060' + '\x6f' + chr(515 - 464) + chr(52) + chr(1033 - 980), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + '\x37' + chr(734 - 686), 0b1000), nzTpIcepk0o8(chr(1299 - 1251) + '\157' + '\063' + chr(0b110101) + '\x35', 0b1000), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b10001 + 0o136) + chr(369 - 320) + '\x32' + chr(51), 45120 - 45112), nzTpIcepk0o8('\060' + '\x6f' + chr(1036 - 984) + chr(2425 - 2372), 6178 - 6170), nzTpIcepk0o8(chr(48) + '\157' + '\x32' + '\x33' + chr(1913 - 1865), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x37' + '\060', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(891 - 840) + '\066' + chr(0b101111 + 0o7), 0o10), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b1101111) + chr(1356 - 1307) + chr(0b100000 + 0o26) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b110 + 0o52) + '\x6f' + chr(0b100001 + 0o20) + '\065' + '\066', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(10177 - 10066) + '\062' + chr(52) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b101010 + 0o6) + '\157' + chr(0b110000 + 0o1) + chr(471 - 417) + '\x34', 0b1000), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b1101111) + chr(49) + chr(50) + '\x32', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(7896 - 7785) + chr(0b110010) + chr(2449 - 2398) + chr(0b110110), 29835 - 29827), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + '\x37' + chr(0b1010 + 0o55), 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + chr(0b101011 + 0o12) + chr(1873 - 1820), 0b1000), nzTpIcepk0o8(chr(48) + chr(9284 - 9173) + chr(0b110111) + chr(2009 - 1958), 17244 - 17236), nzTpIcepk0o8(chr(865 - 817) + '\x6f' + chr(0b11000 + 0o31) + '\x37' + chr(2045 - 1993), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b11010 + 0o125) + '\x32' + chr(48) + '\x31', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(2187 - 2136) + chr(48) + '\062', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b0 + 0o61) + '\x37' + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(837 - 726) + '\x33' + '\x33', 0b1000), nzTpIcepk0o8(chr(1319 - 1271) + '\157' + chr(0b100100 + 0o16) + chr(0b110101) + '\x35', 8), nzTpIcepk0o8(chr(48) + chr(8871 - 8760) + chr(50) + chr(0b110101) + '\x31', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1500 - 1452) + chr(111) + '\x35' + chr(48), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xeb'), chr(100) + chr(101) + chr(0b1100011) + '\x6f' + chr(0b10110 + 0o116) + chr(101))('\165' + chr(116) + chr(0b1100000 + 0o6) + chr(0b101101) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def FwsT62ATEuZT(AQ9ceR9AaoT1, xFDEVQn5qSdh, teUmM7cKWZUa, vPPlOXQgR3SM): return AQ9ceR9AaoT1[nzTpIcepk0o8(chr(48) + '\157' + chr(882 - 833), 63020 - 63012)] * xFDEVQn5qSdh[nzTpIcepk0o8(chr(0b110000) + chr(8065 - 7954) + '\x32', 0o10)] * teUmM7cKWZUa[nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(111) + chr(48), 8103 - 8095)] + AQ9ceR9AaoT1[nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50), 8)] * xFDEVQn5qSdh[nzTpIcepk0o8('\x30' + chr(0b100 + 0o153) + chr(48), 8)] * teUmM7cKWZUa[nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b100010 + 0o115) + chr(49), 8)] - AQ9ceR9AaoT1[nzTpIcepk0o8('\060' + chr(111) + chr(0b1110 + 0o44), 8)] * xFDEVQn5qSdh[nzTpIcepk0o8(chr(486 - 438) + '\x6f' + chr(0b110001), 8)] * teUmM7cKWZUa[nzTpIcepk0o8('\x30' + '\157' + chr(0b101011 + 0o5), 8)] - AQ9ceR9AaoT1[nzTpIcepk0o8(chr(817 - 769) + '\157' + chr(48), 8)] * xFDEVQn5qSdh[nzTpIcepk0o8(chr(48) + '\157' + '\x32', 8)] * teUmM7cKWZUa[nzTpIcepk0o8(chr(341 - 293) + chr(0b1101111) + chr(49), 8)] - AQ9ceR9AaoT1[nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49), 8)] * xFDEVQn5qSdh[nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1483 - 1435), 8)] * teUmM7cKWZUa[nzTpIcepk0o8(chr(48) + chr(111) + '\x32', 8)] + AQ9ceR9AaoT1[nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110000), 8)] * xFDEVQn5qSdh[nzTpIcepk0o8(chr(1602 - 1554) + '\157' + chr(404 - 355), 8)] * teUmM7cKWZUa[nzTpIcepk0o8('\x30' + chr(4842 - 4731) + chr(0b101101 + 0o5), 8)] + AQ9ceR9AaoT1[nzTpIcepk0o8(chr(0b110000) + chr(0b1100100 + 0o13) + chr(0b110010), 8)] * xFDEVQn5qSdh[nzTpIcepk0o8('\060' + '\157' + chr(1857 - 1808), 8)] * vPPlOXQgR3SM[nzTpIcepk0o8(chr(250 - 202) + '\157' + '\x30', 8)] - AQ9ceR9AaoT1[nzTpIcepk0o8(chr(48) + chr(111) + chr(0b11001 + 0o30), 8)] * xFDEVQn5qSdh[nzTpIcepk0o8(chr(1622 - 1574) + '\x6f' + '\062', 8)] * vPPlOXQgR3SM[nzTpIcepk0o8(chr(0b110000) + chr(0b10101 + 0o132) + chr(48), 8)] - AQ9ceR9AaoT1[nzTpIcepk0o8(chr(48) + chr(111) + chr(0b10001 + 0o41), 8)] * teUmM7cKWZUa[nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061', 8)] * vPPlOXQgR3SM[nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x30', 8)] + xFDEVQn5qSdh[nzTpIcepk0o8('\060' + chr(8471 - 8360) + '\x32', 8)] * teUmM7cKWZUa[nzTpIcepk0o8('\060' + chr(0b100101 + 0o112) + '\061', 8)] * vPPlOXQgR3SM[nzTpIcepk0o8(chr(48) + '\x6f' + chr(872 - 824), 8)] + AQ9ceR9AaoT1[nzTpIcepk0o8(chr(2193 - 2145) + chr(11667 - 11556) + '\x31', 8)] * teUmM7cKWZUa[nzTpIcepk0o8(chr(0b110 + 0o52) + chr(111) + chr(0b110010), 8)] * vPPlOXQgR3SM[nzTpIcepk0o8('\x30' + chr(0b100110 + 0o111) + chr(429 - 381), 8)] - xFDEVQn5qSdh[nzTpIcepk0o8(chr(915 - 867) + '\157' + '\061', 8)] * teUmM7cKWZUa[nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(111) + '\062', 8)] * vPPlOXQgR3SM[nzTpIcepk0o8('\060' + '\x6f' + chr(0b101000 + 0o10), 8)] - AQ9ceR9AaoT1[nzTpIcepk0o8(chr(0b101000 + 0o10) + '\x6f' + chr(0b110010), 8)] * xFDEVQn5qSdh[nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(9639 - 9528) + chr(2200 - 2152), 8)] * vPPlOXQgR3SM[nzTpIcepk0o8(chr(48) + chr(111) + '\x31', 8)] + AQ9ceR9AaoT1[nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(111) + chr(0b110000), 8)] * xFDEVQn5qSdh[nzTpIcepk0o8('\x30' + '\157' + chr(0b110010), 8)] * vPPlOXQgR3SM[nzTpIcepk0o8(chr(0b111 + 0o51) + '\x6f' + chr(515 - 466), 8)] + AQ9ceR9AaoT1[nzTpIcepk0o8(chr(610 - 562) + chr(0b1101111) + '\062', 8)] * teUmM7cKWZUa[nzTpIcepk0o8(chr(1979 - 1931) + '\157' + chr(1867 - 1819), 8)] * vPPlOXQgR3SM[nzTpIcepk0o8('\060' + chr(5245 - 5134) + '\061', 8)] - xFDEVQn5qSdh[nzTpIcepk0o8(chr(48) + '\157' + chr(50), 8)] * teUmM7cKWZUa[nzTpIcepk0o8(chr(2158 - 2110) + '\x6f' + chr(48), 8)] * vPPlOXQgR3SM[nzTpIcepk0o8(chr(48) + '\x6f' + chr(49), 8)] - AQ9ceR9AaoT1[nzTpIcepk0o8('\060' + '\157' + '\060', 8)] * teUmM7cKWZUa[nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010), 8)] * vPPlOXQgR3SM[nzTpIcepk0o8('\x30' + '\x6f' + chr(1268 - 1219), 8)] + xFDEVQn5qSdh[nzTpIcepk0o8('\x30' + '\157' + chr(0b110000), 8)] * teUmM7cKWZUa[nzTpIcepk0o8('\060' + chr(111) + '\062', 8)] * vPPlOXQgR3SM[nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b11 + 0o154) + '\061', 8)] + AQ9ceR9AaoT1[nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(132 - 83), 8)] * xFDEVQn5qSdh[nzTpIcepk0o8('\060' + chr(111) + chr(0b101101 + 0o3), 8)] * vPPlOXQgR3SM[nzTpIcepk0o8('\060' + '\157' + chr(50), 8)] - AQ9ceR9AaoT1[nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110000), 8)] * xFDEVQn5qSdh[nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31', 8)] * vPPlOXQgR3SM[nzTpIcepk0o8(chr(1241 - 1193) + '\x6f' + chr(1122 - 1072), 8)] - AQ9ceR9AaoT1[nzTpIcepk0o8('\x30' + '\157' + chr(49), 8)] * teUmM7cKWZUa[nzTpIcepk0o8(chr(0b10110 + 0o32) + '\x6f' + chr(718 - 670), 8)] * vPPlOXQgR3SM[nzTpIcepk0o8(chr(0b110000) + chr(0b10011 + 0o134) + chr(50), 8)] + xFDEVQn5qSdh[nzTpIcepk0o8(chr(558 - 510) + chr(8622 - 8511) + chr(1333 - 1284), 8)] * teUmM7cKWZUa[nzTpIcepk0o8(chr(0b110000) + chr(0b10111 + 0o130) + '\x30', 8)] * vPPlOXQgR3SM[nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b1101010 + 0o5) + chr(0b11111 + 0o23), 8)] + AQ9ceR9AaoT1[nzTpIcepk0o8(chr(1187 - 1139) + chr(0b1000011 + 0o54) + chr(0b11010 + 0o26), 8)] * teUmM7cKWZUa[nzTpIcepk0o8(chr(48) + chr(0b10 + 0o155) + '\x31', 8)] * vPPlOXQgR3SM[nzTpIcepk0o8('\060' + chr(111) + chr(0b110010), 8)] - xFDEVQn5qSdh[nzTpIcepk0o8(chr(2127 - 2079) + chr(6138 - 6027) + chr(1136 - 1088), 8)] * teUmM7cKWZUa[nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061', 8)] * vPPlOXQgR3SM[nzTpIcepk0o8('\060' + '\157' + chr(0b1101 + 0o45), 8)]
noahbenson/neuropythy
neuropythy/geometry/util.py
tetrahedral_barycentric_coordinates
def tetrahedral_barycentric_coordinates(tetra, pt): ''' tetrahedral_barycentric_coordinates(tetrahedron, point) yields a list of weights for each vertex in the given tetrahedron in the same order as the vertices given. If all weights are 0, then the point is not inside the tetrahedron. ''' # I found a description of this algorithm here (Nov. 2017): # http://steve.hollasch.net/cgindex/geometry/ptintet.html tetra = np.asarray(tetra) if tetra.shape[0] != 4: if tetra.shape[1] == 4: if tetra.shape[0] == 3: tetra = np.transpose(tetra, (1,0) if len(tetra.shape) == 2 else (1,0,2)) else: tetra = np.transpose(tetra, (1,2,0)) elif tetra.shape[1] == 3: tetra = np.transpose(tetra, (2,1,0)) else: tetra = np.transpose(tetra, (2,0,1)) elif tetra.shape[1] != 3: tetra = np.transpose(tetra, (0,2,1)) if pt.shape[0] != 3: pt = pt.T # Okay, calculate the determinants... d_ = det_4x3(tetra[0], tetra[1], tetra[2], tetra[3]) d0 = det_4x3(pt, tetra[1], tetra[2], tetra[3]) d1 = det_4x3(tetra[0], pt, tetra[2], tetra[3]) d2 = det_4x3(tetra[0], tetra[1], pt, tetra[3]) d3 = det_4x3(tetra[0], tetra[1], tetra[2], pt) s_ = np.sign(d_) z_ = np.logical_or(np.any([s_ * si == -1 for si in np.sign([d0,d1,d2,d3])], axis=0), np.isclose(d_,0)) x_ = np.logical_not(z_) d_inv = x_ / (x_ * d_ + z_) return np.asarray([d_inv * dq for dq in (d0,d1,d2,d3)])
python
def tetrahedral_barycentric_coordinates(tetra, pt): ''' tetrahedral_barycentric_coordinates(tetrahedron, point) yields a list of weights for each vertex in the given tetrahedron in the same order as the vertices given. If all weights are 0, then the point is not inside the tetrahedron. ''' # I found a description of this algorithm here (Nov. 2017): # http://steve.hollasch.net/cgindex/geometry/ptintet.html tetra = np.asarray(tetra) if tetra.shape[0] != 4: if tetra.shape[1] == 4: if tetra.shape[0] == 3: tetra = np.transpose(tetra, (1,0) if len(tetra.shape) == 2 else (1,0,2)) else: tetra = np.transpose(tetra, (1,2,0)) elif tetra.shape[1] == 3: tetra = np.transpose(tetra, (2,1,0)) else: tetra = np.transpose(tetra, (2,0,1)) elif tetra.shape[1] != 3: tetra = np.transpose(tetra, (0,2,1)) if pt.shape[0] != 3: pt = pt.T # Okay, calculate the determinants... d_ = det_4x3(tetra[0], tetra[1], tetra[2], tetra[3]) d0 = det_4x3(pt, tetra[1], tetra[2], tetra[3]) d1 = det_4x3(tetra[0], pt, tetra[2], tetra[3]) d2 = det_4x3(tetra[0], tetra[1], pt, tetra[3]) d3 = det_4x3(tetra[0], tetra[1], tetra[2], pt) s_ = np.sign(d_) z_ = np.logical_or(np.any([s_ * si == -1 for si in np.sign([d0,d1,d2,d3])], axis=0), np.isclose(d_,0)) x_ = np.logical_not(z_) d_inv = x_ / (x_ * d_ + z_) return np.asarray([d_inv * dq for dq in (d0,d1,d2,d3)])
[ "def", "tetrahedral_barycentric_coordinates", "(", "tetra", ",", "pt", ")", ":", "# I found a description of this algorithm here (Nov. 2017):", "# http://steve.hollasch.net/cgindex/geometry/ptintet.html", "tetra", "=", "np", ".", "asarray", "(", "tetra", ")", "if", "tetra", "...
tetrahedral_barycentric_coordinates(tetrahedron, point) yields a list of weights for each vertex in the given tetrahedron in the same order as the vertices given. If all weights are 0, then the point is not inside the tetrahedron.
[ "tetrahedral_barycentric_coordinates", "(", "tetrahedron", "point", ")", "yields", "a", "list", "of", "weights", "for", "each", "vertex", "in", "the", "given", "tetrahedron", "in", "the", "same", "order", "as", "the", "vertices", "given", ".", "If", "all", "we...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/util.py#L649-L682
train
This function calculates the tetrahedral barycentric coordinates for a given tetrahedron and point.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUx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C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b101 + 0o53) + '\x6f' + '\x32' + chr(0b10001 + 0o41) + chr(0b100110 + 0o12), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b101001 + 0o12) + '\067' + chr(225 - 173), 33561 - 33553), nzTpIcepk0o8(chr(48) + '\157' + '\061' + '\066' + chr(2100 - 2051), ord("\x08")), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(111) + chr(157 - 108) + '\x34' + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1010010 + 0o35) + '\x33' + chr(1041 - 992) + chr(694 - 641), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\064' + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b10100 + 0o34) + '\x6f' + chr(1360 - 1311), 1827 - 1819), nzTpIcepk0o8(chr(1886 - 1838) + '\x6f' + '\x33' + '\x35' + '\x34', 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + chr(0b110100) + chr(54), 8), nzTpIcepk0o8(chr(748 - 700) + chr(3365 - 3254) + chr(0b110110) + chr(850 - 802), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + chr(622 - 568), 5629 - 5621), nzTpIcepk0o8('\x30' + '\157' + '\x31' + chr(53) + chr(689 - 640), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + chr(2158 - 2106) + chr(0b110100), 8255 - 8247), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + '\063' + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + '\060' + '\060', 0o10), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1101111) + '\061' + chr(0b101010 + 0o12) + chr(0b110001), 57767 - 57759), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(939 - 884), ord("\x08")), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1110 + 0o141) + '\066' + '\065', 8068 - 8060), nzTpIcepk0o8(chr(118 - 70) + chr(11414 - 11303) + chr(50) + '\066' + chr(541 - 488), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + '\x32' + chr(0b101100 + 0o4), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(8058 - 7947) + chr(0b110011) + chr(0b1110 + 0o51) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b101001 + 0o11) + '\062' + chr(0b110111), 47413 - 47405), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31' + '\x33' + '\x33', 0o10), nzTpIcepk0o8('\060' + chr(0b1001111 + 0o40) + chr(49) + chr(52) + chr(54), 8), nzTpIcepk0o8('\060' + chr(0b11100 + 0o123) + '\067' + '\063', 0b1000), nzTpIcepk0o8('\060' + chr(3636 - 3525) + chr(51) + chr(0b110101) + '\065', 7007 - 6999), nzTpIcepk0o8('\060' + chr(111) + chr(0b100100 + 0o17) + chr(0b11100 + 0o27), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(51) + chr(1206 - 1154) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b10111 + 0o31) + '\x6f' + '\x32' + chr(55) + chr(2027 - 1977), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + chr(0b110001) + '\060', 34376 - 34368), nzTpIcepk0o8(chr(0b100111 + 0o11) + '\x6f' + chr(0b110010) + '\x37' + '\x33', 14655 - 14647), nzTpIcepk0o8(chr(48) + chr(0b1011101 + 0o22) + '\x34' + chr(51), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b10111 + 0o34), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + '\061' + '\x34', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1001101 + 0o42) + chr(2325 - 2274) + chr(1449 - 1397) + chr(49), ord("\x08")), nzTpIcepk0o8('\x30' + chr(3475 - 3364) + chr(0b110010) + '\x37' + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110111) + chr(600 - 551), 0b1000), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b1001110 + 0o41) + '\062' + chr(0b110100) + '\067', 39803 - 39795), nzTpIcepk0o8(chr(48) + '\x6f' + chr(50) + chr(53) + chr(0b100010 + 0o20), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b10 + 0o57) + '\066' + chr(0b110110), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1283 - 1235) + '\x6f' + '\065' + chr(48), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xbe'), chr(0b110100 + 0o60) + chr(0b1100101) + '\x63' + '\157' + chr(2143 - 2043) + chr(2553 - 2452))(chr(5063 - 4946) + chr(116) + chr(972 - 870) + chr(0b101 + 0o50) + chr(0b100110 + 0o22)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def i4gIFK2BiVF5(OvqlradzNwVk, i9cIicSKupwD): OvqlradzNwVk = nDF4gVNx0u9Q.asarray(OvqlradzNwVk) if roI3spqORKae(OvqlradzNwVk, roI3spqORKae(ES5oEprVxulp(b'\xfc\x94\x13+\xfd\x193\xad g6\x0f'), chr(0b1100100) + chr(7595 - 7494) + chr(99) + '\157' + '\144' + '\145')(chr(0b10001 + 0o144) + '\164' + chr(6855 - 6753) + chr(0b11101 + 0o20) + chr(0b110000 + 0o10)))[nzTpIcepk0o8('\060' + chr(0b0 + 0o157) + '\x30', 37823 - 37815)] != nzTpIcepk0o8('\060' + chr(0b101100 + 0o103) + '\064', 0o10): if roI3spqORKae(OvqlradzNwVk, roI3spqORKae(ES5oEprVxulp(b'\xfc\x94\x13+\xfd\x193\xad g6\x0f'), chr(100) + chr(0b1100101) + '\143' + '\x6f' + chr(0b1100100) + chr(101))('\x75' + '\x74' + chr(0b1011110 + 0o10) + chr(1099 - 1054) + chr(1443 - 1387)))[nzTpIcepk0o8(chr(0b110000) + chr(0b100001 + 0o116) + chr(49), 8)] == nzTpIcepk0o8(chr(1299 - 1251) + chr(3673 - 3562) + chr(0b11111 + 0o25), 8): if roI3spqORKae(OvqlradzNwVk, roI3spqORKae(ES5oEprVxulp(b'\xfc\x94\x13+\xfd\x193\xad g6\x0f'), chr(100) + chr(0b1001010 + 0o33) + chr(0b1100011) + chr(1077 - 966) + '\144' + '\145')('\x75' + chr(0b101 + 0o157) + chr(0b111010 + 0o54) + chr(300 - 255) + chr(0b100011 + 0o25)))[nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1327 - 1279), 8)] == nzTpIcepk0o8(chr(0b110000) + chr(0b110000 + 0o77) + chr(51), 8): OvqlradzNwVk = nDF4gVNx0u9Q.transpose(OvqlradzNwVk, (nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1101111) + chr(2295 - 2246), 8), nzTpIcepk0o8('\060' + chr(9220 - 9109) + '\x30', 8)) if ftfygxgFas5X(OvqlradzNwVk.lhbM092AFW8f) == nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b100000 + 0o22), ord("\x08")) else (nzTpIcepk0o8('\x30' + '\x6f' + '\x31', 8), nzTpIcepk0o8(chr(1333 - 1285) + chr(0b1101111) + chr(1168 - 1120), 8), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(6611 - 6500) + chr(50), 8))) else: OvqlradzNwVk = nDF4gVNx0u9Q.transpose(OvqlradzNwVk, (nzTpIcepk0o8('\060' + chr(0b1101111) + chr(202 - 153), 8), nzTpIcepk0o8('\060' + chr(12080 - 11969) + chr(50), 8), nzTpIcepk0o8('\060' + chr(0b11101 + 0o122) + chr(0b1011 + 0o45), 8))) elif roI3spqORKae(OvqlradzNwVk, roI3spqORKae(ES5oEprVxulp(b'\xfc\x94\x13+\xfd\x193\xad g6\x0f'), chr(0b100001 + 0o103) + chr(101) + chr(0b10101 + 0o116) + chr(1631 - 1520) + '\144' + chr(0b1100101))(chr(117) + chr(0b1101000 + 0o14) + '\146' + chr(0b101101) + chr(415 - 359)))[nzTpIcepk0o8(chr(1377 - 1329) + '\157' + chr(49), 8)] == nzTpIcepk0o8(chr(0b1101 + 0o43) + '\157' + '\063', 8): OvqlradzNwVk = nDF4gVNx0u9Q.transpose(OvqlradzNwVk, (nzTpIcepk0o8('\x30' + chr(0b100011 + 0o114) + chr(2297 - 2247), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31', 8), nzTpIcepk0o8('\060' + chr(10725 - 10614) + chr(48), 8))) else: OvqlradzNwVk = nDF4gVNx0u9Q.transpose(OvqlradzNwVk, (nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32', 8), nzTpIcepk0o8('\060' + chr(0b111011 + 0o64) + chr(48), 8), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b1101111) + chr(1345 - 1296), 8))) elif roI3spqORKae(OvqlradzNwVk, roI3spqORKae(ES5oEprVxulp(b'\xfc\x94\x13+\xfd\x193\xad g6\x0f'), chr(7079 - 6979) + '\145' + chr(2824 - 2725) + chr(2281 - 2170) + '\144' + chr(0b1001100 + 0o31))(chr(12689 - 12572) + chr(0b10110 + 0o136) + '\146' + chr(0b11010 + 0o23) + '\070'))[nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(111) + chr(1676 - 1627), 8)] != nzTpIcepk0o8(chr(48) + chr(0b1000011 + 0o54) + chr(51), 8): OvqlradzNwVk = nDF4gVNx0u9Q.transpose(OvqlradzNwVk, (nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\060', 8), nzTpIcepk0o8(chr(1084 - 1036) + chr(10135 - 10024) + '\x32', 8), nzTpIcepk0o8(chr(1451 - 1403) + chr(0b1101111) + chr(0b10001 + 0o40), 8))) if roI3spqORKae(i9cIicSKupwD, roI3spqORKae(ES5oEprVxulp(b'\xfc\x94\x13+\xfd\x193\xad g6\x0f'), '\144' + chr(0b1010000 + 0o25) + chr(0b1100011) + chr(111) + chr(0b100001 + 0o103) + chr(6157 - 6056))(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(0b101011 + 0o2) + '\070'))[nzTpIcepk0o8(chr(955 - 907) + chr(7419 - 7308) + chr(0b100010 + 0o16), 8)] != nzTpIcepk0o8('\060' + chr(3034 - 2923) + '\x33', 8): i9cIicSKupwD = i9cIicSKupwD.hq6XE4_Nhd6R m0ZOLbOPh1Gi = FwsT62ATEuZT(OvqlradzNwVk[nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(8733 - 8622) + '\x30', 8)], OvqlradzNwVk[nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001), 8)], OvqlradzNwVk[nzTpIcepk0o8(chr(1489 - 1441) + chr(111) + chr(0b10000 + 0o42), 8)], OvqlradzNwVk[nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011), 8)]) C3KFAs71dyhg = FwsT62ATEuZT(i9cIicSKupwD, OvqlradzNwVk[nzTpIcepk0o8('\060' + chr(111) + '\x31', 8)], OvqlradzNwVk[nzTpIcepk0o8('\x30' + '\x6f' + chr(0b100011 + 0o17), 8)], OvqlradzNwVk[nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(977 - 926), 8)]) n6rotHTVu42X = FwsT62ATEuZT(OvqlradzNwVk[nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(111) + '\060', 8)], i9cIicSKupwD, OvqlradzNwVk[nzTpIcepk0o8(chr(48) + chr(0b1100111 + 0o10) + chr(448 - 398), 8)], OvqlradzNwVk[nzTpIcepk0o8(chr(0b10001 + 0o37) + '\157' + chr(51), 8)]) PAfFNjUIOLoy = FwsT62ATEuZT(OvqlradzNwVk[nzTpIcepk0o8(chr(48) + chr(2702 - 2591) + chr(0b110 + 0o52), 8)], OvqlradzNwVk[nzTpIcepk0o8('\x30' + '\x6f' + chr(49), 8)], i9cIicSKupwD, OvqlradzNwVk[nzTpIcepk0o8(chr(0b110000) + '\157' + '\063', 8)]) koSlfSkACSB5 = FwsT62ATEuZT(OvqlradzNwVk[nzTpIcepk0o8('\060' + '\157' + chr(48), 8)], OvqlradzNwVk[nzTpIcepk0o8(chr(0b110000) + chr(0b1010100 + 0o33) + chr(0b110001), 8)], OvqlradzNwVk[nzTpIcepk0o8(chr(2249 - 2201) + '\157' + chr(0b110010), 8)], i9cIicSKupwD) Iw8d_OsSShUr = nDF4gVNx0u9Q.kkYdZa5PRs5b(m0ZOLbOPh1Gi) QI3ATNWPGyR4 = nDF4gVNx0u9Q.logical_or(nDF4gVNx0u9Q.VF4pKOObtlPc([Iw8d_OsSShUr * Og1L62v0IZjq == -nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001), 8) for Og1L62v0IZjq in nDF4gVNx0u9Q.kkYdZa5PRs5b([C3KFAs71dyhg, n6rotHTVu42X, PAfFNjUIOLoy, koSlfSkACSB5])], axis=nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1101111) + chr(48), 8)), nDF4gVNx0u9Q.SRWC_OfU1mLH(m0ZOLbOPh1Gi, nzTpIcepk0o8(chr(0b110000) + '\157' + chr(48), 8))) aPPV97VTKqV9 = nDF4gVNx0u9Q.logical_not(QI3ATNWPGyR4) hAcSzgZ67en7 = aPPV97VTKqV9 / (aPPV97VTKqV9 * m0ZOLbOPh1Gi + QI3ATNWPGyR4) return roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xf1\x8f\x10\x14\xbfAx'), '\144' + chr(8549 - 8448) + chr(99) + chr(0b100000 + 0o117) + chr(0b1011101 + 0o7) + '\145')(chr(0b1110101) + chr(116) + '\146' + chr(45) + chr(0b111000)))([hAcSzgZ67en7 * Tm9U5Mu3N0xL for Tm9U5Mu3N0xL in (C3KFAs71dyhg, n6rotHTVu42X, PAfFNjUIOLoy, koSlfSkACSB5)])
noahbenson/neuropythy
neuropythy/geometry/util.py
point_in_tetrahedron
def point_in_tetrahedron(tetra, pt): ''' point_in_tetrahedron(tetrahedron, point) yields True if the given point is in the given tetrahedron. If either tetrahedron or point (or both) are lists of shapes/points, then this calculation is automatically threaded over all the given arguments. ''' bcs = tetrahedral_barycentric_coordinates(tetra, pt) return np.logical_not(np.all(np.isclose(bcs, 0), axis=0))
python
def point_in_tetrahedron(tetra, pt): ''' point_in_tetrahedron(tetrahedron, point) yields True if the given point is in the given tetrahedron. If either tetrahedron or point (or both) are lists of shapes/points, then this calculation is automatically threaded over all the given arguments. ''' bcs = tetrahedral_barycentric_coordinates(tetra, pt) return np.logical_not(np.all(np.isclose(bcs, 0), axis=0))
[ "def", "point_in_tetrahedron", "(", "tetra", ",", "pt", ")", ":", "bcs", "=", "tetrahedral_barycentric_coordinates", "(", "tetra", ",", "pt", ")", "return", "np", ".", "logical_not", "(", "np", ".", "all", "(", "np", ".", "isclose", "(", "bcs", ",", "0",...
point_in_tetrahedron(tetrahedron, point) yields True if the given point is in the given tetrahedron. If either tetrahedron or point (or both) are lists of shapes/points, then this calculation is automatically threaded over all the given arguments.
[ "point_in_tetrahedron", "(", "tetrahedron", "point", ")", "yields", "True", "if", "the", "given", "point", "is", "in", "the", "given", "tetrahedron", ".", "If", "either", "tetrahedron", "or", "point", "(", "or", "both", ")", "are", "lists", "of", "shapes", ...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/util.py#L684-L691
train
Returns True if the given point is in the given tetrahedron.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60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Ie5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(303 - 255) + chr(0b11011 + 0o124) + chr(0b110011) + chr(0b11100 + 0o33) + chr(0b101011 + 0o13), 26568 - 26560), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(111) + chr(50) + '\x37' + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\x6f' + chr(0b110011) + chr(0b110 + 0o53) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(833 - 785) + '\x6f' + chr(1153 - 1102) + chr(52) + chr(0b1001 + 0o53), 0b1000), nzTpIcepk0o8(chr(2217 - 2169) + chr(0b101100 + 0o103) + '\061' + chr(49) + chr(0b110000), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x33' + chr(0b110001) + chr(0b110110), 661 - 653), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + '\x30' + chr(50), 0b1000), nzTpIcepk0o8(chr(1387 - 1339) + chr(111) + chr(0b10101 + 0o34) + chr(0b110000) + chr(0b101010 + 0o11), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001) + chr(48) + chr(49), 0o10), nzTpIcepk0o8(chr(139 - 91) + '\x6f' + chr(0b110001) + chr(826 - 774) + '\063', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(1071 - 1019) + chr(0b1 + 0o63), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + '\061' + chr(0b110110), 35267 - 35259), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10111 + 0o33) + '\064' + chr(1902 - 1852), 11453 - 11445), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(111) + chr(1994 - 1943) + '\x30' + '\061', 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001 + 0o0) + '\x36' + chr(1782 - 1731), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + '\062' + '\x32', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(465 - 413) + chr(1153 - 1099), 0b1000), nzTpIcepk0o8(chr(2180 - 2132) + '\157' + chr(595 - 544) + '\x33', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(434 - 383), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + chr(0b110001 + 0o2) + chr(2671 - 2618), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(53), 0b1000), nzTpIcepk0o8(chr(174 - 126) + '\157' + chr(0b110011) + '\067' + chr(0b10010 + 0o37), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + chr(50), 1478 - 1470), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + chr(1532 - 1482) + chr(52), 0o10), nzTpIcepk0o8(chr(728 - 680) + '\157' + '\x34' + chr(55), 0b1000), nzTpIcepk0o8(chr(0b101100 + 0o4) + '\x6f' + chr(0b101 + 0o55) + chr(0b1010 + 0o53) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1101111) + chr(50) + chr(0b110000) + chr(0b100011 + 0o16), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(5593 - 5482) + chr(0b110110) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\061' + chr(50) + '\x33', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(4791 - 4680) + '\x31' + '\x32' + chr(49), 0o10), nzTpIcepk0o8(chr(2038 - 1990) + chr(111) + chr(0b110010) + chr(1544 - 1489) + '\x37', 0o10), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b1101111) + '\061' + '\063' + chr(52), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(2280 - 2227) + chr(0b10000 + 0o45), 19426 - 19418), nzTpIcepk0o8(chr(0b1010 + 0o46) + '\157' + chr(243 - 194) + '\067' + chr(53 - 4), 0o10), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(0b1010011 + 0o34) + '\x32' + '\063' + '\067', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + chr(1087 - 1035) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\x6f' + '\063' + '\x33' + '\x33', 0o10), nzTpIcepk0o8(chr(1576 - 1528) + chr(111) + chr(0b110010) + chr(2098 - 2048) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(975 - 927) + chr(3576 - 3465) + chr(0b101111 + 0o4) + '\067' + chr(0b110110), 8), nzTpIcepk0o8(chr(48) + chr(0b100011 + 0o114) + chr(51) + '\x32' + chr(0b10111 + 0o31), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b1101 + 0o142) + chr(53) + chr(0b110000), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xd0'), '\144' + '\x65' + chr(0b1001000 + 0o33) + chr(238 - 127) + chr(0b1100100) + chr(7538 - 7437))(chr(0b1110101) + chr(0b1001010 + 0o52) + chr(0b1001010 + 0o34) + chr(0b100111 + 0o6) + chr(2424 - 2368)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def drX0TXRjrOCj(OvqlradzNwVk, i9cIicSKupwD): kHS3osvvkfAX = i4gIFK2BiVF5(OvqlradzNwVk, i9cIicSKupwD) return roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\x92\xd4\xae\x8d+\xaf.\x1c/\x0cP'), chr(9033 - 8933) + chr(101) + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(0b1010111 + 0o16))('\x75' + '\164' + chr(0b1010001 + 0o25) + chr(571 - 526) + '\070'))(roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\x9f\xd7\xa5'), chr(0b1100100) + chr(101) + '\x63' + '\157' + chr(0b1010000 + 0o24) + chr(8244 - 8143))(chr(0b1110101) + chr(0b101000 + 0o114) + chr(102) + chr(0b101101) + '\x38'))(roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xad\xe9\x9e\xa7\x17\x81$\x16p\x0eh\xc6'), chr(7461 - 7361) + chr(101) + chr(0b100100 + 0o77) + chr(0b1101111) + chr(100) + chr(3752 - 3651))('\x75' + chr(0b1110100) + chr(4683 - 4581) + chr(0b101100 + 0o1) + chr(0b111000)))(kHS3osvvkfAX, nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b11001 + 0o27), ord("\x08"))), axis=nzTpIcepk0o8(chr(48) + '\157' + '\060', 8)))
noahbenson/neuropythy
neuropythy/geometry/util.py
prism_barycentric_coordinates
def prism_barycentric_coordinates(tri1, tri2, pt): ''' prism_barycentric_coordinates(tri1, tri2, point) yields a list of weights for each vertex in the given tetrahedron in the same order as the vertices given. If all weights are 0, then the point is not inside the tetrahedron. The returned weights are (a,b,d) in a numpy array; the values a, b, and c are the barycentric coordinates corresponding to the three points of the triangles (where c = (1 - a - b) and the value d is the fractional distance (in the range [0,1]) of the point between tri1 (d=0) and tri2 (d=1). ''' pt = np.asarray(pt) tri1 = np.asarray(tri1) tri2 = np.asarray(tri2) (tri1,tri2) = [ (np.transpose(tri, (1,0) if len(tri.shape) == 2 else (2,0,1)) if tri.shape[0] != 3 else np.transpose(tri, (0,2,1)) if tri.shape[1] != 3 else tri) for tri in (tri1,tri2)] pt = pt.T if pt.shape[0] != 3 else pt # get the individual tetrahedron bc coordinates bcs1 = tetrahedral_barycentric_coordinates([tri1[0], tri1[1], tri1[2], tri2[0]], pt) bcs2 = tetrahedral_barycentric_coordinates([tri1[1], tri1[2], tri2[0], tri2[1]], pt) bcs3 = tetrahedral_barycentric_coordinates([tri1[2], tri2[0], tri2[1], tri2[2]], pt) bcs4 = tetrahedral_barycentric_coordinates([tri1[0], tri1[1], tri2[0], tri2[1]], pt) bcs5 = tetrahedral_barycentric_coordinates([tri1[0], tri1[2], tri2[0], tri2[2]], pt) bcs6 = tetrahedral_barycentric_coordinates([tri1[1], tri1[2], tri2[1], tri2[2]], pt) bcs = ((bcs1[0] + bcs4[0] + bcs5[0], bcs1[1] + bcs2[0] + bcs4[1] + bcs6[0], bcs1[2] + bcs2[1] + bcs3[0] + bcs5[1] + bcs6[1]), (bcs1[3] + bcs2[2] + bcs3[1] + bcs4[2] + bcs5[2], bcs2[3] + bcs3[2] + bcs4[3] + bcs6[2], bcs3[3] + bcs5[3] + bcs6[3])) # convert into (a,b,c,d) coordinates abc = np.sum(bcs, axis=0) d = np.sum(bcs[1], axis=0) return np.asarray((abc[0], abc[1], d))
python
def prism_barycentric_coordinates(tri1, tri2, pt): ''' prism_barycentric_coordinates(tri1, tri2, point) yields a list of weights for each vertex in the given tetrahedron in the same order as the vertices given. If all weights are 0, then the point is not inside the tetrahedron. The returned weights are (a,b,d) in a numpy array; the values a, b, and c are the barycentric coordinates corresponding to the three points of the triangles (where c = (1 - a - b) and the value d is the fractional distance (in the range [0,1]) of the point between tri1 (d=0) and tri2 (d=1). ''' pt = np.asarray(pt) tri1 = np.asarray(tri1) tri2 = np.asarray(tri2) (tri1,tri2) = [ (np.transpose(tri, (1,0) if len(tri.shape) == 2 else (2,0,1)) if tri.shape[0] != 3 else np.transpose(tri, (0,2,1)) if tri.shape[1] != 3 else tri) for tri in (tri1,tri2)] pt = pt.T if pt.shape[0] != 3 else pt # get the individual tetrahedron bc coordinates bcs1 = tetrahedral_barycentric_coordinates([tri1[0], tri1[1], tri1[2], tri2[0]], pt) bcs2 = tetrahedral_barycentric_coordinates([tri1[1], tri1[2], tri2[0], tri2[1]], pt) bcs3 = tetrahedral_barycentric_coordinates([tri1[2], tri2[0], tri2[1], tri2[2]], pt) bcs4 = tetrahedral_barycentric_coordinates([tri1[0], tri1[1], tri2[0], tri2[1]], pt) bcs5 = tetrahedral_barycentric_coordinates([tri1[0], tri1[2], tri2[0], tri2[2]], pt) bcs6 = tetrahedral_barycentric_coordinates([tri1[1], tri1[2], tri2[1], tri2[2]], pt) bcs = ((bcs1[0] + bcs4[0] + bcs5[0], bcs1[1] + bcs2[0] + bcs4[1] + bcs6[0], bcs1[2] + bcs2[1] + bcs3[0] + bcs5[1] + bcs6[1]), (bcs1[3] + bcs2[2] + bcs3[1] + bcs4[2] + bcs5[2], bcs2[3] + bcs3[2] + bcs4[3] + bcs6[2], bcs3[3] + bcs5[3] + bcs6[3])) # convert into (a,b,c,d) coordinates abc = np.sum(bcs, axis=0) d = np.sum(bcs[1], axis=0) return np.asarray((abc[0], abc[1], d))
[ "def", "prism_barycentric_coordinates", "(", "tri1", ",", "tri2", ",", "pt", ")", ":", "pt", "=", "np", ".", "asarray", "(", "pt", ")", "tri1", "=", "np", ".", "asarray", "(", "tri1", ")", "tri2", "=", "np", ".", "asarray", "(", "tri2", ")", "(", ...
prism_barycentric_coordinates(tri1, tri2, point) yields a list of weights for each vertex in the given tetrahedron in the same order as the vertices given. If all weights are 0, then the point is not inside the tetrahedron. The returned weights are (a,b,d) in a numpy array; the values a, b, and c are the barycentric coordinates corresponding to the three points of the triangles (where c = (1 - a - b) and the value d is the fractional distance (in the range [0,1]) of the point between tri1 (d=0) and tri2 (d=1).
[ "prism_barycentric_coordinates", "(", "tri1", "tri2", "point", ")", "yields", "a", "list", "of", "weights", "for", "each", "vertex", "in", "the", "given", "tetrahedron", "in", "the", "same", "order", "as", "the", "vertices", "given", ".", "If", "all", "weigh...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/util.py#L693-L727
train
Returns a list of prism barycentric coordinates corresponding to the given point.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRiM1qvaW7,WbNHlDKpyPtQ,z18h6aCn31dg,oxjHmqoBrCHG,GA4ANb_Tki5v,LdFlJR2ssk3y,gCu7Qd75URN1,yfEeqQiUoqWT,zGgTE_CdZf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qQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(879 - 828) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(1697 - 1649) + chr(0b110100 + 0o73) + chr(955 - 905) + chr(0b100111 + 0o15) + '\060', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(2119 - 2068) + '\x34', 0o10), nzTpIcepk0o8(chr(48) + chr(11800 - 11689) + chr(0b110001) + chr(0b101010 + 0o7) + '\067', 0o10), nzTpIcepk0o8(chr(2112 - 2064) + chr(0b1101100 + 0o3) + '\x37' + '\064', 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x36' + '\064', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + chr(0b110001) + chr(930 - 881), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010) + chr(0b101000 + 0o10), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(10871 - 10760) + chr(0b100110 + 0o14) + '\x31' + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + chr(0b10 + 0o63) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(2011 - 1963) + '\157' + '\062' + '\x32' + chr(55), 0b1000), nzTpIcepk0o8(chr(192 - 144) + chr(0b1101111) + chr(0b110011) + '\065', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + '\x32' + '\062', 51219 - 51211), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1562 - 1511) + chr(53) + chr(0b1100 + 0o47), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\062' + chr(2081 - 2028) + chr(0b101000 + 0o10), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(666 - 617) + '\x30', 1274 - 1266), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b111101 + 0o62) + chr(49) + chr(49) + '\062', 0b1000), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(0b1 + 0o156) + '\x33' + chr(0b110110) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(5541 - 5430) + chr(0b110111) + chr(0b1001 + 0o53), 8), nzTpIcepk0o8('\x30' + chr(11572 - 11461) + '\x32' + chr(1758 - 1709) + chr(49), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + chr(54) + '\x30', 27072 - 27064), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1011110 + 0o21) + chr(0b110001) + '\x34' + chr(616 - 568), 1497 - 1489), nzTpIcepk0o8(chr(253 - 205) + '\157' + chr(2397 - 2348) + chr(736 - 688) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(111) + chr(0b100 + 0o56) + chr(0b110100) + '\064', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(265 - 214) + chr(48) + '\065', 55831 - 55823), nzTpIcepk0o8(chr(48) + chr(3808 - 3697) + chr(48), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b111101 + 0o62) + '\x37' + chr(55), 0o10), nzTpIcepk0o8(chr(1181 - 1133) + chr(111) + chr(0b110011) + chr(1597 - 1545) + chr(0b11001 + 0o30), 0b1000), nzTpIcepk0o8(chr(194 - 146) + '\x6f' + '\x33' + chr(0b10000 + 0o47) + '\x34', 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\061' + chr(0b1111 + 0o41) + '\066', ord("\x08")), nzTpIcepk0o8(chr(516 - 468) + chr(0b1101100 + 0o3) + chr(0b1110 + 0o44) + '\x37' + chr(0b101111 + 0o1), ord("\x08")), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(9817 - 9706) + '\062' + chr(49) + '\x35', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(882 - 833) + chr(54) + chr(48), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b111011 + 0o64) + chr(179 - 125) + chr(49), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b100100 + 0o15) + '\x36' + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b0 + 0o62) + chr(55) + chr(1728 - 1679), ord("\x08")), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b1101111) + '\063', 0o10), nzTpIcepk0o8(chr(48) + chr(0b100111 + 0o110) + chr(763 - 714) + '\061', 18522 - 18514), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + '\x34' + chr(0b1 + 0o66), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(9013 - 8902) + chr(481 - 428) + '\060', 87 - 79)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xf6'), '\144' + chr(7292 - 7191) + chr(0b1001 + 0o132) + '\x6f' + chr(6023 - 5923) + chr(101))(chr(0b1100100 + 0o21) + chr(8353 - 8237) + chr(0b101100 + 0o72) + chr(45) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def nQLeUBj7zeAW(ClRPiPkBcamO, AyhPrWdLP99Y, i9cIicSKupwD): i9cIicSKupwD = nDF4gVNx0u9Q.asarray(i9cIicSKupwD) ClRPiPkBcamO = nDF4gVNx0u9Q.asarray(ClRPiPkBcamO) AyhPrWdLP99Y = nDF4gVNx0u9Q.asarray(AyhPrWdLP99Y) (ClRPiPkBcamO, AyhPrWdLP99Y) = [nDF4gVNx0u9Q.transpose(oRQG7sQgHvpU, (nzTpIcepk0o8(chr(0b1111 + 0o41) + '\x6f' + '\x31', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b110001 + 0o76) + chr(0b101011 + 0o5), 8)) if ftfygxgFas5X(oRQG7sQgHvpU.lhbM092AFW8f) == nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(0b1101101 + 0o2) + chr(1082 - 1032), 0o10) else (nzTpIcepk0o8('\x30' + chr(9890 - 9779) + chr(50), 8), nzTpIcepk0o8(chr(1126 - 1078) + chr(111) + chr(0b101010 + 0o6), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31', 8))) if oRQG7sQgHvpU.lhbM092AFW8f[nzTpIcepk0o8('\060' + '\157' + chr(0b110000), 8)] != nzTpIcepk0o8('\060' + chr(0b10100 + 0o133) + '\063', 8) else nDF4gVNx0u9Q.transpose(oRQG7sQgHvpU, (nzTpIcepk0o8('\x30' + '\157' + '\x30', 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1675 - 1625), 8), nzTpIcepk0o8(chr(772 - 724) + chr(0b10 + 0o155) + chr(49), 8))) if oRQG7sQgHvpU.lhbM092AFW8f[nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b100101 + 0o112) + chr(2096 - 2047), 8)] != nzTpIcepk0o8(chr(0b110 + 0o52) + '\157' + chr(0b11001 + 0o32), 8) else oRQG7sQgHvpU for oRQG7sQgHvpU in (ClRPiPkBcamO, AyhPrWdLP99Y)] i9cIicSKupwD = i9cIicSKupwD.hq6XE4_Nhd6R if i9cIicSKupwD.lhbM092AFW8f[nzTpIcepk0o8('\060' + chr(8378 - 8267) + chr(1566 - 1518), 8)] != nzTpIcepk0o8('\060' + '\157' + '\x33', 8) else i9cIicSKupwD UWp95uJRh2Go = i4gIFK2BiVF5([ClRPiPkBcamO[nzTpIcepk0o8(chr(911 - 863) + chr(12307 - 12196) + '\060', 8)], ClRPiPkBcamO[nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b1101111) + chr(49), 8)], ClRPiPkBcamO[nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1841 - 1791), 8)], AyhPrWdLP99Y[nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b10101 + 0o33), 8)]], i9cIicSKupwD) VWzluqK5HPgM = i4gIFK2BiVF5([ClRPiPkBcamO[nzTpIcepk0o8(chr(0b10 + 0o56) + chr(2060 - 1949) + '\x31', 8)], ClRPiPkBcamO[nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b1111 + 0o43), 8)], AyhPrWdLP99Y[nzTpIcepk0o8(chr(0b0 + 0o60) + '\157' + chr(0b110000), 8)], AyhPrWdLP99Y[nzTpIcepk0o8(chr(2291 - 2243) + chr(111) + '\061', 8)]], i9cIicSKupwD) yBfsCaXi0_vK = i4gIFK2BiVF5([ClRPiPkBcamO[nzTpIcepk0o8('\060' + '\157' + chr(50), 8)], AyhPrWdLP99Y[nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(0b1001110 + 0o41) + '\x30', 8)], AyhPrWdLP99Y[nzTpIcepk0o8(chr(1588 - 1540) + chr(111) + '\x31', 8)], AyhPrWdLP99Y[nzTpIcepk0o8(chr(1776 - 1728) + '\157' + chr(0b110010), 8)]], i9cIicSKupwD) KHONAbjUa5qg = i4gIFK2BiVF5([ClRPiPkBcamO[nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(111) + chr(0b11100 + 0o24), 8)], ClRPiPkBcamO[nzTpIcepk0o8(chr(0b10100 + 0o34) + '\x6f' + chr(215 - 166), 8)], AyhPrWdLP99Y[nzTpIcepk0o8(chr(0b110000) + chr(11833 - 11722) + chr(0b110000), 8)], AyhPrWdLP99Y[nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001), 8)]], i9cIicSKupwD) KOoEH4py95se = i4gIFK2BiVF5([ClRPiPkBcamO[nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x30', 8)], ClRPiPkBcamO[nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b100111 + 0o13), 8)], AyhPrWdLP99Y[nzTpIcepk0o8('\060' + chr(111) + '\x30', 8)], AyhPrWdLP99Y[nzTpIcepk0o8('\060' + '\157' + chr(50), 8)]], i9cIicSKupwD) RphjIiOiDx8P = i4gIFK2BiVF5([ClRPiPkBcamO[nzTpIcepk0o8('\x30' + chr(0b1101 + 0o142) + chr(0b110001), 8)], ClRPiPkBcamO[nzTpIcepk0o8(chr(224 - 176) + chr(604 - 493) + chr(0b11110 + 0o24), 8)], AyhPrWdLP99Y[nzTpIcepk0o8('\x30' + '\x6f' + '\061', 8)], AyhPrWdLP99Y[nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x32', 8)]], i9cIicSKupwD) kHS3osvvkfAX = ((UWp95uJRh2Go[nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b10001 + 0o37), 8)] + KHONAbjUa5qg[nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110000), 8)] + KOoEH4py95se[nzTpIcepk0o8('\x30' + '\x6f' + chr(48), 8)], UWp95uJRh2Go[nzTpIcepk0o8(chr(0b10011 + 0o35) + '\x6f' + '\061', 8)] + VWzluqK5HPgM[nzTpIcepk0o8(chr(48) + '\x6f' + '\x30', 8)] + KHONAbjUa5qg[nzTpIcepk0o8('\x30' + '\x6f' + chr(49), 8)] + RphjIiOiDx8P[nzTpIcepk0o8(chr(988 - 940) + '\x6f' + chr(0b110000), 8)], UWp95uJRh2Go[nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b101101 + 0o5), 8)] + VWzluqK5HPgM[nzTpIcepk0o8(chr(56 - 8) + chr(111) + chr(1337 - 1288), 8)] + yBfsCaXi0_vK[nzTpIcepk0o8(chr(801 - 753) + '\x6f' + '\060', 8)] + KOoEH4py95se[nzTpIcepk0o8('\x30' + chr(8965 - 8854) + chr(49), 8)] + RphjIiOiDx8P[nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(11226 - 11115) + chr(0b110001), 8)]), (UWp95uJRh2Go[nzTpIcepk0o8(chr(2094 - 2046) + '\157' + '\063', 8)] + VWzluqK5HPgM[nzTpIcepk0o8('\060' + '\x6f' + chr(50), 8)] + yBfsCaXi0_vK[nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49), 8)] + KHONAbjUa5qg[nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b1001000 + 0o47) + '\062', 8)] + KOoEH4py95se[nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b100100 + 0o16), 8)], VWzluqK5HPgM[nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33', 8)] + yBfsCaXi0_vK[nzTpIcepk0o8('\060' + '\157' + '\062', 8)] + KHONAbjUa5qg[nzTpIcepk0o8(chr(1515 - 1467) + chr(111) + chr(0b110001 + 0o2), 8)] + RphjIiOiDx8P[nzTpIcepk0o8(chr(565 - 517) + '\157' + '\062', 8)], yBfsCaXi0_vK[nzTpIcepk0o8(chr(749 - 701) + '\x6f' + '\x33', 8)] + KOoEH4py95se[nzTpIcepk0o8(chr(0b110000) + chr(3460 - 3349) + chr(0b100111 + 0o14), 8)] + RphjIiOiDx8P[nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b11010 + 0o31), 8)])) FogKpeIDjGKH = nDF4gVNx0u9Q.oclC8DLjA_lV(kHS3osvvkfAX, axis=nzTpIcepk0o8(chr(1761 - 1713) + chr(0b111001 + 0o66) + '\x30', 8)) vPPlOXQgR3SM = nDF4gVNx0u9Q.oclC8DLjA_lV(kHS3osvvkfAX[nzTpIcepk0o8(chr(1789 - 1741) + '\157' + chr(0b10100 + 0o35), 8)], axis=nzTpIcepk0o8(chr(405 - 357) + chr(0b1101111) + '\x30', 8)) return roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xb9\xd3}=NU0'), chr(9127 - 9027) + chr(101) + chr(0b1111 + 0o124) + chr(0b1101111) + chr(0b1000111 + 0o35) + chr(0b1010 + 0o133))(chr(4410 - 4293) + chr(0b1000 + 0o154) + '\146' + chr(45) + chr(56)))((FogKpeIDjGKH[nzTpIcepk0o8(chr(297 - 249) + chr(111) + '\060', 8)], FogKpeIDjGKH[nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(10762 - 10651) + chr(0b110001), 8)], vPPlOXQgR3SM))
noahbenson/neuropythy
neuropythy/geometry/util.py
point_in_prism
def point_in_prism(tri1, tri2, pt): ''' point_in_prism(tri1, tri2, pt) yields True if the given point is inside the prism that stretches between triangle 1 and triangle 2. Will automatically thread over extended dimensions. If multiple triangles are given, then the vertices must be an earlier dimension than the coordinates; e.g., a 3 x 3 x n array will be assumed to organized such that element [0,1,k] is the y coordinate of the first vertex of the k'th triangle. ''' bcs = prism_barycentric_coordinates(tri1, tri2, pt) return np.logical_not(np.isclose(np.sum(bcs, axis=0), 0))
python
def point_in_prism(tri1, tri2, pt): ''' point_in_prism(tri1, tri2, pt) yields True if the given point is inside the prism that stretches between triangle 1 and triangle 2. Will automatically thread over extended dimensions. If multiple triangles are given, then the vertices must be an earlier dimension than the coordinates; e.g., a 3 x 3 x n array will be assumed to organized such that element [0,1,k] is the y coordinate of the first vertex of the k'th triangle. ''' bcs = prism_barycentric_coordinates(tri1, tri2, pt) return np.logical_not(np.isclose(np.sum(bcs, axis=0), 0))
[ "def", "point_in_prism", "(", "tri1", ",", "tri2", ",", "pt", ")", ":", "bcs", "=", "prism_barycentric_coordinates", "(", "tri1", ",", "tri2", ",", "pt", ")", "return", "np", ".", "logical_not", "(", "np", ".", "isclose", "(", "np", ".", "sum", "(", ...
point_in_prism(tri1, tri2, pt) yields True if the given point is inside the prism that stretches between triangle 1 and triangle 2. Will automatically thread over extended dimensions. If multiple triangles are given, then the vertices must be an earlier dimension than the coordinates; e.g., a 3 x 3 x n array will be assumed to organized such that element [0,1,k] is the y coordinate of the first vertex of the k'th triangle.
[ "point_in_prism", "(", "tri1", "tri2", "pt", ")", "yields", "True", "if", "the", "given", "point", "is", "inside", "the", "prism", "that", "stretches", "between", "triangle", "1", "and", "triangle", "2", ".", "Will", "automatically", "thread", "over", "exten...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/util.py#L729-L738
train
Returns True if the given point is inside the prism that stretches between two triangles.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p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lockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1101111) + '\x37' + '\064', 22948 - 22940), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(111) + chr(0b110001) + '\067' + '\064', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + chr(0b110111) + '\061', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + '\x35' + '\x33', 12871 - 12863), nzTpIcepk0o8(chr(435 - 387) + chr(111) + '\x34' + '\x36', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(2020 - 1909) + chr(1750 - 1701) + chr(0b100010 + 0o17) + '\x33', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + chr(1810 - 1761) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(1883 - 1835) + chr(12098 - 11987) + '\x31' + '\064' + chr(0b110101), 50930 - 50922), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b10111 + 0o34) + chr(0b110101), 0b1000), nzTpIcepk0o8('\060' + chr(9591 - 9480) + chr(2412 - 2361) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + chr(0b110000) + '\060', 22928 - 22920), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(0b101001 + 0o106) + '\062' + '\061' + chr(0b111 + 0o57), 8), nzTpIcepk0o8('\x30' + chr(0b1 + 0o156) + chr(50) + chr(52) + chr(60 - 12), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x37' + chr(50), 0o10), nzTpIcepk0o8(chr(1196 - 1148) + '\157' + '\x33' + '\x34' + chr(1256 - 1208), 0b1000), nzTpIcepk0o8(chr(2072 - 2024) + chr(0b11011 + 0o124) + chr(49) + chr(48) + '\x30', 8), nzTpIcepk0o8('\x30' + chr(0b10011 + 0o134) + '\x31' + chr(0b110100) + '\061', 0b1000), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(1549 - 1438) + chr(51) + chr(0b110010) + '\x37', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + chr(0b10111 + 0o35) + chr(51), 0b1000), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(0b1101111) + '\062' + '\x36' + '\x30', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + chr(0b110101) + '\060', 0o10), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b1101111) + chr(2274 - 2222), 39817 - 39809), nzTpIcepk0o8(chr(880 - 832) + '\157' + chr(1493 - 1439) + chr(289 - 235), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(806 - 756) + '\x32' + '\x31', 30998 - 30990), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + chr(0b110101) + chr(1375 - 1321), 0b1000), nzTpIcepk0o8('\x30' + chr(1919 - 1808) + '\x32' + chr(0b110110) + '\062', 0b1000), nzTpIcepk0o8('\060' + '\157' + '\x31' + chr(53) + chr(48), 8), nzTpIcepk0o8('\x30' + chr(111) + chr(1745 - 1694) + '\062' + chr(257 - 204), 10347 - 10339), nzTpIcepk0o8(chr(48) + chr(0b1101110 + 0o1) + chr(0b100000 + 0o22) + chr(0b11100 + 0o31) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(2121 - 2073) + chr(111) + '\064' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(846 - 798) + '\x6f' + chr(0b0 + 0o66) + '\065', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b100 + 0o153) + chr(602 - 553) + chr(0b100111 + 0o12) + chr(0b1011 + 0o52), 0o10), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(3026 - 2915) + '\x37' + chr(909 - 861), 21503 - 21495), nzTpIcepk0o8('\x30' + chr(0b1001 + 0o146) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(9416 - 9305) + chr(54) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(574 - 526) + '\x6f' + '\x33' + chr(51) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b1101111) + '\x33' + chr(50) + '\062', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x36' + '\061', 0o10), nzTpIcepk0o8(chr(447 - 399) + '\x6f' + chr(0b110011) + chr(51) + '\061', 23433 - 23425), nzTpIcepk0o8(chr(0b110000) + chr(0b10010 + 0o135) + chr(0b100001 + 0o26) + chr(1423 - 1369), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(2859 - 2748) + chr(0b110100 + 0o1) + chr(0b110000), 42903 - 42895)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x12'), '\x64' + chr(0b1011101 + 0o10) + chr(7646 - 7547) + chr(111) + '\x64' + '\145')(chr(0b1011000 + 0o35) + chr(0b1110100) + chr(0b100011 + 0o103) + '\055' + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def UgLeqr3yCKVP(ClRPiPkBcamO, AyhPrWdLP99Y, i9cIicSKupwD): kHS3osvvkfAX = nQLeUBj7zeAW(ClRPiPkBcamO, AyhPrWdLP99Y, i9cIicSKupwD) return roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'P\x13\x1e\xc2E*\xe2:sq4'), '\144' + '\x65' + '\x63' + chr(0b100000 + 0o117) + '\144' + chr(101))('\x75' + '\x74' + chr(0b1100110) + chr(778 - 733) + chr(0b10 + 0o66)))(roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'o..\xe8y\x04\xe80,s\x0c\xc6'), chr(100) + chr(0b10 + 0o143) + chr(0b1100011) + chr(10771 - 10660) + '\x64' + chr(101))(chr(117) + chr(0b1110100) + '\146' + chr(0b101101) + chr(0b11110 + 0o32)))(roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'S\x1f\x15\xe8\x1e\x0f\xc2\x0f\\A,\xd8'), chr(100) + '\x65' + chr(0b101101 + 0o66) + chr(11003 - 10892) + '\x64' + chr(0b1100101))('\165' + chr(2042 - 1926) + chr(1444 - 1342) + chr(45) + '\x38'))(kHS3osvvkfAX, axis=nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1101111) + chr(0b10000 + 0o40), 0b1000)), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b1000 + 0o50), 8)))
noahbenson/neuropythy
neuropythy/commands/surface_to_image.py
main
def main(args): ''' surface_to_rubbon.main(args) can be given a list of arguments, such as sys.argv[1:]; these arguments may include any options and must include exactly one subject id and one output filename. Additionally one or two surface input filenames must be given. The surface files are projected into the ribbon and written to the output filename. For more information see the string stored in surface_to_image.info. ''' # Parse the arguments (args, opts) = _surface_to_ribbon_parser(args) # First, help? if opts['help']: print(info, file=sys.stdout) return 1 # and if we are verbose, lets setup a note function verbose = opts['verbose'] def note(s): if verbose: print(s, file=sys.stdout) return verbose # Add the subjects directory, if there is one if 'subjects_dir' in opts and opts['subjects_dir'] is not None: add_subject_path(opts['subjects_dir']) # figure out our arguments: (lhfl, rhfl) = (opts['lh_file'], opts['rh_file']) if len(args) == 0: raise ValueError('Not enough arguments provided!') elif len(args) == 1: # must be that the subject is in the env? sub = find_subject_path(os.getenv('SUBJECT')) outfl = args[0] elif len(args) == 2: sbpth = find_subject_path(args[0]) if sbpth is not None: sub = sbpth else: sub = find_subject_path(os.getenv('SUBJECT')) if lhfl is not None: rhfl = args[0] elif rhfl is not None: lhfl = args[0] else: raise ValueError('Given arg is not a subject: %s' % args[0]) outfl = args[1] elif len(args) == 3: sbpth0 = find_subject_path(args[0]) sbpth1 = find_subject_path(args[1]) if sbpth0 is not None: sub = sbpth0 if lhfl is not None: rhfl = args[1] elif rhfl is not None: lhfl = args[1] else: raise ValueError('Too many arguments given: %s' % args[1]) elif sbpth1 is not None: sub = sbpth1 if lhfl is not None: rhfl = args[0] elif rhfl is not None: lhfl = args[0] else: raise ValueError('Too many arguments given: %s' % args[0]) else: sub = find_subject_path(os.getenv('SUBJECT')) if lhfl is not None or rhfl is not None: raise ValueError('Too many arguments and no subject given') (lhfl, rhfl) = args outfl = args[2] elif len(args) == 4: if lhfl is not None or rhfl is not None: raise ValueError('Too many arguments and no subject given') subidx = next((i for (i,a) in enumerate(args) if find_subject_path(a) is not None), None) if subidx is None: raise ValueError('No subject given') sub = find_subject_path(args[subidx]) del args[subidx] (lhfl, rhfl, outfl) = args else: raise ValueError('Too many arguments provided!') if sub is None: raise ValueError('No subject specified or found in $SUBJECT') if lhfl is None and rhfl is None: raise ValueError('No surfaces provided') # check the method method = opts['method'].lower() if method not in ['linear', 'lines', 'nearest', 'auto']: raise ValueError('Unsupported method: %s' % method) # and the datatype if opts['dtype'] is None: dtyp = None elif opts['dtype'].lower() == 'float': dtyp = np.float32 elif opts['dtype'].lower() == 'int': dtyp = np.int32 else: raise ValueError('Type argument must be float or int') if method == 'auto': if dtyp is np.float32: method = 'linear' elif dtyp is np.int32: method = 'nearest' else: method = 'linear' # Now, load the data: note('Reading surfaces...') (lhdat, rhdat) = (None, None) if lhfl is not None: note(' - Reading LH file: %s' % lhfl) lhdat = read_surf_file(lhfl) if rhfl is not None: note(' - Reading RH file: %s' % rhfl) rhdat = read_surf_file(rhfl) (dat, hemi) = (rhdat, 'rh') if lhdat is None else \ (lhdat, 'lh') if rhdat is None else \ ((lhdat, rhdat), None) sub = subject(sub) # okay, make the volume... note('Generating volume...') vol = sub.cortex_to_image(dat, hemi=hemi, method=method, fill=opts['fill'], dtype=dtyp) # and write out the file note('Exporting volume file: %s' % outfl) save(outfl, vol, affine=sub.voxel_to_native_matrix) note('surface_to_image complete!') return 0
python
def main(args): ''' surface_to_rubbon.main(args) can be given a list of arguments, such as sys.argv[1:]; these arguments may include any options and must include exactly one subject id and one output filename. Additionally one or two surface input filenames must be given. The surface files are projected into the ribbon and written to the output filename. For more information see the string stored in surface_to_image.info. ''' # Parse the arguments (args, opts) = _surface_to_ribbon_parser(args) # First, help? if opts['help']: print(info, file=sys.stdout) return 1 # and if we are verbose, lets setup a note function verbose = opts['verbose'] def note(s): if verbose: print(s, file=sys.stdout) return verbose # Add the subjects directory, if there is one if 'subjects_dir' in opts and opts['subjects_dir'] is not None: add_subject_path(opts['subjects_dir']) # figure out our arguments: (lhfl, rhfl) = (opts['lh_file'], opts['rh_file']) if len(args) == 0: raise ValueError('Not enough arguments provided!') elif len(args) == 1: # must be that the subject is in the env? sub = find_subject_path(os.getenv('SUBJECT')) outfl = args[0] elif len(args) == 2: sbpth = find_subject_path(args[0]) if sbpth is not None: sub = sbpth else: sub = find_subject_path(os.getenv('SUBJECT')) if lhfl is not None: rhfl = args[0] elif rhfl is not None: lhfl = args[0] else: raise ValueError('Given arg is not a subject: %s' % args[0]) outfl = args[1] elif len(args) == 3: sbpth0 = find_subject_path(args[0]) sbpth1 = find_subject_path(args[1]) if sbpth0 is not None: sub = sbpth0 if lhfl is not None: rhfl = args[1] elif rhfl is not None: lhfl = args[1] else: raise ValueError('Too many arguments given: %s' % args[1]) elif sbpth1 is not None: sub = sbpth1 if lhfl is not None: rhfl = args[0] elif rhfl is not None: lhfl = args[0] else: raise ValueError('Too many arguments given: %s' % args[0]) else: sub = find_subject_path(os.getenv('SUBJECT')) if lhfl is not None or rhfl is not None: raise ValueError('Too many arguments and no subject given') (lhfl, rhfl) = args outfl = args[2] elif len(args) == 4: if lhfl is not None or rhfl is not None: raise ValueError('Too many arguments and no subject given') subidx = next((i for (i,a) in enumerate(args) if find_subject_path(a) is not None), None) if subidx is None: raise ValueError('No subject given') sub = find_subject_path(args[subidx]) del args[subidx] (lhfl, rhfl, outfl) = args else: raise ValueError('Too many arguments provided!') if sub is None: raise ValueError('No subject specified or found in $SUBJECT') if lhfl is None and rhfl is None: raise ValueError('No surfaces provided') # check the method method = opts['method'].lower() if method not in ['linear', 'lines', 'nearest', 'auto']: raise ValueError('Unsupported method: %s' % method) # and the datatype if opts['dtype'] is None: dtyp = None elif opts['dtype'].lower() == 'float': dtyp = np.float32 elif opts['dtype'].lower() == 'int': dtyp = np.int32 else: raise ValueError('Type argument must be float or int') if method == 'auto': if dtyp is np.float32: method = 'linear' elif dtyp is np.int32: method = 'nearest' else: method = 'linear' # Now, load the data: note('Reading surfaces...') (lhdat, rhdat) = (None, None) if lhfl is not None: note(' - Reading LH file: %s' % lhfl) lhdat = read_surf_file(lhfl) if rhfl is not None: note(' - Reading RH file: %s' % rhfl) rhdat = read_surf_file(rhfl) (dat, hemi) = (rhdat, 'rh') if lhdat is None else \ (lhdat, 'lh') if rhdat is None else \ ((lhdat, rhdat), None) sub = subject(sub) # okay, make the volume... note('Generating volume...') vol = sub.cortex_to_image(dat, hemi=hemi, method=method, fill=opts['fill'], dtype=dtyp) # and write out the file note('Exporting volume file: %s' % outfl) save(outfl, vol, affine=sub.voxel_to_native_matrix) note('surface_to_image complete!') return 0
[ "def", "main", "(", "args", ")", ":", "# Parse the arguments", "(", "args", ",", "opts", ")", "=", "_surface_to_ribbon_parser", "(", "args", ")", "# First, help?", "if", "opts", "[", "'help'", "]", ":", "print", "(", "info", ",", "file", "=", "sys", ".",...
surface_to_rubbon.main(args) can be given a list of arguments, such as sys.argv[1:]; these arguments may include any options and must include exactly one subject id and one output filename. Additionally one or two surface input filenames must be given. The surface files are projected into the ribbon and written to the output filename. For more information see the string stored in surface_to_image.info.
[ "surface_to_rubbon", ".", "main", "(", "args", ")", "can", "be", "given", "a", "list", "of", "arguments", "such", "as", "sys", ".", "argv", "[", "1", ":", "]", ";", "these", "arguments", "may", "include", "any", "options", "and", "must", "include", "ex...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/commands/surface_to_image.py#L83-L187
train
This is the main function for the ribbon surface_to_rubbon program.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHw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phrq,gufQJgTAhMnI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(458 - 410) + chr(0b1101111) + chr(50) + chr(1806 - 1755) + '\x35', 32298 - 32290), nzTpIcepk0o8(chr(0b11000 + 0o30) + '\157' + '\x33' + chr(2327 - 2273) + '\x34', 12015 - 12007), nzTpIcepk0o8(chr(48) + chr(3704 - 3593) + '\062' + chr(0b110100) + chr(0b101110 + 0o7), 38766 - 38758), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b1101111) + '\062' + chr(443 - 392) + '\067', 0b1000), nzTpIcepk0o8(chr(723 - 675) + chr(0b111100 + 0o63) + chr(0b110010) + '\x32' + '\x37', 32447 - 32439), nzTpIcepk0o8(chr(851 - 803) + '\x6f' + '\x31' + chr(0b110010) + chr(1421 - 1372), 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\062' + chr(1700 - 1651) + chr(0b110110), 65460 - 65452), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + '\x37' + chr(2500 - 2446), 18071 - 18063), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + chr(959 - 908) + chr(0b100001 + 0o26), 8), nzTpIcepk0o8(chr(316 - 268) + chr(0b1101101 + 0o2) + chr(0b110011) + chr(2735 - 2681) + chr(55), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + chr(1113 - 1059) + chr(1614 - 1566), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1872 - 1821) + chr(48) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(48) + chr(237 - 126) + chr(0b110111) + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110100) + chr(0b110000), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010) + '\x30' + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(873 - 824) + '\x35' + chr(50), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(872 - 823) + '\x33', 0o10), nzTpIcepk0o8(chr(48) + chr(5457 - 5346) + chr(51) + '\061' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062' + chr(2722 - 2667) + chr(2249 - 2194), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x33' + '\061' + chr(1547 - 1495), 10884 - 10876), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\x6f' + chr(0b110011) + '\065' + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(1099 - 1051) + chr(0b101 + 0o152) + '\063' + chr(0b110110) + chr(262 - 209), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(1384 - 1334) + '\060' + chr(51), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(698 - 647) + '\x32' + '\x31', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + chr(0b10010 + 0o40) + chr(53), 0b1000), nzTpIcepk0o8('\060' + chr(3195 - 3084) + chr(0b11101 + 0o25) + chr(50) + chr(0b11000 + 0o37), 8), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(9778 - 9667) + '\x33' + chr(53), 19927 - 19919), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b11100 + 0o27) + chr(50) + chr(50), 32449 - 32441), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + '\x32' + '\x37', 8), nzTpIcepk0o8(chr(2143 - 2095) + chr(0b1101111) + '\x33' + chr(0b11101 + 0o25) + chr(0b110001), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1010101 + 0o32) + chr(0b110011) + '\x35' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(1156 - 1108) + '\157' + '\x33' + '\x37' + chr(273 - 225), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b1010 + 0o50) + '\061' + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(650 - 601) + '\064' + chr(0b110101), 6659 - 6651), nzTpIcepk0o8('\060' + chr(111) + '\065' + '\x35', 0o10), nzTpIcepk0o8(chr(2259 - 2211) + chr(0b1010101 + 0o32) + '\x32' + chr(1650 - 1602), 51478 - 51470), nzTpIcepk0o8(chr(0b11110 + 0o22) + '\x6f' + chr(0b110010) + '\065' + '\064', 36532 - 36524), nzTpIcepk0o8(chr(805 - 757) + '\157' + chr(0b1001 + 0o50) + '\x32' + chr(0b10010 + 0o43), 0b1000), nzTpIcepk0o8(chr(366 - 318) + '\x6f' + chr(287 - 237) + chr(0b11 + 0o57) + chr(2167 - 2117), ord("\x08")), nzTpIcepk0o8(chr(188 - 140) + chr(0b1100100 + 0o13) + chr(0b101101 + 0o4) + '\x31' + chr(0b110101), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10001 + 0o44) + chr(578 - 530), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xb3'), chr(100) + '\145' + chr(0b1100 + 0o127) + '\157' + '\x64' + chr(0b1100101))(chr(12619 - 12502) + '\x74' + chr(6963 - 6861) + '\055' + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def BXHXH_QeD6rL(eemPYp2vtTSr): (eemPYp2vtTSr, M8wfvmpEewAe) = adteo9SnVbS3(eemPYp2vtTSr) if M8wfvmpEewAe[roI3spqORKae(ES5oEprVxulp(b'\xf5\x91\xc9\xef'), '\x64' + '\x65' + '\x63' + '\157' + '\144' + chr(101))(chr(6642 - 6525) + chr(0b1110100) + chr(102) + chr(0b101101) + chr(0b111000))]: v8jsMqaYV6U2(ixNx9Lw_1grO, file=roI3spqORKae(bpyfpu4kTbwL, roI3spqORKae(ES5oEprVxulp(b'\xd8\xc0\xd1\xfa\xdc\x05\xbd\xa7\xd5\xbe\x93\x89'), '\x64' + chr(10122 - 10021) + chr(0b1100011) + chr(111) + chr(9306 - 9206) + '\x65')(chr(4765 - 4648) + chr(0b1110100) + chr(2460 - 2358) + '\x2d' + chr(0b0 + 0o70)))) return nzTpIcepk0o8(chr(0b110000) + chr(10742 - 10631) + chr(726 - 677), 34713 - 34705) TseISVdPlfdM = M8wfvmpEewAe[roI3spqORKae(ES5oEprVxulp(b'\xeb\x91\xd7\xfd\xf8"\xeb'), chr(100) + chr(0b111000 + 0o55) + chr(0b11111 + 0o104) + chr(111) + chr(100) + '\145')(chr(0b10111 + 0o136) + '\x74' + chr(102) + '\x2d' + chr(56))] def dVamRRpm0eOX(PmE5_h409JAA): if TseISVdPlfdM: v8jsMqaYV6U2(PmE5_h409JAA, file=roI3spqORKae(bpyfpu4kTbwL, roI3spqORKae(ES5oEprVxulp(b'\xd8\xc0\xd1\xfa\xdc\x05\xbd\xa7\xd5\xbe\x93\x89'), chr(0b1100100) + chr(0b100000 + 0o105) + '\x63' + chr(0b1101111) + chr(100) + chr(101))(chr(0b1011110 + 0o27) + chr(116) + chr(0b1100110) + chr(45) + chr(1188 - 1132)))) return TseISVdPlfdM if roI3spqORKae(ES5oEprVxulp(b'\xee\x81\xc7\xf5\xf22\xfa\x8d\xc0\x93\x99\xb3'), chr(0b1000100 + 0o40) + '\145' + chr(0b1100011) + chr(0b1101111) + chr(2629 - 2529) + '\145')(chr(10828 - 10711) + chr(0b1110100) + chr(0b1100110) + chr(1143 - 1098) + chr(0b111000)) in M8wfvmpEewAe and M8wfvmpEewAe[roI3spqORKae(ES5oEprVxulp(b'\xee\x81\xc7\xf5\xf22\xfa\x8d\xc0\x93\x99\xb3'), '\x64' + chr(0b1100001 + 0o4) + '\x63' + '\x6f' + '\144' + '\x65')(chr(117) + chr(116) + '\x66' + '\055' + chr(0b111000))] is not None: ZqlYfKJfOdiW(M8wfvmpEewAe[roI3spqORKae(ES5oEprVxulp(b'\xee\x81\xc7\xf5\xf22\xfa\x8d\xc0\x93\x99\xb3'), '\144' + '\145' + chr(8749 - 8650) + '\157' + chr(0b1 + 0o143) + chr(0b1100101))(chr(117) + chr(0b1001 + 0o153) + chr(0b1100110) + chr(0b11000 + 0o25) + chr(0b10 + 0o66))]) (d9d_RPCJ2yBD, XeIM0M8tJsFs) = (M8wfvmpEewAe[roI3spqORKae(ES5oEprVxulp(b'\xf1\x9c\xfa\xf9\xfe=\xeb'), chr(7846 - 7746) + chr(9142 - 9041) + chr(7901 - 7802) + chr(0b1101111) + chr(0b100001 + 0o103) + chr(8673 - 8572))(chr(0b101110 + 0o107) + '\164' + '\146' + chr(0b11010 + 0o23) + chr(0b111000))], M8wfvmpEewAe[roI3spqORKae(ES5oEprVxulp(b'\xef\x9c\xfa\xf9\xfe=\xeb'), chr(100) + chr(0b1100101) + chr(630 - 531) + '\157' + '\144' + '\145')(chr(0b1110101) + chr(0b1111 + 0o145) + '\x66' + chr(275 - 230) + '\070')]) if ftfygxgFas5X(eemPYp2vtTSr) == nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110000), 0o10): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xd3\x9b\xd1\xbf\xf2?\xe1\x8b\xf8\x9f\xd0\xa0LG\xf7\x07n\xa1\xcb\xbf\xca\x85\xf1\xbe\xa3\xfey\xb7\xf3\xf0'), '\144' + chr(7302 - 7201) + '\x63' + chr(0b1101111) + chr(0b0 + 0o144) + chr(101))('\x75' + chr(116) + chr(0b1100100 + 0o2) + chr(45) + chr(0b11010 + 0o36))) elif ftfygxgFas5X(eemPYp2vtTSr) == nzTpIcepk0o8(chr(1545 - 1497) + '\157' + chr(474 - 425), 8): _zPndKq6xMgp = JL8UueCvh2T8(aHUqKstZLeS6.getenv(roI3spqORKae(ES5oEprVxulp(b'\xce\xa1\xe7\xd5\xd2\x12\xda'), chr(100) + '\145' + chr(99) + chr(0b1100011 + 0o14) + chr(0b1100100) + chr(101))('\165' + '\164' + chr(0b1010111 + 0o17) + chr(0b101101) + '\x38'))) W_MHUFAZw5kO = eemPYp2vtTSr[nzTpIcepk0o8(chr(0b110000) + chr(0b1101000 + 0o7) + '\x30', 8)] elif ftfygxgFas5X(eemPYp2vtTSr) == nzTpIcepk0o8(chr(1982 - 1934) + '\157' + chr(0b110010), 0b1000): WPAb35dCqyjo = JL8UueCvh2T8(eemPYp2vtTSr[nzTpIcepk0o8(chr(841 - 793) + chr(0b1000011 + 0o54) + chr(48), 8)]) if WPAb35dCqyjo is not None: _zPndKq6xMgp = WPAb35dCqyjo else: _zPndKq6xMgp = JL8UueCvh2T8(aHUqKstZLeS6.getenv(roI3spqORKae(ES5oEprVxulp(b'\xce\xa1\xe7\xd5\xd2\x12\xda'), '\x64' + chr(4531 - 4430) + chr(0b110001 + 0o62) + chr(111) + '\144' + chr(0b1100101))(chr(0b1110101) + chr(0b1001001 + 0o53) + chr(102) + chr(0b101101) + chr(56)))) if d9d_RPCJ2yBD is not None: XeIM0M8tJsFs = eemPYp2vtTSr[nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(111) + chr(0b110000), 8)] elif XeIM0M8tJsFs is not None: d9d_RPCJ2yBD = eemPYp2vtTSr[nzTpIcepk0o8('\060' + chr(111) + chr(0b100001 + 0o17), 8)] else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b"\xda\x9d\xd3\xfa\xf9q\xef\x8c\xf8\xd7\x99\xb2\x1eN\xed\x1e+\xae\x9f\xbf\x9f\x97\xe9\xb4\xb6\xe3'\xf2\xb2\xa2"), chr(100) + chr(0b1011000 + 0o15) + chr(0b1100011) + chr(3653 - 3542) + chr(100) + '\x65')(chr(2175 - 2058) + '\164' + '\x66' + '\x2d' + chr(718 - 662)) % eemPYp2vtTSr[nzTpIcepk0o8('\x30' + chr(0b1101101 + 0o2) + '\060', 8)]) W_MHUFAZw5kO = eemPYp2vtTSr[nzTpIcepk0o8('\x30' + chr(0b10000 + 0o137) + '\x31', 8)] elif ftfygxgFas5X(eemPYp2vtTSr) == nzTpIcepk0o8(chr(2227 - 2179) + chr(0b1101111) + '\063', 0b1000): k8oHorezQ7fZ = JL8UueCvh2T8(eemPYp2vtTSr[nzTpIcepk0o8(chr(48) + chr(111) + chr(988 - 940), 8)]) TJtFEpMxO0Sq = JL8UueCvh2T8(eemPYp2vtTSr[nzTpIcepk0o8(chr(2197 - 2149) + chr(0b1101111) + chr(0b10 + 0o57), 8)]) if k8oHorezQ7fZ is not None: _zPndKq6xMgp = k8oHorezQ7fZ if d9d_RPCJ2yBD is not None: XeIM0M8tJsFs = eemPYp2vtTSr[nzTpIcepk0o8(chr(428 - 380) + chr(0b1101111) + chr(49), 8)] elif XeIM0M8tJsFs is not None: d9d_RPCJ2yBD = eemPYp2vtTSr[nzTpIcepk0o8(chr(48) + '\157' + chr(1580 - 1531), 8)] else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xc9\x9b\xca\xbf\xfa0\xe0\x87\xbf\x96\x82\xa6KM\xe7\x04\x7f\xbc\x9f\xab\x83\x83\xe6\xbf\xef\xb78\xa1'), chr(0b1100100) + '\x65' + '\x63' + chr(0b1101111) + '\x64' + chr(9915 - 9814))(chr(117) + chr(0b1110100) + chr(9130 - 9028) + '\x2d' + '\x38') % eemPYp2vtTSr[nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061', 8)]) elif TJtFEpMxO0Sq is not None: _zPndKq6xMgp = TJtFEpMxO0Sq if d9d_RPCJ2yBD is not None: XeIM0M8tJsFs = eemPYp2vtTSr[nzTpIcepk0o8('\x30' + chr(8915 - 8804) + chr(48), 8)] elif XeIM0M8tJsFs is not None: d9d_RPCJ2yBD = eemPYp2vtTSr[nzTpIcepk0o8(chr(930 - 882) + chr(111) + chr(0b110000), 8)] else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xc9\x9b\xca\xbf\xfa0\xe0\x87\xbf\x96\x82\xa6KM\xe7\x04\x7f\xbc\x9f\xab\x83\x83\xe6\xbf\xef\xb78\xa1'), '\x64' + chr(0b1000101 + 0o40) + '\x63' + chr(0b11011 + 0o124) + chr(0b1010010 + 0o22) + '\145')(chr(13120 - 13003) + '\x74' + chr(102) + '\055' + chr(56)) % eemPYp2vtTSr[nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b1001000 + 0o47) + chr(48), 8)]) else: _zPndKq6xMgp = JL8UueCvh2T8(aHUqKstZLeS6.getenv(roI3spqORKae(ES5oEprVxulp(b'\xce\xa1\xe7\xd5\xd2\x12\xda'), '\x64' + chr(4617 - 4516) + chr(99) + chr(0b1101111) + chr(0b1010110 + 0o16) + '\x65')('\165' + chr(116) + '\x66' + chr(0b10100 + 0o31) + chr(0b1000 + 0o60)))) if d9d_RPCJ2yBD is not None or XeIM0M8tJsFs is not None: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xc9\x9b\xca\xbf\xfa0\xe0\x87\xbf\x96\x82\xa6KM\xe7\x04\x7f\xbc\x9f\xad\x84\x91\xa3\xbf\xba\xb7n\xa7\xf5\xbb\x8d\x9b\xfeEJy\xda0\xfc'), chr(0b11000 + 0o114) + chr(0b1000 + 0o135) + '\143' + chr(111) + chr(0b1001100 + 0o30) + '\x65')(chr(117) + chr(10839 - 10723) + chr(0b11000 + 0o116) + chr(874 - 829) + chr(56))) (d9d_RPCJ2yBD, XeIM0M8tJsFs) = eemPYp2vtTSr W_MHUFAZw5kO = eemPYp2vtTSr[nzTpIcepk0o8(chr(122 - 74) + '\x6f' + chr(0b110010), 8)] elif ftfygxgFas5X(eemPYp2vtTSr) == nzTpIcepk0o8('\x30' + chr(0b101001 + 0o106) + chr(0b11001 + 0o33), 0b1000): if d9d_RPCJ2yBD is not None or XeIM0M8tJsFs is not None: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xc9\x9b\xca\xbf\xfa0\xe0\x87\xbf\x96\x82\xa6KM\xe7\x04\x7f\xbc\x9f\xad\x84\x91\xa3\xbf\xba\xb7n\xa7\xf5\xbb\x8d\x9b\xfeEJy\xda0\xfc'), chr(100) + chr(0b110010 + 0o63) + chr(99) + chr(4319 - 4208) + '\x64' + chr(9254 - 9153))(chr(12798 - 12681) + chr(10210 - 10094) + '\x66' + chr(1350 - 1305) + chr(56))) QyZJk_QjIIUy = ltB3XhPy2rYf((ZlbFMSG8gCoF for (ZlbFMSG8gCoF, AQ9ceR9AaoT1) in _kV_Bomx8PZ4(eemPYp2vtTSr) if JL8UueCvh2T8(AQ9ceR9AaoT1) is not None), None) if QyZJk_QjIIUy is None: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xd3\x9b\x85\xec\xe23\xe4\x9b\xfc\x83\xd0\xa6WV\xe7\x04'), chr(100) + '\145' + chr(0b110111 + 0o54) + chr(0b1101111) + chr(0b100010 + 0o102) + chr(101))('\165' + chr(10897 - 10781) + chr(102) + chr(90 - 45) + chr(0b101001 + 0o17))) _zPndKq6xMgp = JL8UueCvh2T8(eemPYp2vtTSr[QyZJk_QjIIUy]) del eemPYp2vtTSr[QyZJk_QjIIUy] (d9d_RPCJ2yBD, XeIM0M8tJsFs, W_MHUFAZw5kO) = eemPYp2vtTSr else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xc9\x9b\xca\xbf\xfa0\xe0\x87\xbf\x96\x82\xa6KM\xe7\x04\x7f\xbc\x9f\xbc\x98\x9a\xf5\xb8\xb1\xf2y\xf3'), '\x64' + '\x65' + chr(0b1100011) + chr(111) + '\144' + chr(0b1100101))(chr(0b1110101) + '\164' + chr(0b111111 + 0o47) + chr(45) + '\070')) if _zPndKq6xMgp is None: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xd3\x9b\x85\xec\xe23\xe4\x9b\xfc\x83\xd0\xb2NE\xe1\x03m\xa6\xda\xa8\xca\x9a\xf1\xf1\xb3\xf8h\xbc\xf3\xf1\x81\x96\xaaA~E\xee\x1f\xd7\x0e\xc9'), chr(100) + '\x65' + chr(1537 - 1438) + '\157' + chr(100) + chr(0b101110 + 0o67))(chr(1740 - 1623) + chr(3532 - 3416) + chr(768 - 666) + chr(45) + chr(0b100011 + 0o25))) if d9d_RPCJ2yBD is None and XeIM0M8tJsFs is None: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xd3\x9b\x85\xec\xe2#\xe8\x9f\xfc\x92\x83\xe1NR\xed\x1cb\xab\xda\xa8'), chr(100) + '\145' + chr(0b10 + 0o141) + chr(0b1101111) + '\x64' + chr(101))(chr(0b1110101) + '\x74' + chr(0b1100110 + 0o0) + '\055' + '\x38')) e5rcHW8hR5dL = M8wfvmpEewAe[roI3spqORKae(ES5oEprVxulp(b'\xf0\x91\xd1\xf7\xf85'), chr(709 - 609) + '\145' + chr(0b1100011) + '\x6f' + chr(0b1100100) + '\x65')('\x75' + chr(6811 - 6695) + chr(0b1000010 + 0o44) + '\x2d' + chr(0b110100 + 0o4))].Xn8ENWMZdIRt() if e5rcHW8hR5dL not in [roI3spqORKae(ES5oEprVxulp(b'\xf1\x9d\xcb\xfa\xf6#'), chr(0b1011010 + 0o12) + '\x65' + '\x63' + chr(2989 - 2878) + '\144' + chr(101))(chr(8614 - 8497) + chr(116) + '\146' + '\x2d' + chr(0b11010 + 0o36)), roI3spqORKae(ES5oEprVxulp(b'\xf1\x9d\xcb\xfa\xe4'), '\144' + chr(0b11111 + 0o106) + '\x63' + '\x6f' + '\x64' + chr(0b1001100 + 0o31))('\165' + '\164' + chr(102) + '\055' + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xf3\x91\xc4\xed\xf2"\xfa'), chr(0b111111 + 0o45) + chr(7114 - 7013) + chr(0b1100011) + chr(111) + chr(5684 - 5584) + chr(0b1100101))(chr(117) + '\x74' + chr(0b111 + 0o137) + chr(393 - 348) + chr(1906 - 1850)), roI3spqORKae(ES5oEprVxulp(b'\xfc\x81\xd1\xf0'), '\x64' + chr(1506 - 1405) + '\x63' + chr(111) + chr(0b1100100) + chr(101))('\165' + chr(4945 - 4829) + '\x66' + chr(0b1010 + 0o43) + chr(56))]: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xc8\x9a\xd6\xea\xe7!\xe1\x8c\xeb\x92\x94\xe1SE\xf6\x02d\xab\x85\xec\xcf\x86'), chr(0b10010 + 0o122) + chr(1911 - 1810) + chr(0b1010100 + 0o17) + chr(0b1101111) + chr(0b1010010 + 0o22) + chr(101))(chr(117) + chr(0b1110100) + '\x66' + '\055' + chr(0b101000 + 0o20)) % e5rcHW8hR5dL) if M8wfvmpEewAe[roI3spqORKae(ES5oEprVxulp(b'\xf9\x80\xdc\xef\xf2'), chr(5129 - 5029) + chr(101) + chr(0b1100011) + chr(0b1011100 + 0o23) + '\144' + '\x65')(chr(117) + chr(116) + chr(0b1011 + 0o133) + '\055' + chr(0b111000))] is None: HY_mwZTwsNwl = None elif roI3spqORKae(M8wfvmpEewAe[roI3spqORKae(ES5oEprVxulp(b'\xf9\x80\xdc\xef\xf2'), chr(0b1100100) + '\145' + chr(0b111101 + 0o46) + chr(0b1101111) + '\x64' + chr(0b1100101))('\x75' + '\164' + chr(7538 - 7436) + chr(0b101101) + chr(2898 - 2842))], roI3spqORKae(ES5oEprVxulp(b'\xc5\x9a\x9d\xda\xd9\x06\xc3\xa4\xfb\xbe\xa2\xb5'), chr(0b100011 + 0o101) + chr(0b1100000 + 0o5) + '\143' + chr(0b0 + 0o157) + chr(100) + chr(0b101111 + 0o66))(chr(0b1110101) + '\164' + chr(9750 - 9648) + chr(1230 - 1185) + chr(0b111000)))() == roI3spqORKae(ES5oEprVxulp(b'\xfb\x98\xca\xfe\xe3'), chr(0b1100100) + '\145' + chr(99) + chr(111) + '\x64' + '\145')(chr(0b1100101 + 0o20) + chr(0b1010111 + 0o35) + chr(6978 - 6876) + chr(0b10101 + 0o30) + chr(2018 - 1962)): HY_mwZTwsNwl = nDF4gVNx0u9Q.float32 elif roI3spqORKae(M8wfvmpEewAe[roI3spqORKae(ES5oEprVxulp(b'\xf9\x80\xdc\xef\xf2'), '\144' + chr(0b1100101) + chr(0b1001 + 0o132) + chr(111) + chr(0b11101 + 0o107) + chr(6226 - 6125))('\165' + chr(5455 - 5339) + chr(102) + chr(45) + chr(0b100 + 0o64))], roI3spqORKae(ES5oEprVxulp(b'\xc5\x9a\x9d\xda\xd9\x06\xc3\xa4\xfb\xbe\xa2\xb5'), chr(4124 - 4024) + chr(101) + chr(99) + chr(10163 - 10052) + chr(0b1000111 + 0o35) + '\145')(chr(0b110110 + 0o77) + '\164' + chr(0b111001 + 0o55) + '\055' + chr(56)))() == roI3spqORKae(ES5oEprVxulp(b'\xf4\x9a\xd1'), chr(100) + '\x65' + '\143' + chr(0b1000011 + 0o54) + chr(0b110010 + 0o62) + chr(0b1100101))(chr(0b1110101) + chr(7731 - 7615) + '\x66' + chr(0b101101 + 0o0) + chr(0b111000)): HY_mwZTwsNwl = nDF4gVNx0u9Q.int32 else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xc9\x8d\xd5\xfa\xb70\xfc\x99\xea\x9a\x95\xafJ\x00\xef\x1fx\xbb\x9f\xae\x8f\xd5\xe5\xbd\xba\xf6i\xf2\xf8\xa3\xc8\x91\xe4\x11'), chr(0b1000101 + 0o37) + '\145' + chr(0b11 + 0o140) + chr(0b1000100 + 0o53) + chr(0b111111 + 0o45) + '\145')(chr(117) + chr(0b1110100) + chr(0b1001100 + 0o32) + '\055' + '\070')) if e5rcHW8hR5dL == roI3spqORKae(ES5oEprVxulp(b'\xfc\x81\xd1\xf0'), chr(0b1 + 0o143) + '\x65' + '\x63' + chr(0b1000111 + 0o50) + chr(0b1100100) + '\x65')('\x75' + '\x74' + chr(0b1100110) + chr(0b101101) + chr(56)): if HY_mwZTwsNwl is roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xfb\x98\xca\xfe\xe3b\xbc'), chr(0b1100100) + chr(0b1000110 + 0o37) + chr(0b100110 + 0o75) + chr(0b1101111) + chr(3814 - 3714) + chr(0b101100 + 0o71))('\x75' + '\164' + chr(5323 - 5221) + chr(45) + chr(56))): e5rcHW8hR5dL = roI3spqORKae(ES5oEprVxulp(b'\xf1\x9d\xcb\xfa\xf6#'), '\x64' + chr(0b1100101) + chr(99) + '\157' + chr(0b1100100) + chr(0b1100101))('\x75' + chr(116) + chr(0b111010 + 0o54) + chr(0b101101) + chr(2577 - 2521)) elif HY_mwZTwsNwl is roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xf4\x9a\xd1\xac\xa5'), '\144' + chr(0b10110 + 0o117) + chr(0b1100011) + '\157' + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(8156 - 8054) + chr(1846 - 1801) + '\070')): e5rcHW8hR5dL = roI3spqORKae(ES5oEprVxulp(b'\xf3\x91\xc4\xed\xf2"\xfa'), chr(7168 - 7068) + chr(101) + chr(0b100100 + 0o77) + '\157' + chr(0b1100100) + chr(0b1100101))(chr(0b1001101 + 0o50) + chr(10943 - 10827) + chr(8494 - 8392) + chr(0b1010 + 0o43) + chr(56)) else: e5rcHW8hR5dL = roI3spqORKae(ES5oEprVxulp(b'\xf1\x9d\xcb\xfa\xf6#'), '\x64' + chr(6491 - 6390) + chr(4869 - 4770) + chr(111) + '\x64' + '\145')('\x75' + chr(561 - 445) + chr(102) + '\055' + '\070') dVamRRpm0eOX(roI3spqORKae(ES5oEprVxulp(b'\xcf\x91\xc4\xfb\xfe?\xe9\xde\xec\x82\x82\xa7_C\xe7\x19%\xe1\x91'), chr(1934 - 1834) + chr(101) + chr(8253 - 8154) + chr(0b1101111) + chr(0b101011 + 0o71) + '\x65')(chr(117) + chr(116) + chr(662 - 560) + '\x2d' + '\x38')) (CAiS90HLyGDX, MxcHT8QGGjHk) = (None, None) if d9d_RPCJ2yBD is not None: dVamRRpm0eOX(roI3spqORKae(ES5oEprVxulp(b'\xbd\xd4\x85\xb2\xb7\x03\xeb\x9f\xfb\x9e\x9e\xa6\x1el\xcaJm\xa6\xd3\xa9\xd0\xd5\xa6\xa2'), chr(7791 - 7691) + chr(2431 - 2330) + '\x63' + '\157' + chr(100) + '\145')(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(0b101101) + chr(0b111000)) % d9d_RPCJ2yBD) CAiS90HLyGDX = guh1shc0WwXT(d9d_RPCJ2yBD) if XeIM0M8tJsFs is not None: dVamRRpm0eOX(roI3spqORKae(ES5oEprVxulp(b'\xbd\xd4\x85\xb2\xb7\x03\xeb\x9f\xfb\x9e\x9e\xa6\x1er\xcaJm\xa6\xd3\xa9\xd0\xd5\xa6\xa2'), '\x64' + '\145' + '\143' + '\157' + '\x64' + chr(0b1100101))(chr(117) + chr(0b1101011 + 0o11) + chr(0b1010011 + 0o23) + chr(1667 - 1622) + chr(0b111000)) % XeIM0M8tJsFs) MxcHT8QGGjHk = guh1shc0WwXT(XeIM0M8tJsFs) (LMcCiF4czwpp, nRSX3HCpSIw0) = (MxcHT8QGGjHk, roI3spqORKae(ES5oEprVxulp(b'\xef\x9c'), '\144' + chr(101) + chr(99) + chr(0b1101111) + '\x64' + '\145')(chr(117) + chr(8504 - 8388) + chr(0b111000 + 0o56) + chr(0b101101) + '\x38')) if CAiS90HLyGDX is None else (CAiS90HLyGDX, roI3spqORKae(ES5oEprVxulp(b'\xf1\x9c'), chr(0b1100100) + chr(9371 - 9270) + chr(8747 - 8648) + '\x6f' + chr(0b100010 + 0o102) + '\x65')(chr(0b1110010 + 0o3) + '\x74' + '\x66' + chr(45) + chr(1492 - 1436))) if MxcHT8QGGjHk is None else ((CAiS90HLyGDX, MxcHT8QGGjHk), None) _zPndKq6xMgp = NybBYFIJq0hU(_zPndKq6xMgp) dVamRRpm0eOX(roI3spqORKae(ES5oEprVxulp(b'\xda\x91\xcb\xfa\xe50\xfa\x97\xf1\x90\xd0\xb7QL\xf7\x07n\xe1\x91\xe2'), chr(100) + '\x65' + '\143' + chr(0b1101111) + chr(5929 - 5829) + chr(101))('\x75' + '\164' + chr(0b1100110) + chr(1402 - 1357) + chr(56))) RPCRorQZSDUy = _zPndKq6xMgp.cortex_to_image(LMcCiF4czwpp, hemi=nRSX3HCpSIw0, method=e5rcHW8hR5dL, fill=M8wfvmpEewAe[roI3spqORKae(ES5oEprVxulp(b'\xfb\x9d\xc9\xf3'), chr(3386 - 3286) + chr(5264 - 5163) + '\143' + '\157' + '\144' + chr(0b1100101))(chr(117) + chr(116) + '\x66' + '\055' + chr(56))], dtype=HY_mwZTwsNwl) dVamRRpm0eOX(roI3spqORKae(ES5oEprVxulp(b'\xd8\x8c\xd5\xf0\xe5%\xe7\x90\xf8\xd7\x86\xaeRU\xef\x0f+\xa9\xd6\xa0\x8f\xcf\xa3\xf4\xa6'), '\144' + '\145' + chr(0b1100011) + chr(0b1101111) + '\x64' + chr(0b1010010 + 0o23))('\165' + chr(152 - 36) + chr(3949 - 3847) + chr(1674 - 1629) + chr(0b11110 + 0o32)) % W_MHUFAZw5kO) mwgZMvWSpAHg(W_MHUFAZw5kO, RPCRorQZSDUy, affine=roI3spqORKae(_zPndKq6xMgp, roI3spqORKae(ES5oEprVxulp(b'\xeb\x9b\xdd\xfa\xfb\x0e\xfa\x91\xc0\x99\x91\xb5WV\xe75f\xae\xcb\xbe\x83\x8d'), chr(0b1100100) + '\145' + chr(0b1100011) + chr(0b1100001 + 0o16) + chr(0b101 + 0o137) + chr(114 - 13))('\165' + '\164' + '\x66' + chr(1627 - 1582) + chr(56)))) dVamRRpm0eOX(roI3spqORKae(ES5oEprVxulp(b'\xee\x81\xd7\xf9\xf62\xeb\xa1\xeb\x98\xaf\xa8SA\xe5\x0f+\xac\xd0\xa1\x9a\x99\xe6\xa5\xb0\xb6'), '\x64' + chr(1866 - 1765) + '\x63' + chr(111) + chr(0b1100100) + '\145')(chr(11071 - 10954) + chr(9914 - 9798) + '\x66' + chr(45) + chr(0b111000))) return nzTpIcepk0o8('\060' + '\157' + chr(0b110000), 8)
noahbenson/neuropythy
neuropythy/__init__.py
reload_neuropythy
def reload_neuropythy(): ''' reload_neuropythy() reloads all of the modules of neuropythy and returns the reloaded neuropythy module. This is similar to reload(neuropythy) except that it reloads all the neuropythy submodules prior to reloading neuropythy. Example: import neuropythy as ny # ... some nonsense that breaks the library ... ny = ny.reload_neuropythy() ''' import sys, six if not six.PY2: try: from importlib import reload except Exception: from imp import reload for mdl in submodules: if mdl in sys.modules: sys.modules[mdl] = reload(sys.modules[mdl]) return reload(sys.modules['neuropythy'])
python
def reload_neuropythy(): ''' reload_neuropythy() reloads all of the modules of neuropythy and returns the reloaded neuropythy module. This is similar to reload(neuropythy) except that it reloads all the neuropythy submodules prior to reloading neuropythy. Example: import neuropythy as ny # ... some nonsense that breaks the library ... ny = ny.reload_neuropythy() ''' import sys, six if not six.PY2: try: from importlib import reload except Exception: from imp import reload for mdl in submodules: if mdl in sys.modules: sys.modules[mdl] = reload(sys.modules[mdl]) return reload(sys.modules['neuropythy'])
[ "def", "reload_neuropythy", "(", ")", ":", "import", "sys", ",", "six", "if", "not", "six", ".", "PY2", ":", "try", ":", "from", "importlib", "import", "reload", "except", "Exception", ":", "from", "imp", "import", "reload", "for", "mdl", "in", "submodul...
reload_neuropythy() reloads all of the modules of neuropythy and returns the reloaded neuropythy module. This is similar to reload(neuropythy) except that it reloads all the neuropythy submodules prior to reloading neuropythy. Example: import neuropythy as ny # ... some nonsense that breaks the library ... ny = ny.reload_neuropythy()
[ "reload_neuropythy", "()", "reloads", "all", "of", "the", "modules", "of", "neuropythy", "and", "returns", "the", "reloaded", "neuropythy", "module", ".", "This", "is", "similar", "to", "reload", "(", "neuropythy", ")", "except", "that", "it", "reloads", "all"...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/__init__.py#L44-L62
train
Reloads all of the modules of neuropythy and returns the reloaded module.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrD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,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + chr(1024 - 969) + chr(53), 0b1000), nzTpIcepk0o8(chr(1993 - 1945) + chr(111) + chr(0b11111 + 0o24) + chr(0b1 + 0o66) + '\062', 40888 - 40880), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x34' + chr(51), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + '\065' + chr(55), ord("\x08")), nzTpIcepk0o8('\060' + chr(8233 - 8122) + chr(0b1100 + 0o45) + chr(0b110101) + chr(0b110011 + 0o2), 0o10), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\157' + chr(1648 - 1599) + chr(767 - 715) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + chr(456 - 404) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(1828 - 1780) + '\157' + chr(0b110010) + chr(0b110011) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b10000 + 0o40) + '\x6f' + chr(0b110100) + '\x35', 0o10), nzTpIcepk0o8('\x30' + chr(1098 - 987) + '\061' + chr(931 - 876), 0b1000), nzTpIcepk0o8(chr(158 - 110) + chr(0b1101111) + '\066' + '\063', 16869 - 16861), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(51) + '\x31' + '\065', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010), 0o10), nzTpIcepk0o8(chr(388 - 340) + chr(6070 - 5959) + chr(261 - 211) + '\062' + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\157' + chr(49) + chr(0b10100 + 0o43) + '\x37', 0b1000), nzTpIcepk0o8('\060' + chr(0b1001111 + 0o40) + chr(0b111 + 0o53) + '\066' + '\x35', 0b1000), nzTpIcepk0o8(chr(0b100101 + 0o13) + '\157' + chr(1919 - 1869) + '\062' + chr(2356 - 2305), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(0b110100) + '\061', ord("\x08")), nzTpIcepk0o8(chr(1801 - 1753) + chr(12122 - 12011) + chr(50) + '\x32' + '\062', 30197 - 30189), nzTpIcepk0o8(chr(313 - 265) + '\x6f' + chr(0b10000 + 0o42) + chr(0b110100) + chr(1826 - 1777), 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110110) + '\063', 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + '\062' + chr(1141 - 1092), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + '\x35', ord("\x08")), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b1101111) + chr(0b110001) + '\063' + chr(0b101011 + 0o14), 0o10), nzTpIcepk0o8('\x30' + chr(4585 - 4474) + '\063' + chr(0b110010) + chr(1987 - 1934), 0b1000), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(6826 - 6715) + '\063' + chr(0b10110 + 0o40) + '\x34', 26966 - 26958), nzTpIcepk0o8('\060' + chr(0b110110 + 0o71) + chr(0b110011) + chr(0b110100) + '\067', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b101101 + 0o102) + chr(0b110010) + chr(0b101000 + 0o12) + chr(0b110101), 32308 - 32300), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + chr(49) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b100001 + 0o22) + chr(50) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b11111 + 0o22) + chr(0b10000 + 0o45) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b110010 + 0o75) + chr(0b110011) + chr(55) + chr(0b110100), 4749 - 4741), nzTpIcepk0o8('\060' + chr(8385 - 8274) + '\x35' + chr(2490 - 2439), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\061' + '\065' + chr(2788 - 2735), 8), nzTpIcepk0o8(chr(1004 - 956) + '\x6f' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(0b1101111) + chr(0b100011 + 0o16) + '\063' + chr(0b11 + 0o64), 8), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(111) + chr(328 - 278) + chr(49) + '\067', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1637 - 1586) + chr(52) + chr(0b110001), 8), nzTpIcepk0o8('\060' + '\157' + chr(1645 - 1595) + chr(0b100010 + 0o16) + '\061', 56926 - 56918), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + chr(55) + chr(0b10111 + 0o33), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(111) + '\x35' + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'S'), chr(5821 - 5721) + chr(101) + chr(0b1100011) + chr(0b1100 + 0o143) + '\x64' + chr(7251 - 7150))(chr(0b1000101 + 0o60) + chr(0b1110100) + chr(0b1100110) + '\055' + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def F8lSH60ILjpY(): (bpyfpu4kTbwL,) = (zGgTE_CdZfvi(roI3spqORKae(ES5oEprVxulp(b'\x0e\x83P'), '\x64' + '\145' + chr(99) + chr(0b1010011 + 0o34) + chr(0b1001110 + 0o26) + chr(101))(chr(1479 - 1362) + chr(116) + chr(102) + chr(45) + chr(56))),) (YVS_F7_wWn_o,) = (zGgTE_CdZfvi(roI3spqORKae(ES5oEprVxulp(b'\x0e\x93['), chr(7810 - 7710) + '\145' + '\x63' + '\157' + chr(100) + '\145')('\x75' + chr(0b0 + 0o164) + chr(0b1001011 + 0o33) + chr(45) + '\x38')),) if not roI3spqORKae(YVS_F7_wWn_o, roI3spqORKae(ES5oEprVxulp(b'-\xa3\x11'), chr(2017 - 1917) + '\x65' + '\x63' + chr(2159 - 2048) + chr(0b1100100) + '\x65')('\x75' + chr(0b1011001 + 0o33) + '\x66' + '\055' + chr(0b111000))): try: (b8ey7h5UNb9U,) = (roI3spqORKae(rFFUeiYWzOhx(roI3spqORKae(ES5oEprVxulp(b'\x14\x97S\x80\x1f\x11\x8d\xf6G'), chr(0b1100100) + chr(7049 - 6948) + '\x63' + '\157' + chr(0b1100100) + chr(0b1100101))(chr(0b1011010 + 0o33) + chr(7853 - 7737) + chr(102) + chr(0b101101) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\x0f\x9fO\x80\x0c\x01'), '\144' + chr(0b1100101) + chr(99) + chr(10338 - 10227) + '\x64' + '\x65')('\x75' + chr(0b1011001 + 0o33) + '\x66' + '\055' + '\070')), roI3spqORKae(ES5oEprVxulp(b'\x0f\x9fO\x80\x0c\x01'), chr(0b1100100) + chr(10163 - 10062) + chr(3776 - 3677) + '\157' + chr(8601 - 8501) + chr(6310 - 6209))('\165' + '\x74' + chr(3111 - 3009) + chr(0b101100 + 0o1) + chr(0b10001 + 0o47))),) except zfo2Sgkz3IVJ: (b8ey7h5UNb9U,) = (roI3spqORKae(rFFUeiYWzOhx(roI3spqORKae(ES5oEprVxulp(b'\x14\x97S'), chr(0b1100100) + chr(101) + chr(99) + '\x6f' + chr(100) + chr(0b10000 + 0o125))(chr(117) + chr(0b1110100) + '\146' + chr(0b101101) + chr(785 - 729)), roI3spqORKae(ES5oEprVxulp(b'\x0f\x9fO\x80\x0c\x01'), '\144' + chr(0b101101 + 0o70) + '\x63' + chr(111) + chr(9984 - 9884) + chr(0b111111 + 0o46))(chr(0b1110101) + chr(116) + chr(102) + chr(0b101101) + chr(0b110010 + 0o6))), roI3spqORKae(ES5oEprVxulp(b'\x0f\x9fO\x80\x0c\x01'), chr(3533 - 3433) + '\x65' + chr(7234 - 7135) + '\157' + '\x64' + chr(1929 - 1828))(chr(0b110001 + 0o104) + chr(11279 - 11163) + chr(3894 - 3792) + chr(1197 - 1152) + chr(2318 - 2262))),) for AyfNy9MUxk6F in gdo_L1zagtWB: if AyfNy9MUxk6F in roI3spqORKae(bpyfpu4kTbwL, roI3spqORKae(ES5oEprVxulp(b'9\x8ev\x82&\x0b\x98\xdaL9c\x98'), chr(0b11000 + 0o114) + '\145' + chr(99) + '\x6f' + chr(0b11 + 0o141) + chr(101))(chr(9760 - 9643) + '\x74' + '\x66' + chr(45) + chr(0b111000))): bpyfpu4kTbwL.DtUmKnyEi6PU[AyfNy9MUxk6F] = b8ey7h5UNb9U(bpyfpu4kTbwL.DtUmKnyEi6PU[AyfNy9MUxk6F]) return b8ey7h5UNb9U(roI3spqORKae(bpyfpu4kTbwL, roI3spqORKae(ES5oEprVxulp(b'9\x8ev\x82&\x0b\x98\xdaL9c\x98'), chr(1261 - 1161) + chr(101) + chr(0b1100011) + '\x6f' + chr(100) + chr(101))('\x75' + '\x74' + chr(102) + '\055' + chr(2685 - 2629)))[roI3spqORKae(ES5oEprVxulp(b'\x13\x9fV\x9d\x02\x15\x98\xebMv'), '\x64' + chr(0b1100101) + '\143' + '\x6f' + '\144' + '\x65')(chr(0b1000 + 0o155) + chr(0b111101 + 0o67) + chr(2375 - 2273) + '\x2d' + chr(2570 - 2514))])
noahbenson/neuropythy
neuropythy/java/__init__.py
serialize_numpy
def serialize_numpy(m, t): ''' serialize_numpy(m, type) converts the numpy array m into a byte stream that can be read by the nben.util.Py4j Java class. The function assumes that the type of the array needn't be encoded in the bytearray itself. The bytearray will begin with an integer, the number of dimensions, followed by that number of integers (the dimension sizes themselves) then the bytes of the array, flattened. The argument type gives the type of the array to be transferred and must be 'i' for integer or 'd' for double (or any other string accepted by array.array()). ''' # Start with the header: <number of dimensions> <dim1-size> <dim2-size> ... header = array('i', [len(m.shape)] + list(m.shape)) # Now, we can do the array itself, just flattened body = array(t, m.flatten().tolist()) # Wrap bytes if necessary... if sys.byteorder != 'big': header.byteswap() body.byteswap() # And return the result: return bytearray(header.tostring() + body.tostring())
python
def serialize_numpy(m, t): ''' serialize_numpy(m, type) converts the numpy array m into a byte stream that can be read by the nben.util.Py4j Java class. The function assumes that the type of the array needn't be encoded in the bytearray itself. The bytearray will begin with an integer, the number of dimensions, followed by that number of integers (the dimension sizes themselves) then the bytes of the array, flattened. The argument type gives the type of the array to be transferred and must be 'i' for integer or 'd' for double (or any other string accepted by array.array()). ''' # Start with the header: <number of dimensions> <dim1-size> <dim2-size> ... header = array('i', [len(m.shape)] + list(m.shape)) # Now, we can do the array itself, just flattened body = array(t, m.flatten().tolist()) # Wrap bytes if necessary... if sys.byteorder != 'big': header.byteswap() body.byteswap() # And return the result: return bytearray(header.tostring() + body.tostring())
[ "def", "serialize_numpy", "(", "m", ",", "t", ")", ":", "# Start with the header: <number of dimensions> <dim1-size> <dim2-size> ...", "header", "=", "array", "(", "'i'", ",", "[", "len", "(", "m", ".", "shape", ")", "]", "+", "list", "(", "m", ".", "shape", ...
serialize_numpy(m, type) converts the numpy array m into a byte stream that can be read by the nben.util.Py4j Java class. The function assumes that the type of the array needn't be encoded in the bytearray itself. The bytearray will begin with an integer, the number of dimensions, followed by that number of integers (the dimension sizes themselves) then the bytes of the array, flattened. The argument type gives the type of the array to be transferred and must be 'i' for integer or 'd' for double (or any other string accepted by array.array()).
[ "serialize_numpy", "(", "m", "type", ")", "converts", "the", "numpy", "array", "m", "into", "a", "byte", "stream", "that", "can", "be", "read", "by", "the", "nben", ".", "util", ".", "Py4j", "Java", "class", ".", "The", "function", "assumes", "that", "...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/java/__init__.py#L32-L51
train
Serializes a numpy array into a byte stream that can be read by the nben. util. Py4j Java class.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsed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M0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(111) + '\x33' + chr(50) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(2145 - 2097) + chr(111) + '\063' + '\x32' + chr(0b101 + 0o57), 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\157' + chr(0b110010) + chr(0b110101) + chr(0b110111), 26317 - 26309), nzTpIcepk0o8('\x30' + chr(111) + chr(383 - 332) + chr(0b110101) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(0b11 + 0o154) + '\062' + chr(1653 - 1604) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(54) + '\x35', 37052 - 37044), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(8997 - 8886) + chr(50) + chr(0b110000) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + '\x35' + '\067', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(2531 - 2420) + chr(0b101101 + 0o5) + chr(0b110100) + chr(0b101001 + 0o11), 21509 - 21501), nzTpIcepk0o8('\060' + chr(3345 - 3234) + '\x31' + '\x31' + '\x34', 10872 - 10864), nzTpIcepk0o8(chr(1351 - 1303) + '\x6f' + chr(0b100100 + 0o16) + '\x34' + chr(53), 0o10), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(6605 - 6494) + '\x32' + chr(0b110010) + '\x31', 0o10), nzTpIcepk0o8(chr(918 - 870) + chr(10189 - 10078) + chr(1475 - 1424) + '\060' + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\157' + chr(49) + chr(0b110010) + '\x36', 10658 - 10650), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b10111 + 0o33) + chr(0b110010 + 0o4) + '\062', 31028 - 31020), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b11100 + 0o32) + chr(0b111 + 0o56), ord("\x08")), nzTpIcepk0o8(chr(2270 - 2222) + chr(0b1101111) + chr(667 - 618) + chr(2625 - 2572) + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + '\x33' + '\065', 18920 - 18912), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\157' + chr(0b110100) + chr(55), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1100001 + 0o16) + chr(1548 - 1495) + '\065', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(51) + chr(2116 - 2067) + '\064', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101011 + 0o10) + chr(0b101100 + 0o12) + chr(50), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(51) + chr(0b1 + 0o57) + chr(0b110001), 8), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + chr(0b110000) + chr(0b1001 + 0o52), 27978 - 27970), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x35' + '\060', 0b1000), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\x6f' + chr(2586 - 2535) + '\064' + chr(55), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + chr(0b110101) + chr(53), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b11000 + 0o127) + chr(51) + '\064', 0o10), nzTpIcepk0o8(chr(1689 - 1641) + '\157' + chr(0b100001 + 0o20) + chr(0b11100 + 0o31) + chr(0b110100), 35928 - 35920), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + '\x32' + chr(0b1111 + 0o44), 62227 - 62219), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + chr(49) + chr(2176 - 2124), 8), nzTpIcepk0o8('\x30' + chr(111) + chr(0b10111 + 0o37) + chr(52), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(10008 - 9897) + chr(49) + chr(1403 - 1351) + chr(353 - 302), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b10 + 0o61) + chr(2911 - 2857) + '\x32', 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + chr(0b110 + 0o52) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(1568 - 1520) + chr(0b1001010 + 0o45) + '\x35' + '\x34', 28962 - 28954), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(111) + chr(0b110011 + 0o4) + '\x34', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101110 + 0o1) + chr(49) + chr(2033 - 1982), 30458 - 30450), nzTpIcepk0o8(chr(0b110000) + chr(0b10111 + 0o130) + chr(50) + '\x32' + chr(925 - 873), 0o10), nzTpIcepk0o8('\060' + chr(0b1010010 + 0o35) + chr(0b1000 + 0o52) + chr(1331 - 1281) + '\x31', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(53) + chr(0b110000), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xfc'), chr(100) + chr(0b1011 + 0o132) + '\143' + chr(9788 - 9677) + chr(0b1100100) + chr(0b1 + 0o144))('\165' + chr(0b1100 + 0o150) + '\x66' + '\x2d' + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Gol4a2Ap7Wv_(tF75nqoNENFL, h3Vc_4wxEbgd): jkp_M8Pp8CIt = Tn6rGr7XTM7t(roI3spqORKae(ES5oEprVxulp(b'\xbb'), '\144' + chr(0b1100101) + chr(99) + chr(7121 - 7010) + '\x64' + chr(6232 - 6131))(chr(117) + chr(1806 - 1690) + '\146' + chr(0b1 + 0o54) + chr(2784 - 2728)), [ftfygxgFas5X(tF75nqoNENFL.lhbM092AFW8f)] + H4NoA26ON7iG(tF75nqoNENFL.lhbM092AFW8f)) ryRPGaxqs24n = Tn6rGr7XTM7t(h3Vc_4wxEbgd, tF75nqoNENFL.flatten().tolist()) if roI3spqORKae(bpyfpu4kTbwL, roI3spqORKae(ES5oEprVxulp(b'\xb0\xad\xdb\x8e\xe4\x87\xe4\n\xd0'), '\x64' + '\145' + chr(0b1100011) + chr(0b11100 + 0o123) + chr(100) + chr(2389 - 2288))(chr(117) + '\x74' + chr(102) + chr(0b11111 + 0o16) + chr(0b111000))) != roI3spqORKae(ES5oEprVxulp(b'\xb0\xbd\xc8'), '\x64' + chr(101) + chr(0b1001 + 0o132) + chr(0b1011011 + 0o24) + chr(6737 - 6637) + '\x65')('\165' + chr(0b1110100) + chr(0b1100110) + chr(0b10011 + 0o32) + '\070'): roI3spqORKae(jkp_M8Pp8CIt, roI3spqORKae(ES5oEprVxulp(b'\xb0\xad\xdb\x8e\xf8\x82\xe1\x1f'), chr(0b101101 + 0o67) + '\145' + chr(0b1100011) + chr(0b1101111) + chr(1848 - 1748) + chr(101))(chr(12112 - 11995) + '\164' + chr(0b1100110) + chr(0b101101) + chr(3042 - 2986)))() roI3spqORKae(ryRPGaxqs24n, roI3spqORKae(ES5oEprVxulp(b'\xb0\xad\xdb\x8e\xf8\x82\xe1\x1f'), chr(2389 - 2289) + '\145' + chr(9398 - 9299) + chr(0b10101 + 0o132) + '\144' + chr(0b1010100 + 0o21))(chr(11269 - 11152) + '\164' + chr(5464 - 5362) + '\x2d' + chr(0b11 + 0o65)))() return MdkNqd1bagO6(roI3spqORKae(jkp_M8Pp8CIt, roI3spqORKae(ES5oEprVxulp(b'\xa6\xbb\xdc\x9f\xf9\x9c\xee\x08'), chr(0b11111 + 0o105) + chr(0b1100101) + '\x63' + '\x6f' + chr(0b110011 + 0o61) + chr(3535 - 3434))('\x75' + '\164' + chr(102) + '\x2d' + chr(2492 - 2436)))() + roI3spqORKae(ryRPGaxqs24n, roI3spqORKae(ES5oEprVxulp(b'\xa6\xbb\xdc\x9f\xf9\x9c\xee\x08'), chr(0b1100100) + '\145' + chr(590 - 491) + chr(0b1101111) + '\x64' + chr(0b1100101))('\165' + '\164' + '\146' + '\055' + chr(56)))())
noahbenson/neuropythy
neuropythy/java/__init__.py
to_java_doubles
def to_java_doubles(m): ''' to_java_doubles(m) yields a java array object for the vector or matrix m. ''' global _java if _java is None: _init_registration() m = np.asarray(m) dims = len(m.shape) if dims > 2: raise ValueError('1D and 2D arrays supported only') bindat = serialize_numpy(m, 'd') return (_java.jvm.nben.util.Numpy.double2FromBytes(bindat) if dims == 2 else _java.jvm.nben.util.Numpy.double1FromBytes(bindat))
python
def to_java_doubles(m): ''' to_java_doubles(m) yields a java array object for the vector or matrix m. ''' global _java if _java is None: _init_registration() m = np.asarray(m) dims = len(m.shape) if dims > 2: raise ValueError('1D and 2D arrays supported only') bindat = serialize_numpy(m, 'd') return (_java.jvm.nben.util.Numpy.double2FromBytes(bindat) if dims == 2 else _java.jvm.nben.util.Numpy.double1FromBytes(bindat))
[ "def", "to_java_doubles", "(", "m", ")", ":", "global", "_java", "if", "_java", "is", "None", ":", "_init_registration", "(", ")", "m", "=", "np", ".", "asarray", "(", "m", ")", "dims", "=", "len", "(", "m", ".", "shape", ")", "if", "dims", ">", ...
to_java_doubles(m) yields a java array object for the vector or matrix m.
[ "to_java_doubles", "(", "m", ")", "yields", "a", "java", "array", "object", "for", "the", "vector", "or", "matrix", "m", "." ]
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/java/__init__.py#L53-L64
train
Returns a java array object for the vector or matrix m.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRiM1qvaW7,WbNHlDKpyPtQ,z18h6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NqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + '\x6f' + chr(1219 - 1168) + '\x34' + chr(0b1010 + 0o52), 30605 - 30597), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(9290 - 9179) + chr(0b110001) + chr(54) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111 + 0o0) + chr(55) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(55) + '\061', 56564 - 56556), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + chr(48), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + '\x37' + chr(1146 - 1095), 26706 - 26698), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(4937 - 4826) + '\x32' + chr(1130 - 1079) + '\x35', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + '\061' + chr(2450 - 2400), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + chr(2198 - 2149) + '\x32', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + chr(1930 - 1877) + '\062', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50) + chr(52) + chr(49), 29378 - 29370), nzTpIcepk0o8('\060' + chr(4477 - 4366) + '\x33' + chr(756 - 704) + chr(52), 8), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(0b110100) + chr(386 - 334), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + '\064' + chr(54), ord("\x08")), nzTpIcepk0o8('\060' + chr(10322 - 10211) + '\067' + '\x33', 59627 - 59619), nzTpIcepk0o8(chr(1429 - 1381) + chr(0b1101111) + chr(49) + '\x30' + '\063', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b11011 + 0o27) + chr(55) + chr(0b1000 + 0o54), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + '\x35' + '\x32', 60679 - 60671), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010) + chr(0b0 + 0o60) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(686 - 637) + chr(51) + '\062', 34695 - 34687), nzTpIcepk0o8('\060' + chr(10053 - 9942) + chr(0b101110 + 0o4) + '\067' + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + chr(2545 - 2494) + chr(48), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + chr(417 - 367) + chr(0b1000 + 0o55), 53812 - 53804), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(168 - 120) + chr(0b1000010 + 0o55) + '\062' + chr(0b1001 + 0o51) + chr(0b110000 + 0o0), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\062' + '\x36' + chr(53), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(54) + chr(437 - 387), 0o10), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1000011 + 0o54) + chr(0b100001 + 0o26) + '\067', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(479 - 431) + '\157' + '\062' + '\061' + '\x36', 0o10), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(111) + chr(49) + '\065' + '\x32', 8), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + '\x33' + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(0b11010 + 0o125) + chr(50) + '\x31' + chr(51), 54489 - 54481), nzTpIcepk0o8(chr(0b110000) + chr(0b11 + 0o154) + chr(0b10000 + 0o41) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(1495 - 1384) + chr(0b110010) + '\061' + '\x36', 8), nzTpIcepk0o8('\060' + '\157' + '\063' + chr(0b110101) + chr(880 - 827), ord("\x08")), nzTpIcepk0o8('\060' + chr(810 - 699) + '\061' + chr(967 - 914) + '\063', ord("\x08")), nzTpIcepk0o8(chr(502 - 454) + chr(0b1101111) + '\x33' + '\x35', 20999 - 20991), nzTpIcepk0o8('\060' + chr(4586 - 4475) + chr(49) + chr(854 - 801) + chr(1454 - 1402), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + chr(518 - 464) + chr(2604 - 2549), 55850 - 55842)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110101) + chr(1194 - 1146), 51371 - 51363)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xca'), chr(100) + chr(0b1100101) + chr(5504 - 5405) + chr(111) + '\144' + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(0b110011 + 0o63) + chr(0b101101) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def UZNbH5gmkzup(tF75nqoNENFL): global NCSkEp56aoAD if NCSkEp56aoAD is None: RGCW6JPVIejx() tF75nqoNENFL = nDF4gVNx0u9Q.asarray(tF75nqoNENFL) OG3SLSuytFrL = ftfygxgFas5X(tF75nqoNENFL.lhbM092AFW8f) if OG3SLSuytFrL > nzTpIcepk0o8('\060' + '\x6f' + chr(1416 - 1366), ord("\x08")): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xd51\x1dXv\xdf\xbdx\x8e\x8a\xc0\x96\x16\x87B0\x9c\x19\xf6*\xcd7\xa7s\xf5\xd1\xd2Pm\xe2\x13'), '\x64' + chr(101) + chr(99) + chr(8584 - 8473) + chr(0b1011011 + 0o11) + chr(101))(chr(0b1001111 + 0o46) + chr(331 - 215) + '\146' + '\055' + chr(0b110011 + 0o5))) gliI8qXdf0jm = Gol4a2Ap7Wv_(tF75nqoNENFL, roI3spqORKae(ES5oEprVxulp(b'\x80'), chr(0b1100100) + chr(9501 - 9400) + chr(99) + chr(0b1101111) + '\x64' + chr(6784 - 6683))(chr(0b1110101) + '\164' + chr(0b1100110) + chr(0b11001 + 0o24) + chr(0b111000))) return roI3spqORKae(NCSkEp56aoAD.jvm.nben.util.Numpy, roI3spqORKae(ES5oEprVxulp(b'\x80\x1aH[t\xde\xaf\x0c\xb8\xc5\xcc\xa6\x1d\x92^0'), '\x64' + chr(0b1100101) + chr(0b1100011) + '\157' + '\x64' + chr(6903 - 6802))(chr(0b1010 + 0o153) + chr(116) + chr(7146 - 7044) + '\055' + '\x38'))(gliI8qXdf0jm) if OG3SLSuytFrL == nzTpIcepk0o8('\x30' + chr(0b10011 + 0o134) + chr(0b11101 + 0o25), 8) else roI3spqORKae(NCSkEp56aoAD.jvm.nben.util.Numpy, roI3spqORKae(ES5oEprVxulp(b'\x80\x1aH[t\xde\xac\x0c\xb8\xc5\xcc\xa6\x1d\x92^0'), '\144' + chr(4957 - 4856) + chr(4444 - 4345) + chr(0b1011000 + 0o27) + chr(0b11100 + 0o110) + '\145')('\165' + chr(0b1100010 + 0o22) + '\146' + chr(1077 - 1032) + chr(0b111000)))(gliI8qXdf0jm)
noahbenson/neuropythy
neuropythy/java/__init__.py
to_java_ints
def to_java_ints(m): ''' to_java_ints(m) yields a java array object for the vector or matrix m. ''' global _java if _java is None: _init_registration() m = np.asarray(m) dims = len(m.shape) if dims > 2: raise ValueError('1D and 2D arrays supported only') bindat = serialize_numpy(m, 'i') return (_java.jvm.nben.util.Numpy.int2FromBytes(bindat) if dims == 2 else _java.jvm.nben.util.Numpy.int1FromBytes(bindat))
python
def to_java_ints(m): ''' to_java_ints(m) yields a java array object for the vector or matrix m. ''' global _java if _java is None: _init_registration() m = np.asarray(m) dims = len(m.shape) if dims > 2: raise ValueError('1D and 2D arrays supported only') bindat = serialize_numpy(m, 'i') return (_java.jvm.nben.util.Numpy.int2FromBytes(bindat) if dims == 2 else _java.jvm.nben.util.Numpy.int1FromBytes(bindat))
[ "def", "to_java_ints", "(", "m", ")", ":", "global", "_java", "if", "_java", "is", "None", ":", "_init_registration", "(", ")", "m", "=", "np", ".", "asarray", "(", "m", ")", "dims", "=", "len", "(", "m", ".", "shape", ")", "if", "dims", ">", "2"...
to_java_ints(m) yields a java array object for the vector or matrix m.
[ "to_java_ints", "(", "m", ")", "yields", "a", "java", "array", "object", "for", "the", "vector", "or", "matrix", "m", "." ]
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/java/__init__.py#L66-L77
train
returns a java array object for the vector or matrix m.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gK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xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(2165 - 2117) + chr(0b1101111) + '\063' + chr(0b101 + 0o61) + '\060', ord("\x08")), nzTpIcepk0o8(chr(574 - 526) + chr(111) + '\061' + chr(1985 - 1935) + chr(2395 - 2346), ord("\x08")), nzTpIcepk0o8(chr(205 - 157) + chr(9198 - 9087) + '\x35' + chr(0b101010 + 0o10), 0o10), nzTpIcepk0o8(chr(1557 - 1509) + chr(0b1101 + 0o142) + '\x31' + chr(158 - 107), ord("\x08")), nzTpIcepk0o8('\x30' + chr(7889 - 7778) + chr(0b11001 + 0o31) + chr(469 - 417) + '\062', 10806 - 10798), nzTpIcepk0o8(chr(1374 - 1326) + chr(1572 - 1461) + chr(325 - 276) + chr(55) + chr(1607 - 1554), 63042 - 63034), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(0b111111 + 0o60) + chr(50) + chr(0b101011 + 0o7), 0b1000), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b11001 + 0o126) + '\063' + '\061' + chr(53), 0o10), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\x6f' + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + '\067' + chr(0b11100 + 0o30), 7689 - 7681), nzTpIcepk0o8(chr(900 - 852) + '\x6f' + chr(0b110010) + chr(0b100 + 0o60) + chr(0b1 + 0o63), 0o10), nzTpIcepk0o8('\x30' + chr(0b1100010 + 0o15) + '\x32' + '\x35' + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(175 - 64) + '\061' + '\062' + chr(54), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10000 + 0o42) + chr(1765 - 1712), 0b1000), nzTpIcepk0o8(chr(948 - 900) + '\x6f' + '\x33' + chr(49) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(1245 - 1195) + chr(0b110110) + '\x33', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101000 + 0o7) + chr(0b110101) + chr(0b11001 + 0o30), ord("\x08")), nzTpIcepk0o8('\060' + chr(9169 - 9058) + '\x32' + chr(1167 - 1119) + chr(0b110111), 62096 - 62088), nzTpIcepk0o8(chr(0b110000) + chr(0b100010 + 0o115) + '\062' + chr(54) + '\x33', 8), nzTpIcepk0o8(chr(0b1011 + 0o45) + '\157' + chr(0b110011) + '\060' + chr(1609 - 1559), 39747 - 39739), nzTpIcepk0o8(chr(1603 - 1555) + '\157' + '\x31' + chr(52), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + chr(2115 - 2067) + chr(1058 - 1007), 0b1000), nzTpIcepk0o8(chr(2010 - 1962) + chr(111) + chr(50) + '\065' + chr(2213 - 2161), 8), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + chr(1290 - 1236), 0b1000), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\x6f' + chr(0b110111) + '\065', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1549 - 1500) + '\064' + chr(0b10111 + 0o36), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + chr(928 - 875) + chr(1006 - 953), 0b1000), nzTpIcepk0o8(chr(48) + chr(3079 - 2968) + chr(0b110011) + '\x34' + chr(0b110010), 24889 - 24881), nzTpIcepk0o8(chr(764 - 716) + chr(0b1010101 + 0o32) + chr(54) + '\064', 7739 - 7731), nzTpIcepk0o8(chr(0b110000) + chr(4897 - 4786) + '\x33' + chr(51) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1 + 0o156) + chr(50) + '\061' + '\x31', 43582 - 43574), nzTpIcepk0o8(chr(48) + chr(3524 - 3413) + chr(0b1111 + 0o43) + '\066' + '\x35', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + chr(52) + chr(325 - 271), 0o10), nzTpIcepk0o8('\x30' + chr(0b1011010 + 0o25) + chr(510 - 460) + '\x33' + chr(0b110010), 11784 - 11776), nzTpIcepk0o8('\060' + chr(2403 - 2292) + chr(50) + chr(0b110010) + '\x37', 9841 - 9833), nzTpIcepk0o8(chr(0b1100 + 0o44) + '\x6f' + chr(438 - 389) + '\060' + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(191 - 143) + chr(111) + '\061' + chr(0b110111) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\063' + '\x33' + chr(723 - 671), 43317 - 43309), nzTpIcepk0o8('\060' + '\x6f' + '\063' + '\x36' + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(3714 - 3603) + '\x32' + chr(0b110000) + '\065', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(111) + chr(299 - 246) + chr(48), 16359 - 16351)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xde'), chr(100) + chr(101) + chr(0b1001101 + 0o26) + chr(7990 - 7879) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(0b1010100 + 0o40) + chr(0b1100110) + chr(745 - 700) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def HZbWc0QCJg1C(tF75nqoNENFL): global NCSkEp56aoAD if NCSkEp56aoAD is None: RGCW6JPVIejx() tF75nqoNENFL = nDF4gVNx0u9Q.asarray(tF75nqoNENFL) OG3SLSuytFrL = ftfygxgFas5X(tF75nqoNENFL.lhbM092AFW8f) if OG3SLSuytFrL > nzTpIcepk0o8('\060' + '\x6f' + '\x32', 0o10): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xc1\x15\nj\xcc\x192\xffB\x9c\xc5\xde$t\xb1\xc0\t\xf4\xc6\xb2|\xac\xdejX\x01\x8d\x8dZ\xb7\xf0'), chr(4809 - 4709) + chr(0b1011 + 0o132) + chr(5458 - 5359) + chr(0b10 + 0o155) + '\144' + '\145')(chr(0b1101 + 0o150) + '\164' + chr(102) + chr(0b11000 + 0o25) + '\070')) gliI8qXdf0jm = Gol4a2Ap7Wv_(tF75nqoNENFL, roI3spqORKae(ES5oEprVxulp(b'\x99'), '\144' + chr(101) + chr(0b1100011) + '\157' + '\x64' + chr(3956 - 3855))('\165' + '\x74' + '\x66' + '\055' + chr(0b101010 + 0o16))) return roI3spqORKae(NCSkEp56aoAD.jvm.nben.util.Numpy, roI3spqORKae(ES5oEprVxulp(b'\x99?^9\xe4\x0f}\xa0D\xc5\xd0\xc9%'), chr(0b10011 + 0o121) + chr(1932 - 1831) + chr(99) + chr(111) + chr(0b100111 + 0o75) + '\x65')(chr(0b1110000 + 0o5) + chr(0b1110100) + chr(102) + chr(312 - 267) + '\x38'))(gliI8qXdf0jm) if OG3SLSuytFrL == nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010), 8) else roI3spqORKae(NCSkEp56aoAD.jvm.nben.util.Numpy, roI3spqORKae(ES5oEprVxulp(b'\x99?^:\xe4\x0f}\xa0D\xc5\xd0\xc9%'), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(8803 - 8692) + chr(0b1001 + 0o133) + chr(0b1000011 + 0o42))(chr(117) + chr(0b1001000 + 0o54) + chr(102) + chr(45) + chr(803 - 747)))(gliI8qXdf0jm)
noahbenson/neuropythy
neuropythy/java/__init__.py
to_java_array
def to_java_array(m): ''' to_java_array(m) yields to_java_ints(m) if m is an array of integers and to_java_doubles(m) if m is anything else. The numpy array m is tested via numpy.issubdtype(m.dtype, numpy.int64). ''' if not hasattr(m, '__iter__'): return m m = np.asarray(m) if np.issubdtype(m.dtype, np.dtype(int).type) or all(isinstance(x, num.Integral) for x in m): return to_java_ints(m) else: return to_java_doubles(m)
python
def to_java_array(m): ''' to_java_array(m) yields to_java_ints(m) if m is an array of integers and to_java_doubles(m) if m is anything else. The numpy array m is tested via numpy.issubdtype(m.dtype, numpy.int64). ''' if not hasattr(m, '__iter__'): return m m = np.asarray(m) if np.issubdtype(m.dtype, np.dtype(int).type) or all(isinstance(x, num.Integral) for x in m): return to_java_ints(m) else: return to_java_doubles(m)
[ "def", "to_java_array", "(", "m", ")", ":", "if", "not", "hasattr", "(", "m", ",", "'__iter__'", ")", ":", "return", "m", "m", "=", "np", ".", "asarray", "(", "m", ")", "if", "np", ".", "issubdtype", "(", "m", ".", "dtype", ",", "np", ".", "dty...
to_java_array(m) yields to_java_ints(m) if m is an array of integers and to_java_doubles(m) if m is anything else. The numpy array m is tested via numpy.issubdtype(m.dtype, numpy.int64).
[ "to_java_array", "(", "m", ")", "yields", "to_java_ints", "(", "m", ")", "if", "m", "is", "an", "array", "of", "integers", "and", "to_java_doubles", "(", "m", ")", "if", "m", "is", "anything", "else", ".", "The", "numpy", "array", "m", "is", "tested", ...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/java/__init__.py#L79-L89
train
Convert an array into a Java array.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07D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q9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(8963 - 8852) + chr(808 - 753) + chr(0b11 + 0o56), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b100111 + 0o110) + '\x31' + '\x30' + chr(0b1101 + 0o52), 12038 - 12030), nzTpIcepk0o8(chr(48) + chr(4993 - 4882) + chr(0b11010 + 0o31) + chr(0b110110) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\157' + chr(49) + chr(0b110111) + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + chr(5646 - 5535) + '\x32' + chr(0b110101) + chr(49), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1001110 + 0o41) + chr(759 - 710) + chr(0b110011 + 0o3) + chr(2431 - 2376), ord("\x08")), nzTpIcepk0o8(chr(503 - 455) + chr(111) + '\x31' + chr(0b1101 + 0o45) + chr(1697 - 1642), ord("\x08")), nzTpIcepk0o8(chr(1481 - 1433) + chr(111) + chr(50) + chr(0b110000) + chr(90 - 37), 23047 - 23039), nzTpIcepk0o8(chr(1169 - 1121) + chr(0b10000 + 0o137) + '\061' + chr(1599 - 1547) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(48) + chr(0b110 + 0o151) + chr(0b1100 + 0o45) + chr(53) + '\x35', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + '\x33' + chr(0b110000 + 0o4), 3299 - 3291), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010) + chr(0b110101) + '\x36', 61162 - 61154), nzTpIcepk0o8(chr(0b110000) + chr(0b101011 + 0o104) + '\061' + chr(50) + chr(0b110111), 8), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\x6f' + '\x32' + chr(0b110010) + chr(1268 - 1213), 19833 - 19825), nzTpIcepk0o8(chr(0b110000) + chr(0b100101 + 0o112) + chr(2301 - 2250) + chr(0b110011) + chr(0b110101 + 0o2), 64942 - 64934), nzTpIcepk0o8(chr(1652 - 1604) + chr(111) + '\x31' + '\x35' + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(730 - 682) + chr(111) + '\x31' + chr(0b101010 + 0o13) + chr(507 - 452), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011) + chr(0b110110) + chr(0b110100), 47291 - 47283), nzTpIcepk0o8(chr(1639 - 1591) + chr(0b1101111) + chr(0b110010) + '\x34' + '\063', ord("\x08")), nzTpIcepk0o8(chr(982 - 934) + '\157' + chr(0b110010) + '\x30' + chr(2564 - 2512), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b101111 + 0o100) + '\061' + chr(431 - 379) + '\062', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11 + 0o56) + chr(52) + chr(50), 8), nzTpIcepk0o8(chr(48) + chr(4205 - 4094) + '\062' + '\063' + '\x35', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(801 - 751) + chr(212 - 157) + chr(0b101001 + 0o7), 55125 - 55117), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(111) + chr(82 - 33) + chr(48) + chr(51), ord("\x08")), nzTpIcepk0o8('\060' + chr(396 - 285) + chr(55) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1045 - 995) + chr(308 - 254), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b11011 + 0o32) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(0b10010 + 0o41) + '\x31', 21179 - 21171), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1101111) + chr(1327 - 1276) + chr(767 - 717) + '\061', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + '\064' + chr(0b110000), 22540 - 22532), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(111) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(1034 - 986) + '\x6f' + chr(0b110010) + '\x34' + chr(51), 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49) + '\x33' + '\060', 29791 - 29783), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(5403 - 5292) + '\x34' + '\065', 48507 - 48499), nzTpIcepk0o8('\060' + chr(111) + '\061' + '\x37' + '\x30', 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110100) + chr(1044 - 996), 0o10), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(794 - 683) + chr(0b110011) + chr(370 - 316) + chr(0b110010), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\x33' + chr(51) + chr(49), 8), nzTpIcepk0o8('\x30' + chr(111) + '\062' + chr(301 - 248) + chr(49), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\157' + '\065' + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x17'), '\x64' + chr(4842 - 4741) + chr(3941 - 3842) + '\x6f' + chr(3962 - 3862) + '\145')('\165' + chr(0b1011 + 0o151) + chr(102) + chr(0b101101) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def COzkv5MIsXTO(tF75nqoNENFL): if not dRKdVnHPFq7C(tF75nqoNENFL, roI3spqORKae(ES5oEprVxulp(b'f\x18\x9c\x0c\xcc\x05\x08\xda'), chr(0b1100100) + chr(0b100001 + 0o104) + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(0b1000011 + 0o42))(chr(11187 - 11070) + chr(1702 - 1586) + chr(0b101010 + 0o74) + chr(486 - 441) + chr(56))): return tF75nqoNENFL tF75nqoNENFL = nDF4gVNx0u9Q.asarray(tF75nqoNENFL) if roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'P4\x86\r\xcb\x13#\xfc\x10\x08'), '\x64' + '\145' + '\143' + '\157' + chr(0b111000 + 0o54) + chr(101))('\165' + chr(0b1110100) + '\x66' + chr(45) + '\070'))(roI3spqORKae(tF75nqoNENFL, roI3spqORKae(ES5oEprVxulp(b'k$\xadA\xcb\x15"\xca\x1a\x05\xa9\xe2'), chr(0b1100100) + chr(0b110100 + 0o61) + chr(0b1100011) + '\157' + chr(100) + '\x65')(chr(117) + chr(0b1110100) + chr(102) + chr(1512 - 1467) + chr(0b1101 + 0o53))), roI3spqORKae(nDF4gVNx0u9Q.dtype(nzTpIcepk0o8), roI3spqORKae(ES5oEprVxulp(b't\r\xc5O\xf1\x04\x19\xb0\x15+\xfb\xf9'), chr(0b1100100) + chr(101) + chr(0b1100011) + chr(111) + chr(4525 - 4425) + chr(0b1100101))('\165' + '\x74' + '\146' + chr(0b11010 + 0o23) + '\070'))) or qX60lO1lgHA5((suIjIS24Zkqw(bI5jsQ9OkQtj, roI3spqORKae(o0eINMlvUImY, roI3spqORKae(ES5oEprVxulp(b'p)\x81\x1d\xce\x056\xe9'), chr(0b1100100) + '\145' + '\x63' + chr(8256 - 8145) + '\144' + chr(0b10110 + 0o117))('\x75' + chr(0b1110100) + chr(9550 - 9448) + chr(0b10101 + 0o30) + chr(0b1100 + 0o54)))) for bI5jsQ9OkQtj in tF75nqoNENFL)): return HZbWc0QCJg1C(tF75nqoNENFL) else: return UZNbH5gmkzup(tF75nqoNENFL)
noahbenson/neuropythy
neuropythy/geometry/mesh.py
to_mask
def to_mask(obj, m=None, indices=None): ''' to_mask(obj, m) yields the set of indices from the given vertex-set or itable object obj that correspond to the given mask m. to_mask((obj, m)) is equivalent to to_mask(obj, m). The mask m may take any of the following forms: * a list of vertex indices * a boolean array (one value per vertex) * a property name, which can be cast to a boolean array * a tuple (property, value) where property is a list of values, one per vertex, and value is the value that must match in order for a vertex to be included (this is basically equivalent to the mask (property == value); note that property may also be a property name * a tuple (property, min, max), which specifies that the property must be between min and max for a vertex to be included (min < p <= max) * a tuple (property, (val1, val2...)), which specifies that the property must be any of the values in (val1, val2...) for a vertex to be included * None, indicating that all labels should be returned * a dict/mapping with one item whose key is either 'and', or 'or' and whose value is a list, each of whose elements matches one of the above. Note that the optional argument indices (default: False) may be set to true to yield the vertex indices instead of the vertex labels. If obj is not a VertexSet object, then this option is ignored. ''' if not pimms.is_map(obj) and pimms.is_vector(obj) and len(obj) < 4 and m is None: if len(obj) == 1: obj = obj[0] elif len(obj) == 2: (obj, m) = obj else: (obj, m, q) = obj if indices is None: if pimms.is_map(q): indices = q.get('indices', False) else: indices = q if indices is None: indices = False if is_vset(obj): lbls = obj.labels idcs = obj.indices obj = obj.properties else: obj = pimms.itable(obj) lbls = np.arange(0, obj.row_count, 1, dtype=np.int) idcs = lbls if m is None: return idcs if indices else lbls if is_tuple(m): if len(m) == 0: return np.asarray([], dtype=np.int) p = to_property(obj, m[0]) if len(m) == 2 and hasattr(m[1], '__iter__'): m = reduce(lambda q,u: np.logical_or(q, p == u), m[1], np.zeros(len(p), dtype=np.bool)) elif len(m) == 2: m = (p == m[1]) elif len(m) == 3: m = np.logical_and(m[1] < p, p <= m[2]) elif pimms.is_str(m): m = np.asarray(obj[m], dtype=np.bool) elif pimms.is_map(m): if len(m) != 1: raise ValueError('Dicts used as masks must contain 1 item') (k,v) = next(six.iteritems(m)) if not hasattr(v, '__iter__'): raise ValueError('Value of dict-mask must be an iterator') if not pimms.is_str(k): raise ValueError('Key of dict-mask must be "or", or "and"') v = [to_mask(obj, u, indices=indices) for u in v] if k in ('and', 'intersect', 'intersection', '^', '&', '&&'): return reduce(np.intersect1d, v) elif k in ('or', 'union', 'v', '|' '||'): return reduce(np.union1d, v) # at this point, m should be a boolean array or a list of indices return idcs[m] if indices else lbls[m]
python
def to_mask(obj, m=None, indices=None): ''' to_mask(obj, m) yields the set of indices from the given vertex-set or itable object obj that correspond to the given mask m. to_mask((obj, m)) is equivalent to to_mask(obj, m). The mask m may take any of the following forms: * a list of vertex indices * a boolean array (one value per vertex) * a property name, which can be cast to a boolean array * a tuple (property, value) where property is a list of values, one per vertex, and value is the value that must match in order for a vertex to be included (this is basically equivalent to the mask (property == value); note that property may also be a property name * a tuple (property, min, max), which specifies that the property must be between min and max for a vertex to be included (min < p <= max) * a tuple (property, (val1, val2...)), which specifies that the property must be any of the values in (val1, val2...) for a vertex to be included * None, indicating that all labels should be returned * a dict/mapping with one item whose key is either 'and', or 'or' and whose value is a list, each of whose elements matches one of the above. Note that the optional argument indices (default: False) may be set to true to yield the vertex indices instead of the vertex labels. If obj is not a VertexSet object, then this option is ignored. ''' if not pimms.is_map(obj) and pimms.is_vector(obj) and len(obj) < 4 and m is None: if len(obj) == 1: obj = obj[0] elif len(obj) == 2: (obj, m) = obj else: (obj, m, q) = obj if indices is None: if pimms.is_map(q): indices = q.get('indices', False) else: indices = q if indices is None: indices = False if is_vset(obj): lbls = obj.labels idcs = obj.indices obj = obj.properties else: obj = pimms.itable(obj) lbls = np.arange(0, obj.row_count, 1, dtype=np.int) idcs = lbls if m is None: return idcs if indices else lbls if is_tuple(m): if len(m) == 0: return np.asarray([], dtype=np.int) p = to_property(obj, m[0]) if len(m) == 2 and hasattr(m[1], '__iter__'): m = reduce(lambda q,u: np.logical_or(q, p == u), m[1], np.zeros(len(p), dtype=np.bool)) elif len(m) == 2: m = (p == m[1]) elif len(m) == 3: m = np.logical_and(m[1] < p, p <= m[2]) elif pimms.is_str(m): m = np.asarray(obj[m], dtype=np.bool) elif pimms.is_map(m): if len(m) != 1: raise ValueError('Dicts used as masks must contain 1 item') (k,v) = next(six.iteritems(m)) if not hasattr(v, '__iter__'): raise ValueError('Value of dict-mask must be an iterator') if not pimms.is_str(k): raise ValueError('Key of dict-mask must be "or", or "and"') v = [to_mask(obj, u, indices=indices) for u in v] if k in ('and', 'intersect', 'intersection', '^', '&', '&&'): return reduce(np.intersect1d, v) elif k in ('or', 'union', 'v', '|' '||'): return reduce(np.union1d, v) # at this point, m should be a boolean array or a list of indices return idcs[m] if indices else lbls[m]
[ "def", "to_mask", "(", "obj", ",", "m", "=", "None", ",", "indices", "=", "None", ")", ":", "if", "not", "pimms", ".", "is_map", "(", "obj", ")", "and", "pimms", ".", "is_vector", "(", "obj", ")", "and", "len", "(", "obj", ")", "<", "4", "and",...
to_mask(obj, m) yields the set of indices from the given vertex-set or itable object obj that correspond to the given mask m. to_mask((obj, m)) is equivalent to to_mask(obj, m). The mask m may take any of the following forms: * a list of vertex indices * a boolean array (one value per vertex) * a property name, which can be cast to a boolean array * a tuple (property, value) where property is a list of values, one per vertex, and value is the value that must match in order for a vertex to be included (this is basically equivalent to the mask (property == value); note that property may also be a property name * a tuple (property, min, max), which specifies that the property must be between min and max for a vertex to be included (min < p <= max) * a tuple (property, (val1, val2...)), which specifies that the property must be any of the values in (val1, val2...) for a vertex to be included * None, indicating that all labels should be returned * a dict/mapping with one item whose key is either 'and', or 'or' and whose value is a list, each of whose elements matches one of the above. Note that the optional argument indices (default: False) may be set to true to yield the vertex indices instead of the vertex labels. If obj is not a VertexSet object, then this option is ignored.
[ "to_mask", "(", "obj", "m", ")", "yields", "the", "set", "of", "indices", "from", "the", "given", "vertex", "-", "set", "or", "itable", "object", "obj", "that", "correspond", "to", "the", "given", "mask", "m", ".", "to_mask", "((", "obj", "m", "))", ...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/mesh.py#L218-L284
train
Returns the set of indices from the given vertex - set or itable object obj that correspond to the given mask m.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9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cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b10001 + 0o37) + '\157' + chr(0b110010) + chr(0b100111 + 0o11) + '\066', 0o10), nzTpIcepk0o8(chr(444 - 396) + chr(111) + chr(0b110111) + chr(53 - 1), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x35' + '\060', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(49), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1000101 + 0o52) + chr(1882 - 1833) + chr(0b110010 + 0o3) + chr(0b1111 + 0o50), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b101111 + 0o4) + '\x31' + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(2194 - 2146) + '\x6f' + chr(1138 - 1089) + chr(0b110111) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(1895 - 1784) + chr(1000 - 948) + chr(0b10 + 0o61), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(2194 - 2143) + chr(50) + chr(0b101001 + 0o16), ord("\x08")), nzTpIcepk0o8(chr(0b101111 + 0o1) + '\x6f' + chr(652 - 601) + chr(0b110011), 51398 - 51390), nzTpIcepk0o8('\060' + chr(306 - 195) + chr(0b110011) + chr(1932 - 1877) + chr(0b101011 + 0o12), 0b1000), nzTpIcepk0o8('\060' + chr(3690 - 3579) + chr(0b1000 + 0o56), 0o10), nzTpIcepk0o8(chr(889 - 841) + chr(111) + chr(993 - 943) + chr(1729 - 1676) + '\x32', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + chr(0b101110 + 0o11) + chr(2250 - 2200), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(1273 - 1162) + '\062' + chr(0b1010 + 0o51) + '\064', 0b1000), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b1000110 + 0o51) + chr(0b101110 + 0o3) + chr(2423 - 2373) + chr(686 - 633), 0b1000), nzTpIcepk0o8(chr(966 - 918) + chr(0b1101111) + chr(1539 - 1489) + chr(1939 - 1888) + chr(0b110110), 59715 - 59707), nzTpIcepk0o8('\060' + chr(111) + chr(50) + '\x31' + chr(0b11001 + 0o34), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10110 + 0o34) + chr(0b1 + 0o63) + '\063', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010 + 0o1) + chr(0b10110 + 0o41) + chr(0b110111), 56601 - 56593), nzTpIcepk0o8(chr(0b11010 + 0o26) + '\x6f' + chr(49) + '\x31' + '\060', ord("\x08")), nzTpIcepk0o8(chr(405 - 357) + chr(0b1101111) + '\061' + '\x33' + chr(1591 - 1543), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(51) + chr(0b10101 + 0o33) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(3509 - 3398) + chr(0b110011) + '\x33' + chr(1695 - 1642), 16690 - 16682), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(9313 - 9202) + chr(0b11000 + 0o32) + chr(85 - 33) + chr(0b110001), 0b1000), nzTpIcepk0o8('\x30' + chr(6237 - 6126) + chr(0b11110 + 0o27) + chr(421 - 373), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1106 - 1055) + '\x30' + chr(0b110000 + 0o7), 47568 - 47560), nzTpIcepk0o8(chr(1279 - 1231) + '\157' + chr(0b100111 + 0o14) + chr(2687 - 2635) + chr(2392 - 2338), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b11010 + 0o30) + '\060' + chr(0b110110), 8), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + chr(501 - 452), ord("\x08")), nzTpIcepk0o8(chr(1969 - 1921) + chr(0b1101111) + chr(50) + '\x33' + chr(0b10111 + 0o33), 43600 - 43592), nzTpIcepk0o8(chr(48) + chr(111) + chr(482 - 433) + chr(0b101111 + 0o10) + '\062', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b111101 + 0o62) + '\062' + chr(0b110101) + '\067', 0o10), nzTpIcepk0o8(chr(448 - 400) + chr(111) + chr(0b110001) + '\060', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x31' + chr(0b10010 + 0o37) + chr(2677 - 2622), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(769 - 720) + chr(376 - 327) + '\061', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(54) + chr(51), 59419 - 59411), nzTpIcepk0o8('\060' + chr(0b100111 + 0o110) + chr(0b110011) + chr(52) + chr(0b10000 + 0o44), ord("\x08")), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b1101111) + chr(635 - 586) + chr(0b110001) + chr(582 - 530), 14385 - 14377), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + chr(0b1101 + 0o44) + chr(51), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(4790 - 4679) + '\x35' + chr(1633 - 1585), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xa8'), '\144' + chr(0b1100101) + chr(99) + chr(0b1101111) + chr(0b101101 + 0o67) + chr(9563 - 9462))('\x75' + chr(0b1110011 + 0o1) + chr(0b111101 + 0o51) + '\x2d' + chr(0b10100 + 0o44)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) (jYZAKYxMTtNT,) = (roI3spqORKae(rFFUeiYWzOhx(roI3spqORKae(ES5oEprVxulp(b'\xe0IFb\x1b\xa7\x16O\xa4'), '\144' + '\145' + chr(0b111011 + 0o50) + chr(2711 - 2600) + chr(0b1100100) + chr(0b1000011 + 0o42))(chr(0b1110101) + chr(13016 - 12900) + chr(0b1100110) + chr(45) + '\070'), roI3spqORKae(ES5oEprVxulp(b'\xf4YLt\x0c\xad'), chr(100) + chr(0b111100 + 0o51) + '\x63' + '\157' + chr(0b11100 + 0o110) + '\145')(chr(0b10101 + 0o140) + chr(8295 - 8179) + '\x66' + chr(45) + chr(0b11110 + 0o32))), roI3spqORKae(ES5oEprVxulp(b'\xf4YLt\x0c\xad'), '\x64' + chr(1782 - 1681) + chr(9697 - 9598) + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(1438 - 1321) + '\164' + chr(0b100000 + 0o106) + chr(0b101011 + 0o2) + chr(1631 - 1575))),) def lKC_czfSBtVT(kIMfkyypPTcC, tF75nqoNENFL=None, eQBPfEuGz7C1=None): if not roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xefOwl\x0e\xb8'), chr(100) + '\145' + chr(506 - 407) + chr(111) + chr(100) + chr(7659 - 7558))(chr(117) + chr(0b1110100) + '\x66' + chr(752 - 707) + '\070'))(kIMfkyypPTcC) and roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xefOww\n\xab\rL\xa5'), chr(0b1100100) + '\145' + chr(99) + '\157' + chr(0b1100100) + '\145')('\165' + '\164' + chr(0b1100110) + '\x2d' + '\070'))(kIMfkyypPTcC) and (ftfygxgFas5X(kIMfkyypPTcC) < nzTpIcepk0o8(chr(0b100100 + 0o14) + '\157' + chr(0b110100), ord("\x08"))) and (tF75nqoNENFL is None): if ftfygxgFas5X(kIMfkyypPTcC) == nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b1101111) + '\061', 8): kIMfkyypPTcC = kIMfkyypPTcC[nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110000), ord("\x08"))] elif ftfygxgFas5X(kIMfkyypPTcC) == nzTpIcepk0o8('\060' + chr(111) + chr(1266 - 1216), 16868 - 16860): (kIMfkyypPTcC, tF75nqoNENFL) = kIMfkyypPTcC else: (kIMfkyypPTcC, tF75nqoNENFL, P1yWu4gF7vxH) = kIMfkyypPTcC if eQBPfEuGz7C1 is None: if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xefOwl\x0e\xb8'), chr(0b1100100) + '\145' + chr(99) + '\x6f' + '\144' + '\145')(chr(0b1010 + 0o153) + chr(116) + '\146' + '\055' + chr(479 - 423)))(P1yWu4gF7vxH): eQBPfEuGz7C1 = P1yWu4gF7vxH.GUKetu4xaGsJ(roI3spqORKae(ES5oEprVxulp(b'\xefRLh\x0c\xad\n'), '\x64' + chr(0b1101 + 0o130) + chr(99) + chr(111) + '\x64' + '\145')('\x75' + '\164' + chr(102) + chr(45) + chr(0b1110 + 0o52)), nzTpIcepk0o8('\060' + chr(0b1101111) + '\060', 8)) else: eQBPfEuGz7C1 = P1yWu4gF7vxH if eQBPfEuGz7C1 is None: eQBPfEuGz7C1 = nzTpIcepk0o8('\x30' + '\x6f' + chr(48), 8) if ZULWiJNluwHo(kIMfkyypPTcC): IxwK_moSBywk = kIMfkyypPTcC.Ar0km3TBAurm oWFalk9jWbpc = kIMfkyypPTcC.eQBPfEuGz7C1 kIMfkyypPTcC = kIMfkyypPTcC.UtZvTnutzMHg else: kIMfkyypPTcC = zAgo8354IlJ7.itable(kIMfkyypPTcC) IxwK_moSBywk = nDF4gVNx0u9Q.chmI_GMU_sEi(nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b11000 + 0o127) + chr(0b101001 + 0o7), 8), kIMfkyypPTcC.y5i9L1QgPTK3, nzTpIcepk0o8(chr(48) + '\x6f' + chr(843 - 794), 8), dtype=nDF4gVNx0u9Q.nzTpIcepk0o8) oWFalk9jWbpc = IxwK_moSBywk if tF75nqoNENFL is None: return oWFalk9jWbpc if eQBPfEuGz7C1 else IxwK_moSBywk if kBeKB4Df6Zrm(tF75nqoNENFL): if ftfygxgFas5X(tF75nqoNENFL) == nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(48), 8): return roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xe7OIs\x1d\xa9\x00'), '\x64' + '\145' + chr(4981 - 4882) + chr(0b1100000 + 0o17) + chr(0b101010 + 0o72) + chr(101))(chr(117) + '\x74' + chr(0b1100110) + '\x2d' + '\070'))([], dtype=roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xe8F|q&\xab\x1cS\xbc+\x92>'), chr(100) + '\x65' + '\x63' + '\157' + chr(0b1010111 + 0o15) + chr(0b1000001 + 0o44))(chr(6046 - 5929) + '\x74' + '\146' + chr(1205 - 1160) + chr(0b11000 + 0o40)))) fSdw5wwLo9MO = gIYE7k6sMMbO(kIMfkyypPTcC, tF75nqoNENFL[nzTpIcepk0o8(chr(48) + '\157' + '\x30', 8)]) if ftfygxgFas5X(tF75nqoNENFL) == nzTpIcepk0o8(chr(0b110 + 0o52) + '\x6f' + chr(0b110010), 8) and dRKdVnHPFq7C(tF75nqoNENFL[nzTpIcepk0o8(chr(48) + chr(0b1010010 + 0o35) + chr(0b110001), 8)], roI3spqORKae(ES5oEprVxulp(b'\xd9cAu\n\xba&|'), chr(9896 - 9796) + chr(5080 - 4979) + chr(0b1100011) + '\157' + chr(0b1100100) + chr(101))(chr(117) + '\164' + chr(102) + '\055' + chr(56))): tF75nqoNENFL = jYZAKYxMTtNT(lambda P1yWu4gF7vxH, GRbsaHW8BT5I: nDF4gVNx0u9Q.logical_or(P1yWu4gF7vxH, fSdw5wwLo9MO == GRbsaHW8BT5I), tF75nqoNENFL[nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(111) + chr(0b110001), 8)], nDF4gVNx0u9Q.UmwwEp7MzR6q(ftfygxgFas5X(fSdw5wwLo9MO), dtype=nDF4gVNx0u9Q.TVUhqOt5_BbS)) elif ftfygxgFas5X(tF75nqoNENFL) == nzTpIcepk0o8('\060' + chr(0b111 + 0o150) + chr(0b110001 + 0o1), 8): tF75nqoNENFL = fSdw5wwLo9MO == tF75nqoNENFL[nzTpIcepk0o8('\060' + chr(0b10111 + 0o130) + chr(0b10000 + 0o41), 8)] elif ftfygxgFas5X(tF75nqoNENFL) == nzTpIcepk0o8(chr(0b110000) + chr(0b1100111 + 0o10) + chr(467 - 416), ord("\x08")): tF75nqoNENFL = nDF4gVNx0u9Q.FInAiCRNfQlt(tF75nqoNENFL[nzTpIcepk0o8(chr(48) + chr(111) + '\061', 8)] < fSdw5wwLo9MO, fSdw5wwLo9MO <= tF75nqoNENFL[nzTpIcepk0o8(chr(0b110000) + chr(0b1011101 + 0o22) + chr(0b110010), 8)]) elif roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xefOwr\x1b\xba'), '\x64' + chr(0b10101 + 0o120) + chr(0b10 + 0o141) + chr(0b1101111) + chr(100) + '\145')('\x75' + chr(11907 - 11791) + chr(430 - 328) + chr(286 - 241) + chr(56)))(tF75nqoNENFL): tF75nqoNENFL = nDF4gVNx0u9Q.asarray(kIMfkyypPTcC[tF75nqoNENFL], dtype=nDF4gVNx0u9Q.TVUhqOt5_BbS) elif roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xefOwl\x0e\xb8'), chr(0b110110 + 0o56) + '\x65' + chr(6907 - 6808) + chr(3592 - 3481) + chr(100) + chr(101))(chr(11413 - 11296) + chr(0b111 + 0o155) + chr(102) + chr(0b101 + 0o50) + '\070'))(tF75nqoNENFL): if ftfygxgFas5X(tF75nqoNENFL) != nzTpIcepk0o8(chr(0b110000) + chr(7009 - 6898) + chr(49), 8): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xc2UKu\x1c\xe8\x0cP\xb2\x7f\xddg\xd9\x9a\xf14\xed\xe6\xd0\xdf%-\xb6\xa9\x81K\xa8\x88\xf2x\xf3\x14\x8f9o G\x81!'), '\x64' + chr(101) + chr(8407 - 8308) + chr(10636 - 10525) + chr(1118 - 1018) + chr(0b1100101))(chr(3067 - 2950) + chr(0b10011 + 0o141) + '\146' + chr(0b10100 + 0o31) + chr(0b111000))) (B6UAF1zReOyJ, r7AA1pbLjb44) = ltB3XhPy2rYf(YVS_F7_wWn_o.tcSkjcrLksk1(tF75nqoNENFL)) if not dRKdVnHPFq7C(r7AA1pbLjb44, roI3spqORKae(ES5oEprVxulp(b'\xd9cAu\n\xba&|'), '\144' + chr(101) + chr(99) + chr(4120 - 4009) + chr(100) + chr(101))('\x75' + chr(0b1110100) + '\x66' + chr(1082 - 1037) + chr(0b111000))): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xd0]Dt\n\xe8\x16E\xf7\x7f\x94e\xde\x97\xf14\xed\xe6\x83\x92=+\xb1\xfd\xc3M\xe7\x87\xe89\xf3\x0e\xcaz.=\\\x96'), chr(100) + '\145' + chr(99) + chr(111) + chr(100) + '\145')('\165' + chr(116) + chr(102) + chr(0b101101) + chr(2753 - 2697))) if not roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xefOwr\x1b\xba'), '\144' + chr(0b1100101) + '\x63' + chr(2712 - 2601) + chr(0b1001 + 0o133) + chr(101))(chr(117) + '\x74' + chr(0b1001110 + 0o30) + '\x2d' + '\x38'))(B6UAF1zReOyJ): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xcdYQ!\x00\xaeYG\xbex\x89+\xc7\xdb\xef>\xbe\xe0\xd6\x8c<x\xa7\xb8\x81\n\xa8\x94\xa45\xba\x15\xdd(m(]\x80n'), chr(3547 - 3447) + chr(0b1100011 + 0o2) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(0b1110 + 0o130) + '\x2d' + chr(2663 - 2607))) r7AA1pbLjb44 = [lKC_czfSBtVT(kIMfkyypPTcC, GRbsaHW8BT5I, indices=eQBPfEuGz7C1) for GRbsaHW8BT5I in r7AA1pbLjb44] if B6UAF1zReOyJ in (roI3spqORKae(ES5oEprVxulp(b'\xe7RL'), chr(8692 - 8592) + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(3709 - 3609) + '\x65')(chr(10953 - 10836) + chr(0b1110100) + chr(102) + chr(1131 - 1086) + chr(1308 - 1252)), roI3spqORKae(ES5oEprVxulp(b'\xefR\\d\x1d\xbb\x1c@\xa3'), '\144' + chr(0b1100101) + '\143' + '\x6f' + '\144' + chr(8762 - 8661))('\x75' + '\x74' + chr(0b1100110) + chr(438 - 393) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xefR\\d\x1d\xbb\x1c@\xa3r\x92h'), chr(100) + chr(9070 - 8969) + chr(0b1010100 + 0o17) + '\x6f' + '\144' + chr(0b1100101))(chr(0b1001010 + 0o53) + '\x74' + '\x66' + '\055' + chr(0b10111 + 0o41)), roI3spqORKae(ES5oEprVxulp(b'\xd8'), '\144' + '\x65' + chr(0b1100011) + chr(111) + chr(100) + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(7199 - 7097) + chr(0b100010 + 0o13) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\xa0'), chr(100) + chr(0b101111 + 0o66) + '\x63' + '\157' + '\144' + '\x65')(chr(0b1110101) + '\x74' + chr(3787 - 3685) + chr(0b1111 + 0o36) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\xa0\x1a'), chr(2530 - 2430) + '\x65' + '\143' + chr(417 - 306) + '\144' + chr(0b11110 + 0o107))('\165' + chr(0b101001 + 0o113) + chr(0b100110 + 0o100) + '\x2d' + chr(56))): return jYZAKYxMTtNT(roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xefR\\d\x1d\xbb\x1c@\xa3*\x99'), chr(4786 - 4686) + '\x65' + '\x63' + chr(7940 - 7829) + chr(100) + '\145')(chr(117) + chr(0b1110100) + '\146' + chr(45) + chr(0b111000))), r7AA1pbLjb44) elif B6UAF1zReOyJ in (roI3spqORKae(ES5oEprVxulp(b'\xe9N'), chr(0b1100100) + chr(0b1100101) + chr(6654 - 6555) + chr(0b1101111) + '\144' + '\x65')('\165' + chr(0b1110100) + '\146' + '\x2d' + '\070'), roI3spqORKae(ES5oEprVxulp(b'\xf3RAn\x01'), '\144' + chr(0b1001110 + 0o27) + chr(99) + chr(10074 - 9963) + chr(0b100010 + 0o102) + chr(101))('\x75' + '\x74' + chr(0b1100110) + '\055' + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\xf0'), '\144' + chr(5082 - 4981) + '\143' + '\x6f' + chr(0b111 + 0o135) + chr(3466 - 3365))(chr(7818 - 7701) + chr(0b11101 + 0o127) + '\146' + chr(0b10111 + 0o26) + '\070'), roI3spqORKae(ES5oEprVxulp(b'\xfa@T'), '\x64' + chr(0b101101 + 0o70) + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(7116 - 7015))(chr(117) + '\164' + chr(0b1100110) + chr(0b100 + 0o51) + '\x38')): return jYZAKYxMTtNT(roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xf3RAn\x01\xf9\x1d'), chr(0b1100100) + chr(1725 - 1624) + chr(99) + chr(0b1101111) + chr(4854 - 4754) + chr(101))('\x75' + chr(0b10010 + 0o142) + chr(102) + chr(561 - 516) + chr(0b111000))), r7AA1pbLjb44) return oWFalk9jWbpc[tF75nqoNENFL] if eQBPfEuGz7C1 else IxwK_moSBywk[tF75nqoNENFL]
noahbenson/neuropythy
neuropythy/geometry/mesh.py
to_property
def to_property(obj, prop=None, dtype=Ellipsis, outliers=None, data_range=None, clipped=np.inf, weights=None, weight_min=0, weight_transform=Ellipsis, mask=None, valid_range=None, null=np.nan, transform=None, yield_weight=False): ''' to_property(obj, prop) yields the given property from obj after performing a set of filters on the property, as specified by the options. In the property array that is returned, the values that are considered outliers (data out of some range) are indicated by numpy.inf, and values that are not in the optionally-specified mask are given the value numpy.nan; these may be changed with the clipped and null options, respectively. to_property((obj, prop)) is equivalent to to_property(obj, prop). The property argument prop may be either specified as a string (a property name in the object) or as a property vector. The weights option may also be specified this way. Additionally, the prop arg may be a list such as ['polar_angle', 'eccentricity'] where each element is either a string or a vector, in which case the result is a matrix of properties. Finally, prop may be a set of property names, in which case the return value is an itable whose keys are the property names. The obj argument may be either a VertexSet object (such as a Mesh or Tesselation) or a mapping object such as a pimms ITable. If no strings are used to specify properties, it may additionally be omitted or set to None. The following options are accepted: * outliers (default:None) specifies the vertices that should be considered outliers; this may be either None (no outliers explicitly specified), a list of indices, or a boolean mask. * data_range (default:None) specifies the acceptable data range for values in the property; if None then this paramter is ignored. If specified as a pair of numbers (min, max), then data that is less than the min or greater than the max is marked as an outlier (in addition to other explicitly specified outliers). The values np.inf or -np.inf can be specified to indicate a one-sided range. * clipped (default:np.inf) specifies the value to be used to mark an out-of-range value in the returned array. * mask (default:None) specifies the vertices that should be included in the property array; values are specified in the mask similarly to the outliers option, except that mask values are included rather than excluded. The mask takes precedence over the outliers, in that a null (out-of-mask) value is always marked as null rather than clipped. * valid_range (default: None) specifies the range of values that are considered valid; i.e., values outside of the range are marked as null. Specified the same way as data_range. * null (default: np.nan) specifies the value marked in the array as out-of-mask. * transform (default:None) may optionally provide a function to be passed the array prior to being returned (after null and clipped values are marked). * dtype (defaut:Ellipsis) specifies the type of the array that should be returned. Ellipsis indicates that the type of the given property should be used. If None, then a normal Python array is returned. Otherwise, should be a numpy type such as numpy.real64 or numpy.complex128. * weights (default:Ellipsis) specifies the property or property array that should be examined as the weights. The default, Ellipsis, simply chops values that are close to or less than 0 such that they are equal to 0. None specifies that no transformation should be applied. * weight_min (default:0) specifies the value at-or-below which the weight is considered insignificant and the value is marked as clipped. * weight_transform (default:None) specifies a function that should be applied to the weight array before being used in the function. * yield_weight (default:False) specifies, if True, that instead of yielding prop, yield the tuple (prop, weights). ''' # was an arg given, or is obj a tuple? if pimms.is_vector(obj) and len(obj) < 4 and prop is None: kw0 = dict(dtype=dtype, null=null, outliers=outliers, data_range=data_range, clipped=clipped, weights=weights, weight_min=weight_min, weight_transform=weight_transform, mask=mask, valid_range=valid_range, transform=transform, yield_weight=yield_weight) if len(obj) == 2: return to_property(obj[0], obj[1], **kw0) elif len(obj) == 3: return to_property(obj[0], obj[1], **pimms.merge(kw0, obj[2])) else: raise ValueError('Bad input vector given to to_property()') # we could have been given a property alone or a map/vertex-set and a property if prop is None: raise ValueError('No property given to to_property()') # if it's a vertex-set, we want to note that and get the map if isinstance(obj, VertexSet): (vset, obj) = (obj, obj.properties) elif pimms.is_map(obj): (vset, obj) = (None, obj) elif obj is None: (vset, obj) = (None, None) else: ValueError('Data object given to to_properties() is neither a vertex-set nor a mapping') # Now, get the property array, as an array if pimms.is_str(prop): if obj is None: raise ValueError('a property name but no data object given to to_property') else: prop = obj[prop] if is_set(prop): def _lazy_prop(kk): return lambda:to_property(obj, kk, dtype=dtype, null=null, outliers=outliers, data_range=data_range, clipped=clipped, weights=weights, weight_min=weight_min, weight_transform=weight_transform, mask=mask, valid_range=valid_range, transform=transform, yield_weight=yield_weight) return pimms.itable({k:_lazy_prop(k) for k in prop}) elif (pimms.is_matrix(prop) or (pimms.is_vector(prop) and all(pimms.is_str(p) or pimms.is_vector(p) for p in prop))): return np.asarray([to_property(obj, k, dtype=dtype, null=null, outliers=outliers, data_range=data_range, clipped=clipped, weights=weights, weight_min=weight_min, weight_transform=weight_transform, mask=mask, valid_range=valid_range, transform=transform, yield_weight=yield_weight) for k in prop]) elif not pimms.is_vector(prop): raise ValueError('prop must be a property name or a vector or a combination of these') else: prop = np.asarray(prop) if dtype is Ellipsis: dtype = prop.dtype # Go ahead and process the weights if pimms.is_str(weights): if obj is None: raise ValueError('a weight name but no data object given to to_property') else: weights = obj[weights] weights_orig = weights if weights is None or weight_min is None: low_weight = np.asarray([], dtype=np.int) else: if weight_transform is Ellipsis: weights = np.array(weights, dtype=np.float) weights[weights < 0] = 0 elif weight_transform is not None: weight = weight_transform(np.asarray(weights)) if not pimms.is_vector(weights, 'real'): raise ValueError('weights must be a real-valued vector or property name for such') low_weight = (np.asarray([], dtype=np.int) if weight_min is None else np.where(weights < weight_min)[0]) # we can also process the outliers outliers = np.asarray([], dtype=np.int) if outliers is None else np.arange(len(prop))[outliers] outliers = np.union1d(outliers, low_weight) # low-weight vertices are treated as outliers # make sure we interpret mask correctly... mask = to_mask(obj, mask, indices=True) # Now process the property depending on whether the type is numeric or not if pimms.is_array(prop, 'number'): if pimms.is_array(prop, 'int'): prop = np.array(prop, dtype=np.float) else: prop = np.array(prop) # complex or reals can support nan if not np.isnan(null): prop[prop == null] = np.nan mask_nan = np.isnan(prop) mask_inf = np.isinf(prop) where_nan = np.where(mask_nan)[0] where_inf = np.where(mask_inf)[0] where_ok = np.where(np.logical_not(mask_nan | mask_inf))[0] # look at the valid_range... if valid_range is None: where_inv = np.asarray([], dtype=np.int) else: where_inv = where_ok[(prop[where_ok] < valid_range[0]) | (prop[where_ok] > valid_range[1])] where_nan = np.union1d(where_nan, where_inv) mask = np.setdiff1d(mask, where_nan) # Find the outliers: values specified as outliers or inf values; will build this as we go outliers = np.intersect1d(outliers, mask) # outliers not in the mask don't matter anyway # If there's a data range argument, deal with how it affects outliers if data_range is not None: if not pimms.is_vector(data_range): data_range = (0, data_range) mii = mask[(prop[mask] < data_range[0]) | (prop[mask] > data_range[1])] outliers = np.union1d(outliers, mii) # no matter what, trim out the infinite values (even if inf was in the data range) outliers = np.union1d(outliers, mask[np.isinf(prop[mask])]) # Okay, mark everything in the prop: unmask = np.setdiff1d(np.arange(len(prop), dtype=np.int), mask) if len(outliers) > 0: prop[outliers] = clipped if len(unmask) > 0: prop[unmask] = null prop = prop.astype(dtype) elif len(mask) < len(prop) or len(outliers) > 0: # not a number array; we cannot do fancy trimming of values tmp = np.full(len(prop), null, dtype=dtype) tmp[mask] = prop[mask] if len(outliers) > 0: tmp[outliers] = clipped if yield_weight: if weights is None or not pimms.is_vector(weights): weights = np.ones(len(prop)) else: weights = np.array(weights, dtype=np.float) weights[where_nan] = 0 weights[outliers] = 0 # transform? if transform: prop = transform(prop) # That's it, just return return (prop, weights) if yield_weight else prop
python
def to_property(obj, prop=None, dtype=Ellipsis, outliers=None, data_range=None, clipped=np.inf, weights=None, weight_min=0, weight_transform=Ellipsis, mask=None, valid_range=None, null=np.nan, transform=None, yield_weight=False): ''' to_property(obj, prop) yields the given property from obj after performing a set of filters on the property, as specified by the options. In the property array that is returned, the values that are considered outliers (data out of some range) are indicated by numpy.inf, and values that are not in the optionally-specified mask are given the value numpy.nan; these may be changed with the clipped and null options, respectively. to_property((obj, prop)) is equivalent to to_property(obj, prop). The property argument prop may be either specified as a string (a property name in the object) or as a property vector. The weights option may also be specified this way. Additionally, the prop arg may be a list such as ['polar_angle', 'eccentricity'] where each element is either a string or a vector, in which case the result is a matrix of properties. Finally, prop may be a set of property names, in which case the return value is an itable whose keys are the property names. The obj argument may be either a VertexSet object (such as a Mesh or Tesselation) or a mapping object such as a pimms ITable. If no strings are used to specify properties, it may additionally be omitted or set to None. The following options are accepted: * outliers (default:None) specifies the vertices that should be considered outliers; this may be either None (no outliers explicitly specified), a list of indices, or a boolean mask. * data_range (default:None) specifies the acceptable data range for values in the property; if None then this paramter is ignored. If specified as a pair of numbers (min, max), then data that is less than the min or greater than the max is marked as an outlier (in addition to other explicitly specified outliers). The values np.inf or -np.inf can be specified to indicate a one-sided range. * clipped (default:np.inf) specifies the value to be used to mark an out-of-range value in the returned array. * mask (default:None) specifies the vertices that should be included in the property array; values are specified in the mask similarly to the outliers option, except that mask values are included rather than excluded. The mask takes precedence over the outliers, in that a null (out-of-mask) value is always marked as null rather than clipped. * valid_range (default: None) specifies the range of values that are considered valid; i.e., values outside of the range are marked as null. Specified the same way as data_range. * null (default: np.nan) specifies the value marked in the array as out-of-mask. * transform (default:None) may optionally provide a function to be passed the array prior to being returned (after null and clipped values are marked). * dtype (defaut:Ellipsis) specifies the type of the array that should be returned. Ellipsis indicates that the type of the given property should be used. If None, then a normal Python array is returned. Otherwise, should be a numpy type such as numpy.real64 or numpy.complex128. * weights (default:Ellipsis) specifies the property or property array that should be examined as the weights. The default, Ellipsis, simply chops values that are close to or less than 0 such that they are equal to 0. None specifies that no transformation should be applied. * weight_min (default:0) specifies the value at-or-below which the weight is considered insignificant and the value is marked as clipped. * weight_transform (default:None) specifies a function that should be applied to the weight array before being used in the function. * yield_weight (default:False) specifies, if True, that instead of yielding prop, yield the tuple (prop, weights). ''' # was an arg given, or is obj a tuple? if pimms.is_vector(obj) and len(obj) < 4 and prop is None: kw0 = dict(dtype=dtype, null=null, outliers=outliers, data_range=data_range, clipped=clipped, weights=weights, weight_min=weight_min, weight_transform=weight_transform, mask=mask, valid_range=valid_range, transform=transform, yield_weight=yield_weight) if len(obj) == 2: return to_property(obj[0], obj[1], **kw0) elif len(obj) == 3: return to_property(obj[0], obj[1], **pimms.merge(kw0, obj[2])) else: raise ValueError('Bad input vector given to to_property()') # we could have been given a property alone or a map/vertex-set and a property if prop is None: raise ValueError('No property given to to_property()') # if it's a vertex-set, we want to note that and get the map if isinstance(obj, VertexSet): (vset, obj) = (obj, obj.properties) elif pimms.is_map(obj): (vset, obj) = (None, obj) elif obj is None: (vset, obj) = (None, None) else: ValueError('Data object given to to_properties() is neither a vertex-set nor a mapping') # Now, get the property array, as an array if pimms.is_str(prop): if obj is None: raise ValueError('a property name but no data object given to to_property') else: prop = obj[prop] if is_set(prop): def _lazy_prop(kk): return lambda:to_property(obj, kk, dtype=dtype, null=null, outliers=outliers, data_range=data_range, clipped=clipped, weights=weights, weight_min=weight_min, weight_transform=weight_transform, mask=mask, valid_range=valid_range, transform=transform, yield_weight=yield_weight) return pimms.itable({k:_lazy_prop(k) for k in prop}) elif (pimms.is_matrix(prop) or (pimms.is_vector(prop) and all(pimms.is_str(p) or pimms.is_vector(p) for p in prop))): return np.asarray([to_property(obj, k, dtype=dtype, null=null, outliers=outliers, data_range=data_range, clipped=clipped, weights=weights, weight_min=weight_min, weight_transform=weight_transform, mask=mask, valid_range=valid_range, transform=transform, yield_weight=yield_weight) for k in prop]) elif not pimms.is_vector(prop): raise ValueError('prop must be a property name or a vector or a combination of these') else: prop = np.asarray(prop) if dtype is Ellipsis: dtype = prop.dtype # Go ahead and process the weights if pimms.is_str(weights): if obj is None: raise ValueError('a weight name but no data object given to to_property') else: weights = obj[weights] weights_orig = weights if weights is None or weight_min is None: low_weight = np.asarray([], dtype=np.int) else: if weight_transform is Ellipsis: weights = np.array(weights, dtype=np.float) weights[weights < 0] = 0 elif weight_transform is not None: weight = weight_transform(np.asarray(weights)) if not pimms.is_vector(weights, 'real'): raise ValueError('weights must be a real-valued vector or property name for such') low_weight = (np.asarray([], dtype=np.int) if weight_min is None else np.where(weights < weight_min)[0]) # we can also process the outliers outliers = np.asarray([], dtype=np.int) if outliers is None else np.arange(len(prop))[outliers] outliers = np.union1d(outliers, low_weight) # low-weight vertices are treated as outliers # make sure we interpret mask correctly... mask = to_mask(obj, mask, indices=True) # Now process the property depending on whether the type is numeric or not if pimms.is_array(prop, 'number'): if pimms.is_array(prop, 'int'): prop = np.array(prop, dtype=np.float) else: prop = np.array(prop) # complex or reals can support nan if not np.isnan(null): prop[prop == null] = np.nan mask_nan = np.isnan(prop) mask_inf = np.isinf(prop) where_nan = np.where(mask_nan)[0] where_inf = np.where(mask_inf)[0] where_ok = np.where(np.logical_not(mask_nan | mask_inf))[0] # look at the valid_range... if valid_range is None: where_inv = np.asarray([], dtype=np.int) else: where_inv = where_ok[(prop[where_ok] < valid_range[0]) | (prop[where_ok] > valid_range[1])] where_nan = np.union1d(where_nan, where_inv) mask = np.setdiff1d(mask, where_nan) # Find the outliers: values specified as outliers or inf values; will build this as we go outliers = np.intersect1d(outliers, mask) # outliers not in the mask don't matter anyway # If there's a data range argument, deal with how it affects outliers if data_range is not None: if not pimms.is_vector(data_range): data_range = (0, data_range) mii = mask[(prop[mask] < data_range[0]) | (prop[mask] > data_range[1])] outliers = np.union1d(outliers, mii) # no matter what, trim out the infinite values (even if inf was in the data range) outliers = np.union1d(outliers, mask[np.isinf(prop[mask])]) # Okay, mark everything in the prop: unmask = np.setdiff1d(np.arange(len(prop), dtype=np.int), mask) if len(outliers) > 0: prop[outliers] = clipped if len(unmask) > 0: prop[unmask] = null prop = prop.astype(dtype) elif len(mask) < len(prop) or len(outliers) > 0: # not a number array; we cannot do fancy trimming of values tmp = np.full(len(prop), null, dtype=dtype) tmp[mask] = prop[mask] if len(outliers) > 0: tmp[outliers] = clipped if yield_weight: if weights is None or not pimms.is_vector(weights): weights = np.ones(len(prop)) else: weights = np.array(weights, dtype=np.float) weights[where_nan] = 0 weights[outliers] = 0 # transform? if transform: prop = transform(prop) # That's it, just return return (prop, weights) if yield_weight else prop
[ "def", "to_property", "(", "obj", ",", "prop", "=", "None", ",", "dtype", "=", "Ellipsis", ",", "outliers", "=", "None", ",", "data_range", "=", "None", ",", "clipped", "=", "np", ".", "inf", ",", "weights", "=", "None", ",", "weight_min", "=", "0", ...
to_property(obj, prop) yields the given property from obj after performing a set of filters on the property, as specified by the options. In the property array that is returned, the values that are considered outliers (data out of some range) are indicated by numpy.inf, and values that are not in the optionally-specified mask are given the value numpy.nan; these may be changed with the clipped and null options, respectively. to_property((obj, prop)) is equivalent to to_property(obj, prop). The property argument prop may be either specified as a string (a property name in the object) or as a property vector. The weights option may also be specified this way. Additionally, the prop arg may be a list such as ['polar_angle', 'eccentricity'] where each element is either a string or a vector, in which case the result is a matrix of properties. Finally, prop may be a set of property names, in which case the return value is an itable whose keys are the property names. The obj argument may be either a VertexSet object (such as a Mesh or Tesselation) or a mapping object such as a pimms ITable. If no strings are used to specify properties, it may additionally be omitted or set to None. The following options are accepted: * outliers (default:None) specifies the vertices that should be considered outliers; this may be either None (no outliers explicitly specified), a list of indices, or a boolean mask. * data_range (default:None) specifies the acceptable data range for values in the property; if None then this paramter is ignored. If specified as a pair of numbers (min, max), then data that is less than the min or greater than the max is marked as an outlier (in addition to other explicitly specified outliers). The values np.inf or -np.inf can be specified to indicate a one-sided range. * clipped (default:np.inf) specifies the value to be used to mark an out-of-range value in the returned array. * mask (default:None) specifies the vertices that should be included in the property array; values are specified in the mask similarly to the outliers option, except that mask values are included rather than excluded. The mask takes precedence over the outliers, in that a null (out-of-mask) value is always marked as null rather than clipped. * valid_range (default: None) specifies the range of values that are considered valid; i.e., values outside of the range are marked as null. Specified the same way as data_range. * null (default: np.nan) specifies the value marked in the array as out-of-mask. * transform (default:None) may optionally provide a function to be passed the array prior to being returned (after null and clipped values are marked). * dtype (defaut:Ellipsis) specifies the type of the array that should be returned. Ellipsis indicates that the type of the given property should be used. If None, then a normal Python array is returned. Otherwise, should be a numpy type such as numpy.real64 or numpy.complex128. * weights (default:Ellipsis) specifies the property or property array that should be examined as the weights. The default, Ellipsis, simply chops values that are close to or less than 0 such that they are equal to 0. None specifies that no transformation should be applied. * weight_min (default:0) specifies the value at-or-below which the weight is considered insignificant and the value is marked as clipped. * weight_transform (default:None) specifies a function that should be applied to the weight array before being used in the function. * yield_weight (default:False) specifies, if True, that instead of yielding prop, yield the tuple (prop, weights).
[ "to_property", "(", "obj", "prop", ")", "yields", "the", "given", "property", "from", "obj", "after", "performing", "a", "set", "of", "filters", "on", "the", "property", "as", "specified", "by", "the", "options", ".", "In", "the", "property", "array", "tha...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/mesh.py#L285-L458
train
Returns a property array that is a generator that yields the given property array from the given object.
GiP5xwVCF98Z,B3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T9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b11111 + 0o21) + '\x6f' + chr(0b10 + 0o60) + '\x30' + '\x30', 0b1000), nzTpIcepk0o8(chr(0b101111 + 0o1) + '\x6f' + chr(50) + chr(0b110100) + chr(0b110110), 0o10), nzTpIcepk0o8('\060' + chr(299 - 188) + chr(53) + '\x35', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\x32' + '\060' + chr(0b110000), 8), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(0b1100111 + 0o10) + chr(0b100 + 0o57) + chr(48) + chr(904 - 850), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1000001 + 0o56) + chr(51) + chr(48) + chr(55), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b1111 + 0o44) + '\061', 0b1000), nzTpIcepk0o8(chr(1904 - 1856) + chr(9718 - 9607) + chr(50) + chr(0b11 + 0o56) + '\064', ord("\x08")), nzTpIcepk0o8(chr(2199 - 2151) + chr(0b1101111) + chr(51) + chr(53) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + chr(53) + '\061', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + chr(51) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(1553 - 1505) + chr(10693 - 10582) + chr(50) + chr(0b100000 + 0o22) + '\x31', 0b1000), nzTpIcepk0o8(chr(2101 - 2053) + '\157' + chr(55), 0o10), nzTpIcepk0o8('\060' + chr(0b1000001 + 0o56) + chr(0b1000 + 0o51) + chr(0b1111 + 0o41), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + chr(770 - 718) + '\065', 58498 - 58490), nzTpIcepk0o8(chr(0b110000) + chr(0b1000010 + 0o55) + chr(617 - 566) + '\x30' + chr(48), 0o10), nzTpIcepk0o8(chr(2189 - 2141) + chr(0b11010 + 0o125) + chr(0b110011) + '\x32' + chr(49), 14799 - 14791), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + '\061' + chr(49), 0o10), nzTpIcepk0o8('\060' + chr(0b1001000 + 0o47) + '\x31' + chr(0b100010 + 0o21) + chr(54), 0o10), nzTpIcepk0o8(chr(0b1110 + 0o42) + '\x6f' + chr(54) + chr(1636 - 1586), 0o10), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\x6f' + '\x31' + chr(0b110101) + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(2546 - 2495) + chr(54) + chr(1731 - 1677), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001), 35775 - 35767), nzTpIcepk0o8(chr(251 - 203) + '\x6f' + chr(708 - 657) + chr(0b110110) + chr(0b1 + 0o64), 0b1000), nzTpIcepk0o8('\060' + chr(0b110010 + 0o75) + chr(0b110001 + 0o2) + chr(84 - 35) + '\x32', 0b1000), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(0b1011100 + 0o23) + chr(0b110011) + chr(0b111 + 0o52) + chr(1628 - 1576), ord("\x08")), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(111) + '\x31' + chr(0b100 + 0o62) + '\062', 35407 - 35399), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + '\060' + chr(0b110110), 8), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(0b1101111) + chr(0b11010 + 0o31) + chr(2299 - 2247) + chr(53), 40145 - 40137), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(51) + chr(0b100101 + 0o15), 0o10), nzTpIcepk0o8(chr(0b11010 + 0o26) + '\x6f' + '\x31' + chr(0b101011 + 0o11) + chr(2063 - 2015), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\067' + chr(0b110011), 0o10), nzTpIcepk0o8(chr(1505 - 1457) + chr(111) + '\x37' + chr(0b11100 + 0o32), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(5943 - 5832) + chr(50) + chr(0b110010) + '\060', 7900 - 7892), nzTpIcepk0o8(chr(0b100 + 0o54) + '\157' + chr(49) + chr(0b1000 + 0o53) + '\x33', 0b1000), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(0b1101011 + 0o4) + chr(51) + chr(1336 - 1287) + chr(0b110100), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b100001 + 0o21) + chr(0b11001 + 0o32) + chr(1252 - 1199), 41224 - 41216), nzTpIcepk0o8(chr(0b100101 + 0o13) + '\x6f' + chr(0b11001 + 0o32) + chr(578 - 526) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + '\061' + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(468 - 417) + chr(0b110101) + '\062', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(568 - 457) + '\065' + chr(48), 14833 - 14825)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xae'), '\144' + chr(101) + chr(0b1100010 + 0o1) + chr(0b1010110 + 0o31) + chr(0b1100100) + '\x65')(chr(117) + chr(0b1110100) + chr(0b1100110) + '\x2d' + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def gIYE7k6sMMbO(kIMfkyypPTcC, RvoBw1HupUDa=None, RcX9bbuOzh5L=RjQP07DYIdkf, l_XbxTJKTKk5=None, C3J6efgF3Sty=None, ImNCXMyvHdev=roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xe6\xebc\xf8\x9e\xfe}\xcb\x8c\xdc\x12\xa8'), chr(9409 - 9309) + chr(0b1100101) + chr(2437 - 2338) + chr(0b111011 + 0o64) + chr(100) + chr(0b1100101))('\165' + '\x74' + '\146' + chr(0b101101) + chr(0b11110 + 0o32))), TtzqJLqe_ecy=None, Ln79tjAfkW3Z=nzTpIcepk0o8(chr(48) + chr(111) + '\x30', 0b1000), zE1VNchq4Yfu=RjQP07DYIdkf, BBM8dxm7YWge=None, L9cCeviOO53V=None, S80ixeP3rRkl=roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xee\xc7C'), chr(0b111110 + 0o46) + chr(101) + '\143' + chr(12177 - 12066) + chr(0b1100100) + '\x65')(chr(7634 - 7517) + '\164' + chr(4828 - 4726) + chr(0b10011 + 0o32) + chr(1201 - 1145))), ioI6nQEObAZT=None, Rz_tS8EUwH0h=nzTpIcepk0o8(chr(291 - 243) + chr(0b10101 + 0o132) + '\060', 8)): if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xe9\xd5r\xf6\xa3\xa4m\xe3\x9f'), '\144' + chr(0b1010100 + 0o21) + '\143' + chr(6812 - 6701) + chr(0b101001 + 0o73) + chr(0b1100101))(chr(0b10110 + 0o137) + chr(116) + chr(0b0 + 0o146) + chr(0b101 + 0o50) + chr(0b10011 + 0o45)))(kIMfkyypPTcC) and ftfygxgFas5X(kIMfkyypPTcC) < nzTpIcepk0o8('\x30' + chr(0b101111 + 0o100) + chr(52), ord("\x08")) and (RvoBw1HupUDa is None): Y5kGCXv5wbB3 = znjnJWK64FDT(dtype=RcX9bbuOzh5L, null=S80ixeP3rRkl, outliers=l_XbxTJKTKk5, data_range=C3J6efgF3Sty, clipped=ImNCXMyvHdev, weights=TtzqJLqe_ecy, weight_min=Ln79tjAfkW3Z, weight_transform=zE1VNchq4Yfu, mask=BBM8dxm7YWge, valid_range=L9cCeviOO53V, transform=ioI6nQEObAZT, yield_weight=Rz_tS8EUwH0h) if ftfygxgFas5X(kIMfkyypPTcC) == nzTpIcepk0o8('\060' + chr(111) + chr(50), 0o10): return gIYE7k6sMMbO(kIMfkyypPTcC[nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\060', 8)], kIMfkyypPTcC[nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1092 - 1043), 8)], **Y5kGCXv5wbB3) elif ftfygxgFas5X(kIMfkyypPTcC) == nzTpIcepk0o8(chr(48) + '\x6f' + '\063', 33679 - 33671): return gIYE7k6sMMbO(kIMfkyypPTcC[nzTpIcepk0o8(chr(0b1110 + 0o42) + '\x6f' + chr(0b1 + 0o57), 8)], kIMfkyypPTcC[nzTpIcepk0o8(chr(48) + chr(0b1101100 + 0o3) + '\x31', 8)], **roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xed\xc3_\xe7\xa3'), chr(100) + '\145' + chr(99) + '\x6f' + chr(2557 - 2457) + '\x65')(chr(0b1011100 + 0o31) + chr(0b1011100 + 0o30) + chr(102) + '\x2d' + '\x38'))(Y5kGCXv5wbB3, kIMfkyypPTcC[nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b0 + 0o62), 8)])) else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xc2\xc7I\xa0\xaf\xa9i\xf9\x99\xc9,\xf4d|\xca\xb2\xf1\xee7D\x0f\x98!\x81\xa5\xec\x06\xa9\xbaj\x12TN\xf5)\xb8\xe4\xcbg'), chr(100) + '\145' + chr(0b11100 + 0o107) + chr(0b101010 + 0o105) + chr(0b10101 + 0o117) + chr(101))(chr(0b1110101) + '\164' + chr(102) + chr(45) + '\x38')) if RvoBw1HupUDa is None: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xce\xc9\r\xf0\xb4\xa8i\xe9\x9f\x9d#\xb1`a\xd3\xa5\xbf\xa9*]J\x82n\xaa\xba\xbe\x1d\xb6\x80h\x14B\x16\xb9'), '\x64' + chr(101) + chr(99) + '\x6f' + chr(8674 - 8574) + chr(0b1100101))('\165' + '\164' + chr(0b1000111 + 0o37) + '\x2d' + chr(2750 - 2694))) if suIjIS24Zkqw(kIMfkyypPTcC, FlIABfotJ9Ah): (JcjNeu8uyisN, kIMfkyypPTcC) = (kIMfkyypPTcC, kIMfkyypPTcC.UtZvTnutzMHg) elif roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xe9\xd5r\xed\xa7\xb7'), chr(6062 - 5962) + '\x65' + '\x63' + '\x6f' + chr(4031 - 3931) + '\x65')(chr(0b111010 + 0o73) + chr(0b1110100) + chr(102) + chr(2010 - 1965) + '\070'))(kIMfkyypPTcC): (JcjNeu8uyisN, kIMfkyypPTcC) = (None, kIMfkyypPTcC) elif kIMfkyypPTcC is None: (JcjNeu8uyisN, kIMfkyypPTcC) = (None, None) else: WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xc4\xc7Y\xe1\xe6\xa8{\xe6\x88\x8a.\xb1`a\xd3\xa5\xbf\xa9*]J\x82n\xaa\xba\xbe\x1d\xb6\x80h\x14R[\xe3s\xe5\xbd\x8a=\xca\xee\xc3D\xf4\xae\xa2k\xac\x8c\xc9,\xf4u|\xc0\xb8\xfc\xfa;FJ\x98n\x87\xea\xadR\xab\x84j\x10RP\xf7'), chr(100) + chr(101) + chr(0b1100011) + chr(111) + chr(7917 - 7817) + '\145')(chr(0b1110101) + chr(116) + chr(7660 - 7558) + '\x2d' + chr(0b111000))) if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xe9\xd5r\xf3\xb2\xb5'), chr(100) + chr(5087 - 4986) + chr(6559 - 6460) + chr(0b1101010 + 0o5) + '\144' + chr(9987 - 9886))('\165' + chr(0b100011 + 0o121) + chr(0b11100 + 0o112) + '\x2d' + '\x38'))(RvoBw1HupUDa): if kIMfkyypPTcC is None: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xe1\x86]\xf2\xa9\xb7|\xfe\x99\x90z\xfffe\xc0\xe0\xb3\xfc*\x12\x04\x99!\x91\xab\xb8\x13\xe6\x8ax\n^]\xe4{\xab\xf4\x95+\x84\xa0\xd2B\xa0\xb2\xa8F\xfc\x9f\x86*\xf4u|\xdc'), '\144' + chr(0b1100101) + chr(99) + chr(111) + chr(8084 - 7984) + chr(1549 - 1448))(chr(0b1110101) + chr(0b1010 + 0o152) + chr(1387 - 1285) + '\055' + '\070')) else: RvoBw1HupUDa = kIMfkyypPTcC[RvoBw1HupUDa] if kP3CFzymNGOD(RvoBw1HupUDa): def dkDyDLRhykAQ(kh8Rprxl44kg): return lambda : gIYE7k6sMMbO(kIMfkyypPTcC, kh8Rprxl44kg, dtype=RcX9bbuOzh5L, null=S80ixeP3rRkl, outliers=l_XbxTJKTKk5, data_range=C3J6efgF3Sty, clipped=ImNCXMyvHdev, weights=TtzqJLqe_ecy, weight_min=Ln79tjAfkW3Z, weight_transform=zE1VNchq4Yfu, mask=BBM8dxm7YWge, valid_range=L9cCeviOO53V, transform=ioI6nQEObAZT, yield_weight=Rz_tS8EUwH0h) return roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xe9\xd2L\xe2\xaa\xa2'), chr(0b1100100) + chr(1511 - 1410) + chr(99) + chr(1820 - 1709) + '\x64' + chr(0b1100101))('\x75' + '\164' + chr(1841 - 1739) + chr(0b11010 + 0o23) + chr(0b111000)))({B6UAF1zReOyJ: dkDyDLRhykAQ(B6UAF1zReOyJ) for B6UAF1zReOyJ in RvoBw1HupUDa}) elif roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xe9\xd5r\xed\xa7\xb3k\xe5\x95'), chr(9103 - 9003) + chr(0b1100101) + chr(8576 - 8477) + chr(111) + chr(0b1100100) + chr(0b100101 + 0o100))('\x75' + chr(116) + chr(102) + chr(0b101101) + '\x38'))(RvoBw1HupUDa) or (roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xe9\xd5r\xf6\xa3\xa4m\xe3\x9f'), chr(0b1010001 + 0o23) + chr(0b1100101) + chr(99) + '\157' + chr(6954 - 6854) + '\x65')(chr(0b1110101) + chr(10075 - 9959) + chr(102) + '\x2d' + '\070'))(RvoBw1HupUDa) and qX60lO1lgHA5((roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xe9\xd5r\xf3\xb2\xb5'), chr(0b1010001 + 0o23) + chr(0b1100101) + chr(0b10101 + 0o116) + chr(0b1101111) + '\x64' + chr(1150 - 1049))(chr(0b101000 + 0o115) + chr(0b1110100) + chr(102) + '\x2d' + '\x38'))(fSdw5wwLo9MO) or roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xe9\xd5r\xf6\xa3\xa4m\xe3\x9f'), '\144' + chr(4964 - 4863) + '\x63' + chr(2922 - 2811) + chr(0b1100100) + '\145')(chr(0b1110101) + '\x74' + chr(0b1010101 + 0o21) + chr(45) + chr(609 - 553)))(fSdw5wwLo9MO) for fSdw5wwLo9MO in RvoBw1HupUDa))): return roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xe1\xd5L\xf2\xb4\xa6`'), '\144' + '\x65' + chr(0b1100011) + '\157' + chr(0b1100100) + chr(101))(chr(117) + '\x74' + '\x66' + '\055' + '\070'))([gIYE7k6sMMbO(kIMfkyypPTcC, B6UAF1zReOyJ, dtype=RcX9bbuOzh5L, null=S80ixeP3rRkl, outliers=l_XbxTJKTKk5, data_range=C3J6efgF3Sty, clipped=ImNCXMyvHdev, weights=TtzqJLqe_ecy, weight_min=Ln79tjAfkW3Z, weight_transform=zE1VNchq4Yfu, mask=BBM8dxm7YWge, valid_range=L9cCeviOO53V, transform=ioI6nQEObAZT, yield_weight=Rz_tS8EUwH0h) for B6UAF1zReOyJ in RvoBw1HupUDa]) elif not roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xe9\xd5r\xf6\xa3\xa4m\xe3\x9f'), chr(0b1111 + 0o125) + chr(0b1100101) + '\143' + chr(7572 - 7461) + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(0b1101010 + 0o12) + '\146' + '\055' + chr(56)))(RvoBw1HupUDa): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b"\xf0\xd4B\xf0\xe6\xaal\xff\x99\xc98\xf4'i\x85\xb0\xa3\xe6.W\x18\x82x\xd5\xa4\xad\x1f\xa3\xc5u\x12\x1b_\xb0-\xa9\xfe\x97!\x98\xa0\xc9_\xa0\xa7\xe7z\xe3\x80\x8b3\xfff|\xcc\xaf\xbf\xa91TJ\x82i\x90\xb9\xa9"), '\144' + '\145' + chr(5093 - 4994) + '\x6f' + chr(0b1100100) + chr(0b100101 + 0o100))('\x75' + chr(751 - 635) + chr(102) + '\055' + '\070')) else: RvoBw1HupUDa = nDF4gVNx0u9Q.asarray(RvoBw1HupUDa) if RcX9bbuOzh5L is RjQP07DYIdkf: RcX9bbuOzh5L = RvoBw1HupUDa.RcX9bbuOzh5L if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xe9\xd5r\xf3\xb2\xb5'), chr(0b10001 + 0o123) + chr(0b101000 + 0o75) + chr(0b1100011) + '\x6f' + chr(0b1100100) + '\x65')(chr(0b1000001 + 0o64) + '\164' + chr(8584 - 8482) + chr(0b101101) + chr(56)))(TtzqJLqe_ecy): if kIMfkyypPTcC is None: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xe1\x86Z\xe5\xaf\xa0q\xf8\xcd\x87;\xfcb(\xc7\xb5\xa5\xa90]J\x92`\x81\xab\xec\x1d\xa4\x8f\x7f\x03O\x1e\xf72\xba\xf8\x8dn\x9e\xef\x86Y\xef\x99\xb7k\xe3\x9d\x8c(\xe5~'), chr(0b1100100) + '\x65' + chr(4638 - 4539) + chr(0b1101111) + '\144' + chr(101))(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(1966 - 1921) + chr(0b111000))) else: TtzqJLqe_ecy = kIMfkyypPTcC[TtzqJLqe_ecy] vJiG5EZUwfuT = TtzqJLqe_ecy if TtzqJLqe_ecy is None or Ln79tjAfkW3Z is None: I1hVIwKMb7YD = nDF4gVNx0u9Q.asarray([], dtype=nDF4gVNx0u9Q.nzTpIcepk0o8) else: if zE1VNchq4Yfu is RjQP07DYIdkf: TtzqJLqe_ecy = nDF4gVNx0u9Q.Tn6rGr7XTM7t(TtzqJLqe_ecy, dtype=nDF4gVNx0u9Q.float) TtzqJLqe_ecy[TtzqJLqe_ecy < nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(6366 - 6255) + '\060', 8)] = nzTpIcepk0o8('\x30' + chr(111) + chr(0b11001 + 0o27), 8) elif zE1VNchq4Yfu is not None: iBxKYeMqq_Bt = zE1VNchq4Yfu(nDF4gVNx0u9Q.asarray(TtzqJLqe_ecy)) if not roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xe9\xd5r\xf6\xa3\xa4m\xe3\x9f'), chr(5304 - 5204) + '\x65' + '\x63' + '\157' + '\x64' + '\x65')(chr(117) + chr(11193 - 11077) + '\146' + '\x2d' + chr(0b111000)))(TtzqJLqe_ecy, roI3spqORKae(ES5oEprVxulp(b'\xf2\xc3L\xec'), chr(0b1100100) + chr(101) + chr(5705 - 5606) + chr(10756 - 10645) + '\144' + chr(101))(chr(0b1011111 + 0o26) + chr(211 - 95) + '\146' + chr(0b101101) + chr(0b10111 + 0o41))): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b"\xf7\xc3D\xe7\xae\xb3j\xac\x80\x9c)\xe5'j\xc0\xe0\xb0\xa9,W\x0b\x9a,\x83\xab\xa0\x07\xa3\x81:\x16^]\xe44\xbe\xbd\x8c<\xca\xf0\xd4B\xf0\xa3\xb5m\xf5\xcd\x87;\xfcb(\xc3\xaf\xa3\xa9-G\t\x9e"), chr(0b1100000 + 0o4) + chr(8612 - 8511) + '\143' + '\x6f' + chr(4590 - 4490) + chr(101))(chr(0b1110101) + chr(116) + chr(7484 - 7382) + chr(0b1101 + 0o40) + chr(3003 - 2947))) I1hVIwKMb7YD = nDF4gVNx0u9Q.asarray([], dtype=nDF4gVNx0u9Q.nzTpIcepk0o8) if Ln79tjAfkW3Z is None else nDF4gVNx0u9Q.xWH4M7K6Qbd3(TtzqJLqe_ecy < Ln79tjAfkW3Z)[nzTpIcepk0o8(chr(48) + '\157' + '\060', 8)] l_XbxTJKTKk5 = nDF4gVNx0u9Q.asarray([], dtype=nDF4gVNx0u9Q.nzTpIcepk0o8) if l_XbxTJKTKk5 is None else nDF4gVNx0u9Q.chmI_GMU_sEi(ftfygxgFas5X(RvoBw1HupUDa))[l_XbxTJKTKk5] l_XbxTJKTKk5 = nDF4gVNx0u9Q.union1d(l_XbxTJKTKk5, I1hVIwKMb7YD) BBM8dxm7YWge = lKC_czfSBtVT(kIMfkyypPTcC, BBM8dxm7YWge, indices=nzTpIcepk0o8('\x30' + '\157' + chr(0b1110 + 0o43), 8)) if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xe9\xd5r\xe1\xb4\xb5x\xf5'), chr(0b1100100) + chr(9747 - 9646) + chr(0b1100011) + chr(111) + chr(5516 - 5416) + chr(8515 - 8414))('\165' + chr(11940 - 11824) + chr(0b100101 + 0o101) + chr(0b11000 + 0o25) + chr(3126 - 3070)))(RvoBw1HupUDa, roI3spqORKae(ES5oEprVxulp(b'\xee\xd3@\xe2\xa3\xb5'), chr(0b1100100) + '\145' + chr(99) + '\x6f' + chr(1673 - 1573) + '\x65')(chr(0b1001011 + 0o52) + '\164' + chr(102) + chr(0b11100 + 0o21) + chr(56))): if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xe9\xd5r\xe1\xb4\xb5x\xf5'), chr(4690 - 4590) + chr(0b1100101) + chr(0b1100011) + '\x6f' + chr(100) + '\x65')(chr(4308 - 4191) + '\164' + chr(2312 - 2210) + '\x2d' + '\070'))(RvoBw1HupUDa, roI3spqORKae(ES5oEprVxulp(b'\xe9\xc8Y'), chr(0b1100100) + chr(101) + chr(0b1100011) + chr(0b101100 + 0o103) + chr(7816 - 7716) + '\145')('\x75' + chr(116) + '\146' + chr(0b10110 + 0o27) + chr(2311 - 2255))): RvoBw1HupUDa = nDF4gVNx0u9Q.Tn6rGr7XTM7t(RvoBw1HupUDa, dtype=nDF4gVNx0u9Q.float) else: RvoBw1HupUDa = nDF4gVNx0u9Q.Tn6rGr7XTM7t(RvoBw1HupUDa) if not roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xf7\x97\\\xb0\x92\xb0m\xcd\xb9\xb8l\xc9'), chr(0b11110 + 0o106) + chr(0b11 + 0o142) + chr(9507 - 9408) + '\x6f' + chr(0b1100100) + chr(0b1100101))(chr(117) + chr(0b1110100) + chr(0b11100 + 0o112) + chr(0b10000 + 0o35) + chr(1662 - 1606)))(S80ixeP3rRkl): RvoBw1HupUDa[RvoBw1HupUDa == S80ixeP3rRkl] = nDF4gVNx0u9Q.nan qZSptA_okCny = nDF4gVNx0u9Q.w1q0TwtATQ6X(RvoBw1HupUDa) k48cC2MZZ_zM = nDF4gVNx0u9Q.ETJJltpzIeDv(RvoBw1HupUDa) N3Pkydk9I4vC = nDF4gVNx0u9Q.xWH4M7K6Qbd3(qZSptA_okCny)[nzTpIcepk0o8(chr(921 - 873) + '\x6f' + '\x30', 8)] lZbpW_DCwAeB = nDF4gVNx0u9Q.xWH4M7K6Qbd3(k48cC2MZZ_zM)[nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b10111 + 0o31), 8)] q5nuFnZGyXcq = nDF4gVNx0u9Q.xWH4M7K6Qbd3(nDF4gVNx0u9Q.logical_not(qZSptA_okCny | k48cC2MZZ_zM))[nzTpIcepk0o8(chr(99 - 51) + chr(0b1101111) + '\x30', 8)] if L9cCeviOO53V is None: y7uJ48T8l2WU = nDF4gVNx0u9Q.asarray([], dtype=nDF4gVNx0u9Q.nzTpIcepk0o8) else: y7uJ48T8l2WU = q5nuFnZGyXcq[(RvoBw1HupUDa[q5nuFnZGyXcq] < L9cCeviOO53V[nzTpIcepk0o8('\x30' + chr(0b1101110 + 0o1) + chr(0b110000), 8)]) | (RvoBw1HupUDa[q5nuFnZGyXcq] > L9cCeviOO53V[nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1101111) + '\x31', 8)])] N3Pkydk9I4vC = nDF4gVNx0u9Q.union1d(N3Pkydk9I4vC, y7uJ48T8l2WU) BBM8dxm7YWge = nDF4gVNx0u9Q.setdiff1d(BBM8dxm7YWge, N3Pkydk9I4vC) l_XbxTJKTKk5 = nDF4gVNx0u9Q.intersect1d(l_XbxTJKTKk5, BBM8dxm7YWge) if C3J6efgF3Sty is not None: if not roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xe9\xd5r\xf6\xa3\xa4m\xe3\x9f'), chr(9864 - 9764) + '\x65' + chr(6627 - 6528) + chr(0b110010 + 0o75) + chr(0b1100100) + '\145')('\165' + '\164' + '\146' + '\055' + '\070'))(C3J6efgF3Sty): C3J6efgF3Sty = (nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1 + 0o57), 8), C3J6efgF3Sty) h275schEhyXm = BBM8dxm7YWge[(RvoBw1HupUDa[BBM8dxm7YWge] < C3J6efgF3Sty[nzTpIcepk0o8(chr(639 - 591) + chr(111) + '\060', 8)]) | (RvoBw1HupUDa[BBM8dxm7YWge] > C3J6efgF3Sty[nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001), 8)])] l_XbxTJKTKk5 = nDF4gVNx0u9Q.union1d(l_XbxTJKTKk5, h275schEhyXm) l_XbxTJKTKk5 = nDF4gVNx0u9Q.union1d(l_XbxTJKTKk5, BBM8dxm7YWge[nDF4gVNx0u9Q.ETJJltpzIeDv(RvoBw1HupUDa[BBM8dxm7YWge])]) deg57HzaCEH9 = nDF4gVNx0u9Q.setdiff1d(nDF4gVNx0u9Q.chmI_GMU_sEi(ftfygxgFas5X(RvoBw1HupUDa), dtype=nDF4gVNx0u9Q.nzTpIcepk0o8), BBM8dxm7YWge) if ftfygxgFas5X(l_XbxTJKTKk5) > nzTpIcepk0o8('\x30' + chr(0b1100000 + 0o17) + '\060', 8): RvoBw1HupUDa[l_XbxTJKTKk5] = ImNCXMyvHdev if ftfygxgFas5X(deg57HzaCEH9) > nzTpIcepk0o8(chr(0b110000) + '\157' + chr(48), 8): RvoBw1HupUDa[deg57HzaCEH9] = S80ixeP3rRkl RvoBw1HupUDa = RvoBw1HupUDa.astype(RcX9bbuOzh5L) elif ftfygxgFas5X(BBM8dxm7YWge) < ftfygxgFas5X(RvoBw1HupUDa) or ftfygxgFas5X(l_XbxTJKTKk5) > nzTpIcepk0o8(chr(0b100010 + 0o16) + '\157' + chr(0b110000), 8): PT32xG247TS3 = nDF4gVNx0u9Q.FQnMqH8X9LID(ftfygxgFas5X(RvoBw1HupUDa), S80ixeP3rRkl, dtype=RcX9bbuOzh5L) PT32xG247TS3[BBM8dxm7YWge] = RvoBw1HupUDa[BBM8dxm7YWge] if ftfygxgFas5X(l_XbxTJKTKk5) > nzTpIcepk0o8(chr(773 - 725) + chr(0b111000 + 0o67) + chr(681 - 633), 8): PT32xG247TS3[l_XbxTJKTKk5] = ImNCXMyvHdev if Rz_tS8EUwH0h: if TtzqJLqe_ecy is None or not roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xe9\xd5r\xf6\xa3\xa4m\xe3\x9f'), '\144' + chr(101) + chr(0b11000 + 0o113) + chr(0b110011 + 0o74) + chr(0b111010 + 0o52) + chr(101))('\165' + '\164' + chr(102) + chr(0b1110 + 0o37) + chr(1627 - 1571)))(TtzqJLqe_ecy): TtzqJLqe_ecy = nDF4gVNx0u9Q.rYPkZ8_2D0X1(ftfygxgFas5X(RvoBw1HupUDa)) else: TtzqJLqe_ecy = nDF4gVNx0u9Q.Tn6rGr7XTM7t(TtzqJLqe_ecy, dtype=nDF4gVNx0u9Q.float) TtzqJLqe_ecy[N3Pkydk9I4vC] = nzTpIcepk0o8(chr(1900 - 1852) + '\x6f' + chr(48), 8) TtzqJLqe_ecy[l_XbxTJKTKk5] = nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1101111) + '\x30', 8) if ioI6nQEObAZT: RvoBw1HupUDa = ioI6nQEObAZT(RvoBw1HupUDa) return (RvoBw1HupUDa, TtzqJLqe_ecy) if Rz_tS8EUwH0h else RvoBw1HupUDa
noahbenson/neuropythy
neuropythy/geometry/mesh.py
tess
def tess(faces, properties=None, meta_data=None): ''' tess(faces) yields a Tesselation object from the given face matrix. ''' return Tesselation(faces, properties=properties, meta_data=meta_data)
python
def tess(faces, properties=None, meta_data=None): ''' tess(faces) yields a Tesselation object from the given face matrix. ''' return Tesselation(faces, properties=properties, meta_data=meta_data)
[ "def", "tess", "(", "faces", ",", "properties", "=", "None", ",", "meta_data", "=", "None", ")", ":", "return", "Tesselation", "(", "faces", ",", "properties", "=", "properties", ",", "meta_data", "=", "meta_data", ")" ]
tess(faces) yields a Tesselation object from the given face matrix.
[ "tess", "(", "faces", ")", "yields", "a", "Tesselation", "object", "from", "the", "given", "face", "matrix", "." ]
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/mesh.py#L887-L891
train
Returns a Tesselation object from the given face matrix.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bI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nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(776 - 728) + chr(0b1101111) + chr(0b11000 + 0o32) + chr(1233 - 1178) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(2072 - 2024) + '\157' + chr(0b100011 + 0o20) + '\x30' + chr(53), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1110 + 0o44) + chr(1584 - 1529) + chr(0b11010 + 0o30), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1 + 0o63) + chr(0b110011), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + chr(0b110110 + 0o0), 0o10), nzTpIcepk0o8(chr(330 - 282) + chr(0b101010 + 0o105) + chr(0b110001) + chr(1130 - 1077) + '\064', 0b1000), nzTpIcepk0o8(chr(2258 - 2210) + chr(10626 - 10515) + chr(0b1101 + 0o51) + chr(0b110001), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(51) + chr(510 - 455) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + '\067' + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(111) + chr(0b110001) + chr(54) + '\x34', 0o10), nzTpIcepk0o8('\060' + chr(0b1100001 + 0o16) + '\062' + '\x34' + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b11000 + 0o127) + chr(51) + chr(0b100001 + 0o23) + chr(0b1011 + 0o51), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\062' + chr(0b110011 + 0o3) + chr(2489 - 2434), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101110 + 0o1) + '\x32' + chr(0b11001 + 0o32), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b11111 + 0o120) + chr(0b110011) + chr(0b100011 + 0o24), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b1101 + 0o44) + '\x35' + '\063', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(49), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(0b1100 + 0o50) + chr(0b10100 + 0o43), ord("\x08")), nzTpIcepk0o8(chr(1421 - 1373) + chr(111) + chr(51) + chr(54) + '\065', ord("\x08")), nzTpIcepk0o8(chr(2036 - 1988) + '\x6f' + chr(0b110001) + chr(0b110010) + chr(51), 64919 - 64911), nzTpIcepk0o8('\060' + chr(111) + chr(366 - 317) + '\065' + chr(1668 - 1619), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + '\x30' + chr(51), 23368 - 23360), nzTpIcepk0o8('\x30' + chr(11390 - 11279) + chr(0b110101), 12301 - 12293), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(0b1101111) + chr(0b1001 + 0o50) + chr(0b10100 + 0o40) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(54) + chr(2319 - 2268), 13902 - 13894), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(0b1101111) + '\062' + chr(52) + '\x35', 0o10), nzTpIcepk0o8(chr(2205 - 2157) + chr(7624 - 7513) + '\063' + '\x34' + '\x37', 8), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(111) + chr(0b110010) + chr(537 - 484) + chr(1039 - 985), 57171 - 57163), nzTpIcepk0o8('\x30' + '\157' + '\061' + '\x34' + '\064', 21850 - 21842), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + chr(0b110011) + chr(0b110011), 45005 - 44997), nzTpIcepk0o8(chr(0b101110 + 0o2) + '\157' + chr(0b110001) + chr(0b100000 + 0o24) + '\x33', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + chr(919 - 870) + chr(0b11011 + 0o33), 62636 - 62628), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(153 - 103) + '\x35' + '\x34', 0b1000), nzTpIcepk0o8(chr(1049 - 1001) + chr(0b1101111) + '\063' + chr(0b10001 + 0o43) + chr(0b100010 + 0o22), 8), nzTpIcepk0o8('\060' + '\x6f' + '\063' + chr(0b110101 + 0o1) + '\x33', 37188 - 37180), nzTpIcepk0o8('\x30' + '\x6f' + chr(2159 - 2109) + '\060' + '\061', 31420 - 31412), nzTpIcepk0o8(chr(0b11010 + 0o26) + '\x6f' + chr(49) + '\x33' + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(706 - 658) + '\x6f' + chr(230 - 180) + '\x30' + '\063', 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b1101111) + '\x33' + chr(54), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1001101 + 0o42) + chr(0b100111 + 0o12) + '\x35', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(6479 - 6368) + '\065' + '\x30', 23687 - 23679)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x91'), chr(100) + chr(4745 - 4644) + chr(0b1001001 + 0o32) + chr(0b1101111) + '\x64' + '\145')(chr(0b1011001 + 0o34) + chr(116) + '\146' + chr(0b1110 + 0o37) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def vDADDXg0D1_j(GxxcFi38ALnA, UtZvTnutzMHg=None, YmVq8cSlKKaV=None): return acxZZg4k02zC(GxxcFi38ALnA, properties=UtZvTnutzMHg, meta_data=YmVq8cSlKKaV)
noahbenson/neuropythy
neuropythy/geometry/mesh.py
mesh
def mesh(faces, coordinates, meta_data=None, properties=None): ''' mesh(faces, coordinates) yields a mesh with the given face and coordinate matrices. ''' return Mesh(faces, coordinates, meta_data=meta_data, properties=properties)
python
def mesh(faces, coordinates, meta_data=None, properties=None): ''' mesh(faces, coordinates) yields a mesh with the given face and coordinate matrices. ''' return Mesh(faces, coordinates, meta_data=meta_data, properties=properties)
[ "def", "mesh", "(", "faces", ",", "coordinates", ",", "meta_data", "=", "None", ",", "properties", "=", "None", ")", ":", "return", "Mesh", "(", "faces", ",", "coordinates", ",", "meta_data", "=", "meta_data", ",", "properties", "=", "properties", ")" ]
mesh(faces, coordinates) yields a mesh with the given face and coordinate matrices.
[ "mesh", "(", "faces", "coordinates", ")", "yields", "a", "mesh", "with", "the", "given", "face", "and", "coordinate", "matrices", "." ]
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/mesh.py#L1896-L1900
train
Returns a mesh with the given face and coordinate matrices.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ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64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + '\157' + '\063' + chr(2375 - 2320) + '\x37', 0b1000), nzTpIcepk0o8(chr(48) + chr(2622 - 2511) + chr(0b110011) + chr(2065 - 2014) + '\061', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(550 - 501) + '\x35' + '\065', 23280 - 23272), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b10011 + 0o37) + chr(773 - 722) + chr(0b1 + 0o61), 0b1000), nzTpIcepk0o8(chr(1804 - 1756) + chr(0b1101111) + chr(0b110011) + chr(2404 - 2349), 40353 - 40345), nzTpIcepk0o8(chr(0b1101 + 0o43) + '\x6f' + '\x36' + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\061' + chr(1391 - 1337) + chr(49), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b1000 + 0o53) + chr(50), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + chr(665 - 611) + chr(54), 0b1000), nzTpIcepk0o8(chr(1983 - 1935) + chr(0b1111 + 0o140) + chr(0b110011) + '\060' + chr(0b100010 + 0o16), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1 + 0o156) + chr(0b110001) + chr(2604 - 2552) + chr(49), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(8116 - 8005) + '\x37', 56261 - 56253), nzTpIcepk0o8(chr(750 - 702) + chr(111) + chr(0b110011) + chr(477 - 429), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + chr(997 - 945) + chr(811 - 762), 48927 - 48919), nzTpIcepk0o8('\x30' + chr(3833 - 3722) + chr(1141 - 1092) + '\x35' + '\x36', 40148 - 40140), nzTpIcepk0o8(chr(0b11100 + 0o24) + '\157' + chr(0b110001) + chr(0b1011 + 0o53) + chr(0b110110), 8), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001) + chr(0b1111 + 0o47) + chr(0b110010 + 0o4), 8), nzTpIcepk0o8(chr(0b0 + 0o60) + '\157' + chr(0b110001) + chr(0b110111) + '\061', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b100010 + 0o115) + '\062' + chr(0b100001 + 0o21) + chr(0b11111 + 0o27), 0o10), nzTpIcepk0o8(chr(1695 - 1647) + chr(0b101000 + 0o107) + '\x33' + chr(0b110011 + 0o2), 11910 - 11902), nzTpIcepk0o8('\060' + chr(0b1010 + 0o145) + chr(0b110011) + chr(0b110000) + chr(55), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(1615 - 1565) + '\x30' + '\063', 15253 - 15245), nzTpIcepk0o8(chr(48) + chr(367 - 256) + chr(0b100010 + 0o17) + chr(1699 - 1647) + chr(0b101101 + 0o11), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + '\x31' + chr(203 - 153), 47590 - 47582), nzTpIcepk0o8(chr(156 - 108) + '\x6f' + chr(0b10111 + 0o33) + chr(0b110000), 0b1000), nzTpIcepk0o8('\x30' + chr(7424 - 7313) + '\x33' + chr(943 - 890) + chr(48), 60015 - 60007), nzTpIcepk0o8(chr(48) + chr(111) + chr(49) + chr(503 - 454) + chr(0b110011), 17542 - 17534), nzTpIcepk0o8(chr(1969 - 1921) + '\157' + '\x32' + '\x32' + chr(0b111 + 0o54), ord("\x08")), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(5625 - 5514) + chr(692 - 641) + chr(0b110111) + chr(0b110000), 0b1000), nzTpIcepk0o8('\060' + chr(0b1000110 + 0o51) + '\063' + chr(0b1 + 0o57) + chr(0b10000 + 0o42), 8415 - 8407), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b11011 + 0o30) + '\065' + chr(0b110001), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001), 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + '\x30' + chr(49), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(144 - 95) + chr(1924 - 1869) + '\x33', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(3894 - 3783) + '\x32' + '\x30' + chr(0b100001 + 0o17), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001 + 0o1) + chr(52) + chr(0b10000 + 0o43), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + chr(2170 - 2122) + chr(54), 15455 - 15447), nzTpIcepk0o8(chr(1370 - 1322) + '\157' + chr(0b110011) + chr(1923 - 1874) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b101111 + 0o100) + chr(1599 - 1549) + chr(0b110010) + chr(532 - 484), 45278 - 45270)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1747 - 1699) + chr(0b1101111) + chr(2307 - 2254) + chr(401 - 353), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xd1'), chr(100) + '\145' + '\143' + chr(0b1000110 + 0o51) + chr(0b1100100) + chr(0b1100101))(chr(117) + '\164' + chr(0b1100110) + '\x2d' + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def olfRNjSgvQh6(GxxcFi38ALnA, r2wzacEY8Lls, YmVq8cSlKKaV=None, UtZvTnutzMHg=None): return LpwtToBs49Dr(GxxcFi38ALnA, r2wzacEY8Lls, meta_data=YmVq8cSlKKaV, properties=UtZvTnutzMHg)
noahbenson/neuropythy
neuropythy/geometry/mesh.py
deduce_chirality
def deduce_chirality(obj): ''' deduce_chirality(x) attempts to deduce the chirality of x ('lh', 'rh', or 'lr') and yeilds the deduced string. If no chirality can be deduced, yields None. Note that a if x is either None or Ellipsis, this is converted into 'lr'. ''' # few simple tests: try: return obj.chirality except Exception: pass try: return obj.meta_data['chirality'] except Exception: pass try: return obj.meta_data['hemi'] except Exception: pass try: return obj.meta_data['hemisphere'] except Exception: pass if obj is None or obj is Ellipsis: return 'lr' try: return to_hemi_str(obj) except Exception: pass return None
python
def deduce_chirality(obj): ''' deduce_chirality(x) attempts to deduce the chirality of x ('lh', 'rh', or 'lr') and yeilds the deduced string. If no chirality can be deduced, yields None. Note that a if x is either None or Ellipsis, this is converted into 'lr'. ''' # few simple tests: try: return obj.chirality except Exception: pass try: return obj.meta_data['chirality'] except Exception: pass try: return obj.meta_data['hemi'] except Exception: pass try: return obj.meta_data['hemisphere'] except Exception: pass if obj is None or obj is Ellipsis: return 'lr' try: return to_hemi_str(obj) except Exception: pass return None
[ "def", "deduce_chirality", "(", "obj", ")", ":", "# few simple tests:", "try", ":", "return", "obj", ".", "chirality", "except", "Exception", ":", "pass", "try", ":", "return", "obj", ".", "meta_data", "[", "'chirality'", "]", "except", "Exception", ":", "pa...
deduce_chirality(x) attempts to deduce the chirality of x ('lh', 'rh', or 'lr') and yeilds the deduced string. If no chirality can be deduced, yields None. Note that a if x is either None or Ellipsis, this is converted into 'lr'.
[ "deduce_chirality", "(", "x", ")", "attempts", "to", "deduce", "the", "chirality", "of", "x", "(", "lh", "rh", "or", "lr", ")", "and", "yeilds", "the", "deduced", "string", ".", "If", "no", "chirality", "can", "be", "deduced", "yields", "None", ".", "N...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/mesh.py#L2401-L2419
train
deduce chiral of the object
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8F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S6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(111) + '\061' + '\067' + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\064' + chr(48), 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\062' + '\064' + chr(772 - 724), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101110 + 0o1) + '\061' + chr(152 - 102) + chr(1958 - 1903), 7975 - 7967), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b1000011 + 0o54) + chr(0b1011 + 0o52) + chr(0b1010 + 0o54), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + '\064' + chr(52), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + chr(0b100100 + 0o22) + chr(0b10001 + 0o37), 44595 - 44587), nzTpIcepk0o8(chr(144 - 96) + chr(0b10110 + 0o131) + '\x32' + '\x32' + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(1464 - 1416) + '\x6f' + '\x31' + chr(49) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(642 - 594) + chr(0b1101111) + chr(0b110010 + 0o0) + chr(0b110111) + '\x37', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110011) + '\066' + '\x31', 35843 - 35835), nzTpIcepk0o8('\x30' + '\157' + '\x33' + '\066' + chr(0b100110 + 0o13), 8), nzTpIcepk0o8(chr(48) + '\157' + chr(1769 - 1719) + chr(55) + chr(1434 - 1385), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b11001 + 0o32) + '\062' + chr(0b110011), 0o10), nzTpIcepk0o8(chr(293 - 245) + chr(457 - 346) + chr(50) + '\060', 14184 - 14176), nzTpIcepk0o8(chr(48) + chr(483 - 372) + '\062' + '\063' + chr(50), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(9395 - 9284) + chr(0b110001) + '\x33' + '\x31', 0o10), nzTpIcepk0o8('\x30' + chr(0b1001001 + 0o46) + '\x33' + '\063' + chr(51), 29583 - 29575), nzTpIcepk0o8(chr(1884 - 1836) + chr(7812 - 7701) + '\x34' + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b1101111) + '\066' + '\067', 0o10), nzTpIcepk0o8('\060' + '\157' + chr(442 - 392) + '\065' + '\x37', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\067', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(5255 - 5144) + chr(0b110011) + chr(0b110100) + chr(1131 - 1079), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\062' + chr(0b11001 + 0o34) + '\061', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b101000 + 0o12) + chr(0b110001) + '\063', 0b1000), nzTpIcepk0o8(chr(714 - 666) + '\157' + '\x31' + chr(0b110000) + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + '\x33', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(963 - 912) + chr(52) + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + '\x31' + chr(50), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + chr(0b100110 + 0o20) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + chr(53) + '\x34', 0b1000), nzTpIcepk0o8('\060' + chr(0b10100 + 0o133) + chr(0b1000 + 0o52) + chr(368 - 320) + '\064', 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b100 + 0o55) + '\x34' + chr(1359 - 1311), 43649 - 43641), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\157' + '\061' + chr(0b110110) + '\x34', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b110 + 0o151) + chr(54) + chr(709 - 657), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\062' + '\064' + chr(0b110111), 47313 - 47305), nzTpIcepk0o8('\060' + chr(0b100 + 0o153) + chr(0b110011) + '\x37' + chr(61 - 7), ord("\x08")), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(0b1101011 + 0o4) + '\065', 0o10), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(111) + chr(2373 - 2324) + '\065' + '\x30', 58724 - 58716), nzTpIcepk0o8(chr(0b110000) + chr(12122 - 12011) + chr(0b110110) + '\062', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b110 + 0o151) + chr(803 - 750) + chr(48), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'W'), chr(100) + chr(0b1100101) + '\143' + chr(111) + chr(0b1100100) + chr(101))(chr(0b1010011 + 0o42) + chr(0b1100100 + 0o20) + chr(0b1000100 + 0o42) + chr(45) + chr(0b10010 + 0o46)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def EJ2Ds0CcoDFq(kIMfkyypPTcC): try: return roI3spqORKae(kIMfkyypPTcC, roI3spqORKae(ES5oEprVxulp(b'\x1aH\xc9%O\xc8\x19\xe50'), '\144' + chr(101) + '\143' + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(117) + chr(9243 - 9127) + chr(0b1100110) + chr(0b101101) + '\070')) except zfo2Sgkz3IVJ: pass try: return roI3spqORKae(kIMfkyypPTcC, roI3spqORKae(ES5oEprVxulp(b'\x14E\xd46q\xc0\x11\xe5('), chr(0b1010010 + 0o22) + '\x65' + '\x63' + '\157' + '\x64' + chr(165 - 64))('\x75' + '\x74' + chr(10234 - 10132) + '\x2d' + chr(0b10101 + 0o43)))[roI3spqORKae(ES5oEprVxulp(b'\x1aH\xc9%O\xc8\x19\xe50'), chr(0b1 + 0o143) + '\x65' + chr(0b1101 + 0o126) + chr(111) + '\x64' + '\x65')('\x75' + '\x74' + '\x66' + chr(1762 - 1717) + chr(1076 - 1020))] except zfo2Sgkz3IVJ: pass try: return roI3spqORKae(kIMfkyypPTcC, roI3spqORKae(ES5oEprVxulp(b'\x14E\xd46q\xc0\x11\xe5('), '\144' + '\145' + chr(0b1100011) + chr(8406 - 8295) + chr(0b1100100) + chr(0b101101 + 0o70))('\165' + chr(116) + '\x66' + chr(0b1110 + 0o37) + chr(523 - 467)))[roI3spqORKae(ES5oEprVxulp(b'\x11E\xcd>'), '\x64' + '\145' + chr(0b1100011) + chr(0b1101111) + chr(0b11 + 0o141) + chr(0b1100101))(chr(0b1000011 + 0o62) + chr(0b101 + 0o157) + chr(0b1010001 + 0o25) + chr(0b11011 + 0o22) + chr(2151 - 2095))] except zfo2Sgkz3IVJ: pass try: return roI3spqORKae(kIMfkyypPTcC, roI3spqORKae(ES5oEprVxulp(b'\x14E\xd46q\xc0\x11\xe5('), '\x64' + chr(0b1100101) + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(0b10001 + 0o124))('\x75' + chr(0b1110100) + '\x66' + chr(0b101101) + '\070'))[roI3spqORKae(ES5oEprVxulp(b'\x11E\xcd>]\xd4\x18\xf4;\xda'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(101))('\165' + chr(116) + chr(0b10001 + 0o125) + '\055' + chr(2344 - 2288))] except zfo2Sgkz3IVJ: pass if kIMfkyypPTcC is None or kIMfkyypPTcC is RjQP07DYIdkf: return roI3spqORKae(ES5oEprVxulp(b'\x15R'), chr(5990 - 5890) + chr(0b1100101) + chr(99) + chr(0b1101011 + 0o4) + '\x64' + chr(6561 - 6460))(chr(0b1110101) + chr(0b1110100) + chr(102) + chr(0b101101) + chr(0b100100 + 0o24)) try: return ichlriegRKzS(kIMfkyypPTcC) except zfo2Sgkz3IVJ: pass return None
noahbenson/neuropythy
neuropythy/geometry/mesh.py
load_map_projection
def load_map_projection(filename, center=None, center_right=None, radius=None, method='orthographic', registration='native', chirality=None, sphere_radius=None, pre_affine=None, post_affine=None, meta_data=None): ''' load_map_projection(filename) yields the map projection indicated by the given file name. Map projections define the parameters of a projection to the 2D cortical surface via a registartion name and projection parameters. This function is primarily a wrapper around the MapProjection.load() function; for information about options, see MapProjection.load. ''' return MapProjection.load(filename, center=center, center_right=center_right, radius=radius, method=method, registration=registration, chirality=chirality, sphere_radius=sphere_radius, pre_affine=pre_affine, post_affine=post_affine)
python
def load_map_projection(filename, center=None, center_right=None, radius=None, method='orthographic', registration='native', chirality=None, sphere_radius=None, pre_affine=None, post_affine=None, meta_data=None): ''' load_map_projection(filename) yields the map projection indicated by the given file name. Map projections define the parameters of a projection to the 2D cortical surface via a registartion name and projection parameters. This function is primarily a wrapper around the MapProjection.load() function; for information about options, see MapProjection.load. ''' return MapProjection.load(filename, center=center, center_right=center_right, radius=radius, method=method, registration=registration, chirality=chirality, sphere_radius=sphere_radius, pre_affine=pre_affine, post_affine=post_affine)
[ "def", "load_map_projection", "(", "filename", ",", "center", "=", "None", ",", "center_right", "=", "None", ",", "radius", "=", "None", ",", "method", "=", "'orthographic'", ",", "registration", "=", "'native'", ",", "chirality", "=", "None", ",", "sphere_r...
load_map_projection(filename) yields the map projection indicated by the given file name. Map projections define the parameters of a projection to the 2D cortical surface via a registartion name and projection parameters. This function is primarily a wrapper around the MapProjection.load() function; for information about options, see MapProjection.load.
[ "load_map_projection", "(", "filename", ")", "yields", "the", "map", "projection", "indicated", "by", "the", "given", "file", "name", ".", "Map", "projections", "define", "the", "parameters", "of", "a", "projection", "to", "the", "2D", "cortical", "surface", "...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/mesh.py#L2423-L2439
train
This function loads a map projection from a file.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa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S7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + '\x6f' + chr(0b101011 + 0o7) + chr(0b100001 + 0o17) + chr(557 - 508), 6858 - 6850), nzTpIcepk0o8(chr(183 - 135) + chr(0b1101111) + chr(0b110110) + chr(0b110010), 0o10), nzTpIcepk0o8('\060' + chr(2963 - 2852) + chr(49) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(5222 - 5111) + '\x35' + chr(0b110010), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x33' + chr(48) + '\064', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b100001 + 0o22) + '\x36' + chr(839 - 788), 24229 - 24221), nzTpIcepk0o8(chr(0b110000) + chr(11119 - 11008) + chr(0b110011) + chr(48) + chr(129 - 78), 0o10), nzTpIcepk0o8(chr(48) + chr(680 - 569) + chr(624 - 573) + chr(0b10011 + 0o42) + chr(0b10101 + 0o40), 32579 - 32571), nzTpIcepk0o8(chr(0b101111 + 0o1) + '\157' + chr(51) + '\x35' + '\x32', 0o10), nzTpIcepk0o8('\x30' + chr(0b111101 + 0o62) + '\062' + '\060' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(104 - 49) + chr(0b11 + 0o55), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + chr(55), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(2021 - 1971) + '\062' + chr(49), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b111000 + 0o67) + '\x32' + chr(1273 - 1219) + chr(2356 - 2306), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + '\067' + chr(1689 - 1640), 0b1000), nzTpIcepk0o8(chr(0b10 + 0o56) + '\x6f' + chr(0b110010) + chr(51) + '\x35', 0b1000), nzTpIcepk0o8(chr(473 - 425) + '\x6f' + '\062' + chr(2066 - 2018) + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(53) + '\x31', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011) + chr(0b110010) + chr(1891 - 1840), 52949 - 52941), nzTpIcepk0o8(chr(1842 - 1794) + chr(0b1101111) + chr(0b10110 + 0o34) + chr(0b11001 + 0o31) + '\064', 56638 - 56630), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b10010 + 0o135) + '\062' + '\063' + chr(109 - 57), 10091 - 10083), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + chr(1202 - 1154) + chr(0b1001 + 0o50), 8), nzTpIcepk0o8(chr(595 - 547) + chr(0b1 + 0o156) + '\x32' + chr(54) + '\x37', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b100100 + 0o15) + chr(52) + chr(0b110101), 32583 - 32575), nzTpIcepk0o8(chr(1467 - 1419) + '\157' + chr(51) + chr(50) + '\067', 23224 - 23216), nzTpIcepk0o8(chr(0b1110 + 0o42) + '\157' + '\067' + chr(1265 - 1217), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + '\067' + '\x36', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(1584 - 1530) + chr(0b11111 + 0o23), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + chr(55) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b1101111) + chr(0b101011 + 0o7) + '\063' + chr(2696 - 2644), 8), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(55), 8), nzTpIcepk0o8('\060' + '\x6f' + '\x31' + chr(0b110111) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(3909 - 3798) + chr(51) + chr(0b1100 + 0o50) + '\061', 10758 - 10750), nzTpIcepk0o8(chr(79 - 31) + chr(111) + '\066' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(111) + chr(330 - 280) + chr(48) + chr(0b101110 + 0o3), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2325 - 2275) + '\065' + chr(0b110001), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b10111 + 0o34) + chr(0b10100 + 0o34) + chr(51), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b100000 + 0o23) + '\062' + '\060', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + '\066' + chr(50), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b100110 + 0o17) + chr(0b11010 + 0o26), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xaf'), chr(0b1100100) + chr(5209 - 5108) + chr(0b110100 + 0o57) + chr(0b1001010 + 0o45) + '\144' + '\145')(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(109 - 64) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def FPcmmAIDmgTP(FxZHtXEolYsL, YAVVfOMUvAIv=None, bK7fGTEitKAw=None, qGhcQMWNyIbI=None, e5rcHW8hR5dL=roI3spqORKae(ES5oEprVxulp(b'\xee@{B\xab`\x81\xa2\x9d\x82\xe9['), '\144' + chr(0b1001001 + 0o34) + chr(99) + '\x6f' + '\144' + '\145')(chr(117) + chr(0b1000001 + 0o63) + chr(0b1100110) + '\055' + chr(0b1101 + 0o53)), DLbBU9_iMFpN=roI3spqORKae(ES5oEprVxulp(b'\xefS{C\xb2b'), chr(4116 - 4016) + chr(0b1100101) + chr(99) + '\x6f' + chr(8283 - 8183) + '\x65')('\165' + '\x74' + chr(0b1100110) + '\055' + chr(0b100001 + 0o27)), BvR26GEvba2I=None, JUC_POnxcDNU=None, Zk8OMPtOO91A=None, IrjxkMmVBD3e=None, YmVq8cSlKKaV=None): return roI3spqORKae(Qw4aGwlvX4zs, roI3spqORKae(ES5oEprVxulp(b'\xdbw]Y\xa0d\xc4\xa0\xdc\x8e\xb8}'), '\144' + '\145' + chr(0b1100011) + chr(111) + '\144' + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(0b1110 + 0o130) + '\055' + chr(0b111000)))(FxZHtXEolYsL, center=YAVVfOMUvAIv, center_right=bK7fGTEitKAw, radius=qGhcQMWNyIbI, method=e5rcHW8hR5dL, registration=DLbBU9_iMFpN, chirality=BvR26GEvba2I, sphere_radius=JUC_POnxcDNU, pre_affine=Zk8OMPtOO91A, post_affine=IrjxkMmVBD3e)
noahbenson/neuropythy
neuropythy/geometry/mesh.py
load_projections_from_path
def load_projections_from_path(p): ''' load_projections_from_path(p) yields a lazy-map of all the map projection files found in the given path specification p. The path specification may be either a directory name, a :-separated list of directory names, or a python list of directory names. In order to be included in the returned mapping of projections, a projection must have a filename that matches the following format: <hemi>.<name>[.mp | .map | .projection | <nothing>].json[.gz] For example, the following match: lh.occipital_pole.mp.json => map_projections['lh']['occipital_pole'] rh.frontal.json.gz => map_projections['rh']['frontal'] lr.motor.projection.json.gz => map_projections['lr']['motor'] ''' p = dirpath_to_list(p) return pyr.pmap( {h:pimms.lazy_map( {parts[1]: curry(lambda flnm,h: load_map_projection(flnm, chirality=h), os.path.join(pp, fl), h) for pp in p for fl in os.listdir(pp) if fl.endswith('.json') or fl.endswith('.json.gz') for parts in [fl.split('.')] if len(parts) > 2 and parts[0] == h}) for h in ('lh','rh','lr')})
python
def load_projections_from_path(p): ''' load_projections_from_path(p) yields a lazy-map of all the map projection files found in the given path specification p. The path specification may be either a directory name, a :-separated list of directory names, or a python list of directory names. In order to be included in the returned mapping of projections, a projection must have a filename that matches the following format: <hemi>.<name>[.mp | .map | .projection | <nothing>].json[.gz] For example, the following match: lh.occipital_pole.mp.json => map_projections['lh']['occipital_pole'] rh.frontal.json.gz => map_projections['rh']['frontal'] lr.motor.projection.json.gz => map_projections['lr']['motor'] ''' p = dirpath_to_list(p) return pyr.pmap( {h:pimms.lazy_map( {parts[1]: curry(lambda flnm,h: load_map_projection(flnm, chirality=h), os.path.join(pp, fl), h) for pp in p for fl in os.listdir(pp) if fl.endswith('.json') or fl.endswith('.json.gz') for parts in [fl.split('.')] if len(parts) > 2 and parts[0] == h}) for h in ('lh','rh','lr')})
[ "def", "load_projections_from_path", "(", "p", ")", ":", "p", "=", "dirpath_to_list", "(", "p", ")", "return", "pyr", ".", "pmap", "(", "{", "h", ":", "pimms", ".", "lazy_map", "(", "{", "parts", "[", "1", "]", ":", "curry", "(", "lambda", "flnm", ...
load_projections_from_path(p) yields a lazy-map of all the map projection files found in the given path specification p. The path specification may be either a directory name, a :-separated list of directory names, or a python list of directory names. In order to be included in the returned mapping of projections, a projection must have a filename that matches the following format: <hemi>.<name>[.mp | .map | .projection | <nothing>].json[.gz] For example, the following match: lh.occipital_pole.mp.json => map_projections['lh']['occipital_pole'] rh.frontal.json.gz => map_projections['rh']['frontal'] lr.motor.projection.json.gz => map_projections['lr']['motor']
[ "load_projections_from_path", "(", "p", ")", "yields", "a", "lazy", "-", "map", "of", "all", "the", "map", "projection", "files", "found", "in", "the", "given", "path", "specification", "p", ".", "The", "path", "specification", "may", "be", "either", "a", ...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/mesh.py#L2451-L2473
train
Load all the map projections found in the given path specification p.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBI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qfYi7uj_uC,TVUhqOt5_BbS,WtdkIpFeYozM,MdkNqd1bagO6,QNQS9e6tJqMV,typojWN5Phrq,gufQJgTAhMnI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2220 - 2171) + '\x35' + chr(2071 - 2019), 35206 - 35198), nzTpIcepk0o8('\x30' + chr(0b1 + 0o156) + chr(49) + '\x35', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\061' + '\060' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b1101111) + '\061' + chr(355 - 303) + chr(1604 - 1549), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(4069 - 3958) + chr(51) + chr(0b1011 + 0o52) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\x6f' + chr(50) + '\063' + chr(2703 - 2651), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110011) + '\065', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b10010 + 0o135) + chr(0b110010) + chr(2458 - 2405) + '\x31', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010) + chr(49) + chr(248 - 197), ord("\x08")), nzTpIcepk0o8(chr(456 - 408) + chr(0b1101111 + 0o0) + chr(49) + chr(949 - 900) + chr(55), 0b1000), nzTpIcepk0o8(chr(0b101100 + 0o4) + '\x6f' + chr(2456 - 2405) + chr(2236 - 2186) + '\x35', 0b1000), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b1101111) + '\x31' + chr(934 - 885) + '\066', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + chr(0b11101 + 0o25) + '\065', 30005 - 29997), nzTpIcepk0o8('\x30' + '\x6f' + chr(1277 - 1227) + chr(0b110010) + chr(0b1101 + 0o45), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b101001 + 0o106) + chr(2286 - 2233) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(0b1101111) + '\061' + chr(0b110010) + '\065', 8), nzTpIcepk0o8(chr(772 - 724) + chr(0b101011 + 0o104) + chr(0b110001) + chr(909 - 856) + chr(0b100101 + 0o14), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110101) + '\x33', 8), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + chr(54), 0b1000), nzTpIcepk0o8(chr(0b11101 + 0o23) + '\x6f' + '\062' + chr(0b110001 + 0o6) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b0 + 0o60) + '\x6f' + chr(51) + chr(1774 - 1723) + '\061', 0b1000), nzTpIcepk0o8('\060' + chr(12025 - 11914) + chr(50) + chr(58 - 9) + chr(0b101010 + 0o6), 16349 - 16341), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\157' + '\061' + '\065' + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\061' + chr(51) + '\x34', 53369 - 53361), nzTpIcepk0o8(chr(48) + chr(111) + chr(51) + chr(49) + '\060', 12733 - 12725), nzTpIcepk0o8('\x30' + chr(6567 - 6456) + '\063' + '\066' + chr(1103 - 1052), ord("\x08")), nzTpIcepk0o8(chr(2113 - 2065) + '\157' + chr(0b110001) + chr(2651 - 2596) + chr(0b110 + 0o61), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + chr(0b110011), 0o10), nzTpIcepk0o8(chr(109 - 61) + chr(0b110101 + 0o72) + chr(51) + '\x34' + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1011111 + 0o20) + '\x35' + '\x35', 0o10), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b1100011 + 0o14) + chr(0b110010) + chr(0b110001) + chr(0b11111 + 0o27), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + chr(49) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b100011 + 0o114) + chr(0b10110 + 0o34) + '\x37' + chr(0b1000 + 0o55), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\x33' + chr(0b1110 + 0o42) + chr(0b11010 + 0o35), 0o10), nzTpIcepk0o8(chr(1096 - 1048) + chr(0b1001 + 0o146) + '\064' + '\066', 0o10), nzTpIcepk0o8(chr(343 - 295) + chr(11284 - 11173) + chr(0b100 + 0o57) + chr(256 - 207) + chr(53), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(1752 - 1701) + chr(0b1 + 0o66) + chr(51), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1591 - 1541) + chr(0b110101) + chr(0b101100 + 0o11), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + chr(0b110111 + 0o0) + chr(1665 - 1610), 0b1000), nzTpIcepk0o8(chr(0b101110 + 0o2) + '\157' + chr(0b110011) + chr(53) + chr(2551 - 2500), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b1110 + 0o141) + '\x35' + chr(94 - 46), 31112 - 31104)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'B'), chr(0b1010000 + 0o24) + chr(101) + '\x63' + chr(111) + chr(3846 - 3746) + chr(101))(chr(389 - 272) + '\x74' + chr(3540 - 3438) + '\055' + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def QXzMp9e6FMnV(fSdw5wwLo9MO): fSdw5wwLo9MO = LEtZNPDimz62(fSdw5wwLo9MO) return roI3spqORKae(hFt7yOCw4gV2, roI3spqORKae(ES5oEprVxulp(b'\x1c`"\x17'), chr(0b1100100) + '\x65' + chr(99) + chr(111) + chr(8717 - 8617) + '\x65')(chr(117) + '\164' + '\x66' + chr(0b1101 + 0o40) + chr(0b111000)))({_9ve2uheHd6a: roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x00l9\x1e\xb7\xf1|\xd9'), chr(5326 - 5226) + '\x65' + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(101))(chr(0b100000 + 0o125) + '\164' + '\x66' + '\x2d' + chr(0b111000)))({ws_9aXBYp0Zv[nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100001 + 0o20), ord("\x08"))]: BoZcxPaOCjhS(lambda bfhbSh5_xEIs, _9ve2uheHd6a: FPcmmAIDmgTP(bfhbSh5_xEIs, chirality=_9ve2uheHd6a), roI3spqORKae(aHUqKstZLeS6.path, roI3spqORKae(ES5oEprVxulp(b'59:*\xd1\xde~\xcf\xdf\x0c\x9b?'), chr(100) + chr(0b1100101) + '\143' + '\x6f' + chr(0b1011100 + 0o10) + chr(5189 - 5088))(chr(0b10001 + 0o144) + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + chr(0b111000)))(Thsceq2lolGt, XwFcScMajEjS), _9ve2uheHd6a) for Thsceq2lolGt in fSdw5wwLo9MO for XwFcScMajEjS in roI3spqORKae(aHUqKstZLeS6, roI3spqORKae(ES5oEprVxulp(b'\x00d0\x13\x8c\xf5o'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(0b1010100 + 0o33) + chr(0b1100100) + chr(0b1100100 + 0o1))('\x75' + chr(2386 - 2270) + '\146' + chr(45) + chr(56)))(Thsceq2lolGt) if roI3spqORKae(XwFcScMajEjS, roI3spqORKae(ES5oEprVxulp(b'%4%,\xa1\xdf\\\xe5\xea:\x9f<'), chr(0b1100011 + 0o1) + chr(0b1 + 0o144) + chr(6617 - 6518) + chr(111) + chr(100) + chr(0b1100101))(chr(117) + '\x74' + '\146' + chr(0b101101) + chr(0b10001 + 0o47)))(roI3spqORKae(ES5oEprVxulp(b'Bg0\x08\x86'), chr(100) + chr(10180 - 10079) + chr(8617 - 8518) + chr(111) + '\144' + chr(7039 - 6938))(chr(4675 - 4558) + '\x74' + '\x66' + chr(0b11011 + 0o22) + chr(941 - 885))) or roI3spqORKae(XwFcScMajEjS, roI3spqORKae(ES5oEprVxulp(b'%4%,\xa1\xdf\\\xe5\xea:\x9f<'), chr(100) + chr(689 - 588) + chr(4482 - 4383) + chr(111) + chr(0b1100100) + '\145')(chr(0b1110101) + chr(116) + chr(102) + chr(0b101101) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'Bg0\x08\x86\xb2z\xd3'), chr(0b1001111 + 0o25) + '\x65' + chr(0b10011 + 0o120) + chr(0b1101111) + chr(0b1100100) + chr(101))('\165' + chr(0b1110100) + chr(0b1000001 + 0o45) + '\055' + chr(0b111000))) for ws_9aXBYp0Zv in [roI3spqORKae(XwFcScMajEjS, roI3spqORKae(ES5oEprVxulp(b' k\x11\x15\xb9\xd3e\xdc\xcf9\xbb\r'), '\144' + chr(8055 - 7954) + chr(0b1100011) + chr(0b1100 + 0o143) + chr(0b1011010 + 0o12) + '\145')(chr(0b1110101) + chr(0b1110100) + '\146' + '\055' + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'B'), chr(3343 - 3243) + '\145' + '\143' + chr(0b1000010 + 0o55) + chr(0b1100100) + '\x65')('\165' + '\164' + '\146' + chr(0b100101 + 0o10) + chr(0b110100 + 0o4)))] if ftfygxgFas5X(ws_9aXBYp0Zv) > nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b101 + 0o55), 0b1000) and ws_9aXBYp0Zv[nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110000), 0b1000)] == _9ve2uheHd6a}) for _9ve2uheHd6a in (roI3spqORKae(ES5oEprVxulp(b'\x00e'), chr(0b1100100) + chr(0b1100101) + chr(9450 - 9351) + chr(11316 - 11205) + '\x64' + '\x65')('\165' + chr(8755 - 8639) + chr(9950 - 9848) + chr(0b101101) + chr(0b110110 + 0o2)), roI3spqORKae(ES5oEprVxulp(b'\x1ee'), chr(1262 - 1162) + '\145' + chr(0b1010100 + 0o17) + chr(5661 - 5550) + chr(0b110011 + 0o61) + '\x65')('\x75' + chr(0b1010001 + 0o43) + chr(3044 - 2942) + chr(0b101101) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\x00\x7f'), '\144' + '\145' + chr(0b1011000 + 0o13) + chr(0b1101111) + chr(100) + '\x65')('\165' + '\164' + chr(0b1000111 + 0o37) + '\x2d' + chr(56)))})
noahbenson/neuropythy
neuropythy/geometry/mesh.py
check_projections_path
def check_projections_path(path): ''' check_projections_path(path) yields the given path after checking that it is valid and updating neuropythy.map_projections to include any projections found on the given path. This function is called whenever neuropythy.config['projections_path'] is edited; it should not generally be called directly. ''' path = dirpath_to_list(path) tmp = load_projections_from_path(path) # okay, seems like it passed; go ahead and update global map_projections map_projections = pyr.pmap({h: pimms.merge(npythy_map_projections[h], tmp[h]) for h in six.iterkeys(npythy_map_projections)}) return path
python
def check_projections_path(path): ''' check_projections_path(path) yields the given path after checking that it is valid and updating neuropythy.map_projections to include any projections found on the given path. This function is called whenever neuropythy.config['projections_path'] is edited; it should not generally be called directly. ''' path = dirpath_to_list(path) tmp = load_projections_from_path(path) # okay, seems like it passed; go ahead and update global map_projections map_projections = pyr.pmap({h: pimms.merge(npythy_map_projections[h], tmp[h]) for h in six.iterkeys(npythy_map_projections)}) return path
[ "def", "check_projections_path", "(", "path", ")", ":", "path", "=", "dirpath_to_list", "(", "path", ")", "tmp", "=", "load_projections_from_path", "(", "path", ")", "# okay, seems like it passed; go ahead and update", "global", "map_projections", "map_projections", "=", ...
check_projections_path(path) yields the given path after checking that it is valid and updating neuropythy.map_projections to include any projections found on the given path. This function is called whenever neuropythy.config['projections_path'] is edited; it should not generally be called directly.
[ "check_projections_path", "(", "path", ")", "yields", "the", "given", "path", "after", "checking", "that", "it", "is", "valid", "and", "updating", "neuropythy", ".", "map_projections", "to", "include", "any", "projections", "found", "on", "the", "given", "path",...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/mesh.py#L2481-L2495
train
Checks that the given path is valid and updates the neuropythy. map_projections global variable.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1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iuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1651 - 1603) + chr(111) + chr(0b1001 + 0o52) + chr(52) + chr(50), 41844 - 41836), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x35' + '\x37', 46922 - 46914), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(666 - 555) + chr(0b110010) + chr(0b11100 + 0o31) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(850 - 802) + chr(111) + chr(0b110011) + chr(0b110000) + chr(0b11010 + 0o30), 0o10), nzTpIcepk0o8(chr(48) + chr(0b10011 + 0o134) + chr(0b11110 + 0o24) + '\063' + chr(0b110001), 0b1000), nzTpIcepk0o8('\060' + chr(0b10010 + 0o135) + chr(0b110011) + chr(55) + '\066', 0b1000), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(111) + chr(398 - 347) + chr(50) + '\x37', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + '\062' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1 + 0o156) + chr(52) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(111) + chr(0b110100) + chr(2239 - 2189), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1010001 + 0o36) + chr(0b110 + 0o54) + chr(0b110010) + chr(54), 43022 - 43014), nzTpIcepk0o8(chr(2244 - 2196) + '\x6f' + chr(0b10111 + 0o34) + '\060' + chr(50), 8), nzTpIcepk0o8(chr(0b10100 + 0o34) + '\x6f' + chr(0b110011) + chr(1817 - 1767) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b101101 + 0o102) + chr(50) + chr(54) + chr(55), 29335 - 29327), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + chr(0b110001) + chr(51), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1599 - 1548) + '\x33' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50) + chr(0b110101) + chr(50), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\063' + chr(55) + chr(0b100010 + 0o25), ord("\x08")), nzTpIcepk0o8('\060' + chr(7356 - 7245) + chr(49) + chr(50) + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\060' + chr(6996 - 6885) + '\x37' + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + '\065' + chr(0b10111 + 0o34), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(5558 - 5447) + '\063' + chr(0b110101) + '\x35', 19714 - 19706), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + chr(2243 - 2193) + chr(2213 - 2160), ord("\x08")), nzTpIcepk0o8(chr(1279 - 1231) + '\x6f' + '\x31' + '\x36' + '\x32', 16657 - 16649), nzTpIcepk0o8(chr(0b110000) + chr(0b1100111 + 0o10) + chr(49) + chr(0b110100) + chr(0b111 + 0o57), 0o10), nzTpIcepk0o8('\x30' + chr(0b1010011 + 0o34) + chr(50) + '\061' + chr(0b101101 + 0o11), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(0b1101 + 0o46) + '\x30', 9776 - 9768), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1481 - 1428), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110101) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(2796 - 2685) + '\x33' + chr(1003 - 952) + chr(1474 - 1423), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b111011 + 0o64) + '\061' + chr(0b110001) + chr(2190 - 2141), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(2381 - 2332) + chr(1885 - 1832) + chr(0b101010 + 0o12), 34790 - 34782), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + '\x31' + chr(0b100000 + 0o23), ord("\x08")), nzTpIcepk0o8(chr(288 - 240) + chr(0b1101111) + '\x33' + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1110 + 0o43) + '\x30' + chr(52), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(2871 - 2760) + '\x31', 0b1000), nzTpIcepk0o8(chr(2201 - 2153) + chr(111) + chr(55) + '\061', 0o10), nzTpIcepk0o8(chr(1135 - 1087) + '\157' + chr(0b0 + 0o63) + '\x34' + chr(0b110110), 53628 - 53620), nzTpIcepk0o8(chr(48) + '\157' + chr(697 - 648) + chr(2349 - 2296) + '\x31', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1000001 + 0o56) + chr(189 - 138) + chr(75 - 23) + chr(55), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1532 - 1484) + chr(0b111011 + 0o64) + '\065' + '\060', 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xcc'), chr(8919 - 8819) + '\145' + chr(7020 - 6921) + chr(111) + chr(0b11110 + 0o106) + '\x65')('\165' + chr(0b101010 + 0o112) + '\146' + chr(0b101101) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def ZOLZJb_oqAu0(_pSYqrosNb95): _pSYqrosNb95 = LEtZNPDimz62(_pSYqrosNb95) PT32xG247TS3 = QXzMp9e6FMnV(_pSYqrosNb95) global al26oixoy7aF al26oixoy7aF = hFt7yOCw4gV2.pmap({_9ve2uheHd6a: zAgo8354IlJ7.merge(fcRUHq7uCvb0[_9ve2uheHd6a], PT32xG247TS3[_9ve2uheHd6a]) for _9ve2uheHd6a in YVS_F7_wWn_o.iterkeys(fcRUHq7uCvb0)}) return _pSYqrosNb95
noahbenson/neuropythy
neuropythy/geometry/mesh.py
map_projection
def map_projection(name=None, chirality=Ellipsis, center=Ellipsis, center_right=Ellipsis, radius=Ellipsis, method=Ellipsis, registration=Ellipsis, sphere_radius=Ellipsis, pre_affine=Ellipsis, post_affine=Ellipsis, meta_data=Ellipsis, remember=False): ''' map_projection(name, hemi) yields the map projection with the given name if it exists; hemi must be either 'lh', 'rh', or 'lr'/None. map_projection(name, topo) yields a map projection using the given topology object topo to determine the hemisphere and assigning to the resulting projection's 'mesh' parameter the appropriate registration from the given topology. map_projection(name, mesh) uses the given mesh; the mesh's meta-data must specify the hemisphere for this to work--otherwise 'lr' is always used as the hemisphere. map_projection(affine, hemi) creates a map projection from the given affine matrix, which must align a set of spherical coordinates to a new set of 3D coordinates that are used as input to the method argument (default method 'orthographic' uses the first two of these coordinates as the x and y values of the map). map_projection() creates a new map projection using the optional arguments, if provided. All options that can be passed to load_map_projection and MapProjection can be passed to map_projection: * name is the first optional parameter appearing as name and affine above. * chirality is the second optional parameter, and, if set, will ensure that the resulting map projection's chirality is equivalent to the given chirality. * center specifies the 3D vector that points toward the center of the map. * center_right specifies the 3D vector that points toward any point on the positive x-axis of the resulting map. * radius specifies the radius that should be assumed by the model in radians of the cortical sphere; if the default value (Ellipsis) is given, then pi/3.5 is used. * method specifies the projection method used (default: 'equirectangular'). * registration specifies the registration to which the map is aligned (default: 'native'). * chirality specifies whether the projection applies to left or right hemispheres. * sphere_radius specifies the radius of the sphere that should be assumed by the model. Note that in Freesurfer, spheres have a radius of 100. * pre_affine specifies the pre-projection affine transform to use on the cortical sphere. Note that if the first (name) argument is provided as an affine transform, then that transform is applied after the pre_affine but before alignment of the center and center_right points. * post_affine specifies the post-projection affine transform to use on the 2D map. * meta_data specifies any additional meta-data to attach to the projection. * remember may be set to True to indicate that, after the map projection is constructed, the map_projection cache of named projections should be updated with the provided name. This can only be used when the provided name or first argument is a string. ''' global map_projections # save flag lets us modify this # make a dict of the map parameters: kw = dict(center=center, center_right=center_right, radius=radius, method=method, registration=registration, sphere_radius=sphere_radius, pre_affine=pre_affine, post_affine=post_affine, meta_data=meta_data) kw = {k:v for (k,v) in six.iteritems(kw) if v is not Ellipsis} # interpret the hemi argument first hemi = chirality if hemi is None or hemi is Ellipsis: hemi = 'lr' topo = None mesh = None if pimms.is_str(hemi): hemi = to_hemi_str(hemi) topo = None mesh = None elif is_topo(hemi): topo = hemi hemi = hemi.chirality mesh = None elif is_mesh(hemi): mesh = hemi hemi = deduce_chirality(hemi) topo = None else: raise ValueError('Could not understand map_projection hemi argument: %s' % hemi) hemi = to_hemi_str(hemi) # name might be an affine matrix try: aff = to_affine(name) except Exception: aff = None if pimms.is_matrix(aff): # see if this is an affine matrix aff = np.asarray(aff) (n,m) = aff.shape mtx = None # might be a transformation into 2-space or into 3-space: if n == 2: if m == 3: mtx = np.vstack([np.hstack([mtx, [[0,0,0],[0,0,0]]]), [[0],[0],[0],[1]]]) elif m == 4: mtx = np.vstack([mtx, [[0,0,0,0], [0,0,0,1]]]) elif n == 3: if m == 3: mtx = np.vstack([np.hstack([mtx, [[0,0,0]]]), [[0],[0],[0],[1]]]) elif m == 4: mtx = np.vstack([mtx, [[0,0,0,1]]]) elif n == 4: if m == 4: mtx = aff if mtx is None: raise ValueError('Invalid affine matrix shape; must be {2,3}x{3,4} or 4x4') # Okay, since center and center-right ignore the pre-affine matrix, we can just use this as # the pre-affine and set the center to whatever comes out kw['pre_affine'] = mtx if kw.get('pre_affine') is None else mtx.dot(to_affine(pre_affine)) name = None # load name if it's a string if pimms.is_str(name): if name in map_projections[hemi]: mp = map_projections[hemi][name] elif name.lower() in map_projections[hemi]: mp = map_projections[hemi][name.lower()] else: try: mp = load_map_projection(name, chirality=hemi) except Exception: raise ValueError('could neither find nor load projection %s (%s)' % (name,hemi)) # update parameters if need-be: if len(kw) > 0: mp = mp.copy(**kw) elif name is None: # make a new map_projection if chirality is not Ellipsis: kw['chirality'] = hemi mp = MapProjection(**kw) elif is_map_projection(name): # just updating an existing projection if chirality is not Ellipsis: kw['chirality'] = hemi mp = name if len(kw) > 0: mp = mp.copy(**kw) else: raise ValueError('first argument must be affine, string, or None') # if we have a topology/mesh, we should add it: if topo is not None: mesh = mp.extract_mesh(topo) if mesh is not None: mp = mp.copy(mesh=mesh) # if save was requested, save it mp = mp.persist() if remember is True: if pimms.is_str(name): name = name.lower() hval = map_projections.get(hemi, pyr.m()) map_projections = map_projections.set(hemi, hval.set(name, mp)) else: warnings.warn('Cannot save map-projection with non-string name') # okay, return the projection return mp
python
def map_projection(name=None, chirality=Ellipsis, center=Ellipsis, center_right=Ellipsis, radius=Ellipsis, method=Ellipsis, registration=Ellipsis, sphere_radius=Ellipsis, pre_affine=Ellipsis, post_affine=Ellipsis, meta_data=Ellipsis, remember=False): ''' map_projection(name, hemi) yields the map projection with the given name if it exists; hemi must be either 'lh', 'rh', or 'lr'/None. map_projection(name, topo) yields a map projection using the given topology object topo to determine the hemisphere and assigning to the resulting projection's 'mesh' parameter the appropriate registration from the given topology. map_projection(name, mesh) uses the given mesh; the mesh's meta-data must specify the hemisphere for this to work--otherwise 'lr' is always used as the hemisphere. map_projection(affine, hemi) creates a map projection from the given affine matrix, which must align a set of spherical coordinates to a new set of 3D coordinates that are used as input to the method argument (default method 'orthographic' uses the first two of these coordinates as the x and y values of the map). map_projection() creates a new map projection using the optional arguments, if provided. All options that can be passed to load_map_projection and MapProjection can be passed to map_projection: * name is the first optional parameter appearing as name and affine above. * chirality is the second optional parameter, and, if set, will ensure that the resulting map projection's chirality is equivalent to the given chirality. * center specifies the 3D vector that points toward the center of the map. * center_right specifies the 3D vector that points toward any point on the positive x-axis of the resulting map. * radius specifies the radius that should be assumed by the model in radians of the cortical sphere; if the default value (Ellipsis) is given, then pi/3.5 is used. * method specifies the projection method used (default: 'equirectangular'). * registration specifies the registration to which the map is aligned (default: 'native'). * chirality specifies whether the projection applies to left or right hemispheres. * sphere_radius specifies the radius of the sphere that should be assumed by the model. Note that in Freesurfer, spheres have a radius of 100. * pre_affine specifies the pre-projection affine transform to use on the cortical sphere. Note that if the first (name) argument is provided as an affine transform, then that transform is applied after the pre_affine but before alignment of the center and center_right points. * post_affine specifies the post-projection affine transform to use on the 2D map. * meta_data specifies any additional meta-data to attach to the projection. * remember may be set to True to indicate that, after the map projection is constructed, the map_projection cache of named projections should be updated with the provided name. This can only be used when the provided name or first argument is a string. ''' global map_projections # save flag lets us modify this # make a dict of the map parameters: kw = dict(center=center, center_right=center_right, radius=radius, method=method, registration=registration, sphere_radius=sphere_radius, pre_affine=pre_affine, post_affine=post_affine, meta_data=meta_data) kw = {k:v for (k,v) in six.iteritems(kw) if v is not Ellipsis} # interpret the hemi argument first hemi = chirality if hemi is None or hemi is Ellipsis: hemi = 'lr' topo = None mesh = None if pimms.is_str(hemi): hemi = to_hemi_str(hemi) topo = None mesh = None elif is_topo(hemi): topo = hemi hemi = hemi.chirality mesh = None elif is_mesh(hemi): mesh = hemi hemi = deduce_chirality(hemi) topo = None else: raise ValueError('Could not understand map_projection hemi argument: %s' % hemi) hemi = to_hemi_str(hemi) # name might be an affine matrix try: aff = to_affine(name) except Exception: aff = None if pimms.is_matrix(aff): # see if this is an affine matrix aff = np.asarray(aff) (n,m) = aff.shape mtx = None # might be a transformation into 2-space or into 3-space: if n == 2: if m == 3: mtx = np.vstack([np.hstack([mtx, [[0,0,0],[0,0,0]]]), [[0],[0],[0],[1]]]) elif m == 4: mtx = np.vstack([mtx, [[0,0,0,0], [0,0,0,1]]]) elif n == 3: if m == 3: mtx = np.vstack([np.hstack([mtx, [[0,0,0]]]), [[0],[0],[0],[1]]]) elif m == 4: mtx = np.vstack([mtx, [[0,0,0,1]]]) elif n == 4: if m == 4: mtx = aff if mtx is None: raise ValueError('Invalid affine matrix shape; must be {2,3}x{3,4} or 4x4') # Okay, since center and center-right ignore the pre-affine matrix, we can just use this as # the pre-affine and set the center to whatever comes out kw['pre_affine'] = mtx if kw.get('pre_affine') is None else mtx.dot(to_affine(pre_affine)) name = None # load name if it's a string if pimms.is_str(name): if name in map_projections[hemi]: mp = map_projections[hemi][name] elif name.lower() in map_projections[hemi]: mp = map_projections[hemi][name.lower()] else: try: mp = load_map_projection(name, chirality=hemi) except Exception: raise ValueError('could neither find nor load projection %s (%s)' % (name,hemi)) # update parameters if need-be: if len(kw) > 0: mp = mp.copy(**kw) elif name is None: # make a new map_projection if chirality is not Ellipsis: kw['chirality'] = hemi mp = MapProjection(**kw) elif is_map_projection(name): # just updating an existing projection if chirality is not Ellipsis: kw['chirality'] = hemi mp = name if len(kw) > 0: mp = mp.copy(**kw) else: raise ValueError('first argument must be affine, string, or None') # if we have a topology/mesh, we should add it: if topo is not None: mesh = mp.extract_mesh(topo) if mesh is not None: mp = mp.copy(mesh=mesh) # if save was requested, save it mp = mp.persist() if remember is True: if pimms.is_str(name): name = name.lower() hval = map_projections.get(hemi, pyr.m()) map_projections = map_projections.set(hemi, hval.set(name, mp)) else: warnings.warn('Cannot save map-projection with non-string name') # okay, return the projection return mp
[ "def", "map_projection", "(", "name", "=", "None", ",", "chirality", "=", "Ellipsis", ",", "center", "=", "Ellipsis", ",", "center_right", "=", "Ellipsis", ",", "radius", "=", "Ellipsis", ",", "method", "=", "Ellipsis", ",", "registration", "=", "Ellipsis", ...
map_projection(name, hemi) yields the map projection with the given name if it exists; hemi must be either 'lh', 'rh', or 'lr'/None. map_projection(name, topo) yields a map projection using the given topology object topo to determine the hemisphere and assigning to the resulting projection's 'mesh' parameter the appropriate registration from the given topology. map_projection(name, mesh) uses the given mesh; the mesh's meta-data must specify the hemisphere for this to work--otherwise 'lr' is always used as the hemisphere. map_projection(affine, hemi) creates a map projection from the given affine matrix, which must align a set of spherical coordinates to a new set of 3D coordinates that are used as input to the method argument (default method 'orthographic' uses the first two of these coordinates as the x and y values of the map). map_projection() creates a new map projection using the optional arguments, if provided. All options that can be passed to load_map_projection and MapProjection can be passed to map_projection: * name is the first optional parameter appearing as name and affine above. * chirality is the second optional parameter, and, if set, will ensure that the resulting map projection's chirality is equivalent to the given chirality. * center specifies the 3D vector that points toward the center of the map. * center_right specifies the 3D vector that points toward any point on the positive x-axis of the resulting map. * radius specifies the radius that should be assumed by the model in radians of the cortical sphere; if the default value (Ellipsis) is given, then pi/3.5 is used. * method specifies the projection method used (default: 'equirectangular'). * registration specifies the registration to which the map is aligned (default: 'native'). * chirality specifies whether the projection applies to left or right hemispheres. * sphere_radius specifies the radius of the sphere that should be assumed by the model. Note that in Freesurfer, spheres have a radius of 100. * pre_affine specifies the pre-projection affine transform to use on the cortical sphere. Note that if the first (name) argument is provided as an affine transform, then that transform is applied after the pre_affine but before alignment of the center and center_right points. * post_affine specifies the post-projection affine transform to use on the 2D map. * meta_data specifies any additional meta-data to attach to the projection. * remember may be set to True to indicate that, after the map projection is constructed, the map_projection cache of named projections should be updated with the provided name. This can only be used when the provided name or first argument is a string.
[ "map_projection", "(", "name", "hemi", ")", "yields", "the", "map", "projection", "with", "the", "given", "name", "if", "it", "exists", ";", "hemi", "must", "be", "either", "lh", "rh", "or", "lr", "/", "None", ".", "map_projection", "(", "name", "topo", ...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/mesh.py#L2520-L2642
train
Returns a new map projection with the given name chirality center right radius and method.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqf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7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010) + '\061' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(1983 - 1935) + '\x6f' + '\066' + chr(53), 0b1000), nzTpIcepk0o8('\x30' + chr(2520 - 2409) + chr(0b110110) + '\063', 0o10), nzTpIcepk0o8('\060' + chr(0b1000101 + 0o52) + chr(0b110011) + chr(2468 - 2418) + '\x35', 20500 - 20492), nzTpIcepk0o8('\060' + chr(111) + '\x33' + '\x34' + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(51) + '\x33' + chr(0b101100 + 0o6), 61818 - 61810), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(0b101010 + 0o105) + '\x37' + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1 + 0o62) + chr(0b110111) + chr(567 - 514), ord("\x08")), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b11100 + 0o123) + chr(51) + chr(1279 - 1225) + chr(55), 0b1000), nzTpIcepk0o8(chr(1280 - 1232) + chr(0b1101111) + chr(51) + '\x36' + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1010100 + 0o33) + chr(51) + chr(641 - 589) + chr(51), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + '\x35' + chr(0b110100), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101001 + 0o6) + chr(50) + chr(0b11100 + 0o32) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(3149 - 3038) + '\x33' + chr(0b101101 + 0o4) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(6813 - 6702) + chr(0b110001) + '\063' + '\067', 56000 - 55992), nzTpIcepk0o8('\060' + chr(0b1101111) + '\061' + '\x35' + chr(0b1000 + 0o52), 55960 - 55952), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10110 + 0o34) + chr(0b110000) + chr(998 - 947), 12687 - 12679), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + chr(3019 - 2964) + '\x35', 8), nzTpIcepk0o8('\x30' + chr(9803 - 9692) + '\x32' + '\x34' + chr(0b11 + 0o64), 15854 - 15846), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b10101 + 0o35) + '\x35' + chr(2580 - 2526), 0b1000), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(907 - 796) + '\x31' + '\065' + chr(0b110010), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(442 - 393) + chr(1329 - 1279) + chr(50), 33980 - 33972), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110101) + '\061', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + '\x34' + '\x32', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31' + chr(0b110001) + '\x35', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(50) + '\x36' + chr(51), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + '\065' + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + '\066' + chr(2817 - 2762), 8), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b1101111) + '\x33' + chr(0b110100) + chr(0b110000), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(1443 - 1332) + chr(51) + chr(929 - 880) + '\x32', 61115 - 61107), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + chr(689 - 636) + chr(261 - 212), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110011) + chr(164 - 115) + chr(2321 - 2272), 8), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + '\064' + chr(0b110011), 41895 - 41887), nzTpIcepk0o8('\x30' + '\x6f' + chr(2019 - 1964) + chr(0b110000 + 0o7), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + chr(976 - 924) + chr(1116 - 1068), 21031 - 21023), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b111011 + 0o64) + '\x36' + chr(52), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b101010 + 0o105) + chr(0b110010) + chr(205 - 156) + '\060', 8), nzTpIcepk0o8(chr(2052 - 2004) + '\157' + chr(2528 - 2476) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(2673 - 2620) + '\x35', 15859 - 15851)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(9905 - 9794) + chr(0b100001 + 0o24) + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xa6'), chr(9251 - 9151) + '\145' + chr(6963 - 6864) + chr(0b1100 + 0o143) + chr(0b11110 + 0o106) + '\x65')('\x75' + '\164' + chr(102) + chr(0b101101) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def AC9Fo8iPmFoE(SLVB2BPA_mIe=None, BvR26GEvba2I=RjQP07DYIdkf, YAVVfOMUvAIv=RjQP07DYIdkf, bK7fGTEitKAw=RjQP07DYIdkf, qGhcQMWNyIbI=RjQP07DYIdkf, e5rcHW8hR5dL=RjQP07DYIdkf, DLbBU9_iMFpN=RjQP07DYIdkf, JUC_POnxcDNU=RjQP07DYIdkf, Zk8OMPtOO91A=RjQP07DYIdkf, IrjxkMmVBD3e=RjQP07DYIdkf, YmVq8cSlKKaV=RjQP07DYIdkf, VtCS7piwIkeg=nzTpIcepk0o8('\060' + chr(0b1100001 + 0o16) + '\x30', 17676 - 17668)): global al26oixoy7aF n_DqV9fOWrXc = znjnJWK64FDT(center=YAVVfOMUvAIv, center_right=bK7fGTEitKAw, radius=qGhcQMWNyIbI, method=e5rcHW8hR5dL, registration=DLbBU9_iMFpN, sphere_radius=JUC_POnxcDNU, pre_affine=Zk8OMPtOO91A, post_affine=IrjxkMmVBD3e, meta_data=YmVq8cSlKKaV) n_DqV9fOWrXc = {B6UAF1zReOyJ: r7AA1pbLjb44 for (B6UAF1zReOyJ, r7AA1pbLjb44) in YVS_F7_wWn_o.tcSkjcrLksk1(n_DqV9fOWrXc) if r7AA1pbLjb44 is not RjQP07DYIdkf} nRSX3HCpSIw0 = BvR26GEvba2I if nRSX3HCpSIw0 is None or nRSX3HCpSIw0 is RjQP07DYIdkf: nRSX3HCpSIw0 = roI3spqORKae(ES5oEprVxulp(b'\xe4G'), '\144' + chr(101) + chr(0b1100011) + chr(7592 - 7481) + chr(100) + '\x65')(chr(0b1110101) + '\x74' + chr(7179 - 7077) + chr(45) + chr(685 - 629)) VuxDtS70tmON = None olfRNjSgvQh6 = None if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xe1Fl\xa6\x93\xa8'), chr(0b111011 + 0o51) + chr(101) + chr(99) + '\157' + chr(100) + chr(750 - 649))(chr(117) + '\x74' + chr(0b11100 + 0o112) + chr(45) + '\070'))(nRSX3HCpSIw0): nRSX3HCpSIw0 = ichlriegRKzS(nRSX3HCpSIw0) VuxDtS70tmON = None olfRNjSgvQh6 = None elif bq5iOr1Z0M2l(nRSX3HCpSIw0): VuxDtS70tmON = nRSX3HCpSIw0 nRSX3HCpSIw0 = nRSX3HCpSIw0.chirality olfRNjSgvQh6 = None elif a8iMfp52DT0e(nRSX3HCpSIw0): olfRNjSgvQh6 = nRSX3HCpSIw0 nRSX3HCpSIw0 = EJ2Ds0CcoDFq(nRSX3HCpSIw0) VuxDtS70tmON = None else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xcbZF\xb9\x83\xfaR\x92\x83\xd4\x96\xc2\xd7\xac-\x19\xf7\x9c\xc9\xcaJ?H\xd2\x12\xc3\xda\x98\x8ar\xa9\xdd\xa0\x0cQ\x80\\\xedLD\xa8TA\xb2\x92\xb7Y\x93\x83\xce\xc3\x89\xc0'), chr(0b1100100) + chr(0b1101 + 0o130) + chr(0b101110 + 0o65) + chr(5436 - 5325) + chr(100) + chr(101))(chr(8668 - 8551) + chr(0b1110100) + chr(4575 - 4473) + chr(45) + chr(56)) % nRSX3HCpSIw0) nRSX3HCpSIw0 = ichlriegRKzS(nRSX3HCpSIw0) try: mrnaAuqpXASa = GChmZBltVWGJ(SLVB2BPA_mIe) except zfo2Sgkz3IVJ: mrnaAuqpXASa = None if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xe1Fl\xb8\x86\xaeN\x94\x8f'), '\144' + chr(8806 - 8705) + chr(2378 - 2279) + chr(0b1101111) + '\x64' + chr(1648 - 1547))('\x75' + chr(116) + chr(102) + chr(388 - 343) + chr(2365 - 2309)))(mrnaAuqpXASa): mrnaAuqpXASa = nDF4gVNx0u9Q.asarray(mrnaAuqpXASa) (NoZxuO7wjArS, tF75nqoNENFL) = mrnaAuqpXASa.lhbM092AFW8f P0etuPGWwEl8 = None if NoZxuO7wjArS == nzTpIcepk0o8(chr(0b110000) + chr(1858 - 1747) + chr(1117 - 1067), ord("\x08")): if tF75nqoNENFL == nzTpIcepk0o8('\060' + chr(0b1101111) + '\063', 0b1000): P0etuPGWwEl8 = nDF4gVNx0u9Q.vstack([nDF4gVNx0u9Q.hstack([P0etuPGWwEl8, [[nzTpIcepk0o8(chr(48) + '\157' + chr(48), 8), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(5924 - 5813) + chr(247 - 199), 8), nzTpIcepk0o8(chr(791 - 743) + chr(111) + '\060', 8)], [nzTpIcepk0o8(chr(48) + chr(647 - 536) + '\x30', 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x30', 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1000110 + 0o51) + chr(48), 8)]]]), [[nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1314 - 1266), 8)], [nzTpIcepk0o8(chr(704 - 656) + chr(111) + chr(912 - 864), 8)], [nzTpIcepk0o8(chr(48) + chr(111) + chr(1403 - 1355), 8)], [nzTpIcepk0o8(chr(687 - 639) + '\x6f' + chr(0b1110 + 0o43), 3271 - 3263)]]]) elif tF75nqoNENFL == nzTpIcepk0o8(chr(48) + '\157' + chr(0b1010 + 0o52), 0b1000): P0etuPGWwEl8 = nDF4gVNx0u9Q.vstack([P0etuPGWwEl8, [[nzTpIcepk0o8('\060' + '\157' + chr(48), 8), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(111) + '\x30', 8), nzTpIcepk0o8(chr(1862 - 1814) + chr(9836 - 9725) + '\060', 8), nzTpIcepk0o8('\060' + chr(0b111110 + 0o61) + '\060', 8)], [nzTpIcepk0o8(chr(48) + '\157' + chr(2053 - 2005), 8), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(111) + chr(0b100000 + 0o20), 8), nzTpIcepk0o8(chr(48) + chr(0b101111 + 0o100) + chr(1166 - 1118), 8), nzTpIcepk0o8('\060' + chr(6726 - 6615) + chr(49), 8)]]]) elif NoZxuO7wjArS == nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b0 + 0o63), 8): if tF75nqoNENFL == nzTpIcepk0o8(chr(0b110000) + chr(11982 - 11871) + '\063', 8): P0etuPGWwEl8 = nDF4gVNx0u9Q.vstack([nDF4gVNx0u9Q.hstack([P0etuPGWwEl8, [[nzTpIcepk0o8('\060' + '\157' + chr(48), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2002 - 1954), 8), nzTpIcepk0o8('\x30' + chr(209 - 98) + chr(0b110000), 8)]]]), [[nzTpIcepk0o8(chr(1391 - 1343) + '\157' + chr(0b1101 + 0o43), 8)], [nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b10011 + 0o35), 8)], [nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(48), 8)], [nzTpIcepk0o8(chr(988 - 940) + '\157' + chr(0b10111 + 0o32), 8)]]]) elif tF75nqoNENFL == nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x34', 8): P0etuPGWwEl8 = nDF4gVNx0u9Q.vstack([P0etuPGWwEl8, [[nzTpIcepk0o8(chr(0b110000) + '\157' + '\x30', 8), nzTpIcepk0o8(chr(1085 - 1037) + chr(8667 - 8556) + chr(0b10 + 0o56), 8), nzTpIcepk0o8(chr(0b110000) + chr(5943 - 5832) + chr(48), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1230 - 1181), 8)]]]) elif NoZxuO7wjArS == nzTpIcepk0o8('\060' + chr(111) + '\x34', 8): if tF75nqoNENFL == nzTpIcepk0o8(chr(48) + chr(0b111000 + 0o67) + chr(0b110100), 8): P0etuPGWwEl8 = mrnaAuqpXASa if P0etuPGWwEl8 is None: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xc1[E\xb4\x8b\xb3X\xdd\x96\x92\x85\xc5\xdd\xac\x7f\x07\xe2\x89\xd5\xc7\x12rZ\xca,\xc3\xcd\xcc\xc0z\xbf\xda\xbdC]\xc5\x14\xf3\x13\x01\xbbHK\xae\xd4\xf6\x08\x80\xd7\x9b\x91\x8c\x87\xb1k'), chr(0b1100100) + chr(6361 - 6260) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(0b101000 + 0o75))('\165' + chr(0b10110 + 0o136) + '\146' + '\055' + '\x38')) n_DqV9fOWrXc[roI3spqORKae(ES5oEprVxulp(b'\xf8GV\x8a\x86\xbcZ\x94\x99\x91'), chr(0b1100100) + '\145' + '\143' + '\157' + chr(8632 - 8532) + chr(101))('\165' + '\x74' + chr(0b1100110) + chr(0b101101) + chr(0b111000))] = P0etuPGWwEl8 if n_DqV9fOWrXc.GUKetu4xaGsJ(roI3spqORKae(ES5oEprVxulp(b'\xf8GV\x8a\x86\xbcZ\x94\x99\x91'), chr(0b1001010 + 0o32) + chr(0b1100101) + chr(99) + '\x6f' + chr(100) + '\145')('\165' + chr(10412 - 10296) + chr(6437 - 6335) + '\055' + '\x38')) is None else P0etuPGWwEl8.dot(GChmZBltVWGJ(Zk8OMPtOO91A)) SLVB2BPA_mIe = None if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xe1Fl\xa6\x93\xa8'), chr(5700 - 5600) + chr(0b111100 + 0o51) + chr(99) + chr(6424 - 6313) + chr(100) + '\145')(chr(0b111011 + 0o72) + chr(0b110 + 0o156) + '\146' + '\x2d' + chr(0b111000)))(SLVB2BPA_mIe): if SLVB2BPA_mIe in al26oixoy7aF[nRSX3HCpSIw0]: GgXLIV4arziQ = al26oixoy7aF[nRSX3HCpSIw0][SLVB2BPA_mIe] elif roI3spqORKae(SLVB2BPA_mIe, roI3spqORKae(ES5oEprVxulp(b'\xd0[\x0b\x90\xa9\x8dq\xa7\x93\xbd\xb1\xd8'), '\144' + chr(1482 - 1381) + '\x63' + '\157' + chr(1512 - 1412) + '\x65')(chr(0b100100 + 0o121) + chr(11668 - 11552) + '\x66' + '\055' + chr(811 - 755)))() in al26oixoy7aF[nRSX3HCpSIw0]: GgXLIV4arziQ = al26oixoy7aF[nRSX3HCpSIw0][SLVB2BPA_mIe.Xn8ENWMZdIRt()] else: try: GgXLIV4arziQ = FPcmmAIDmgTP(SLVB2BPA_mIe, chirality=nRSX3HCpSIw0) except zfo2Sgkz3IVJ: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xebZF\xb9\x83\xfaR\x98\x9e\x80\x8b\xc9\xc1\xe99\x03\xed\x99\x87\xc0\x05 \t\xce"\xd2\xcc\xd7\x90e\xa5\xc3\xac\x00K\xc9[\xe6\x01\x08\xfb\x15\x1b\xf0\x94\xf3'), chr(0b1100100) + chr(0b101000 + 0o75) + '\143' + chr(0b1101111) + '\144' + chr(2120 - 2019))(chr(10307 - 10190) + '\164' + chr(102) + chr(0b10010 + 0o33) + '\x38') % (SLVB2BPA_mIe, nRSX3HCpSIw0)) if ftfygxgFas5X(n_DqV9fOWrXc) > nzTpIcepk0o8(chr(0b110000) + chr(0b111101 + 0o62) + chr(432 - 384), 8): GgXLIV4arziQ = GgXLIV4arziQ.copy(**n_DqV9fOWrXc) elif SLVB2BPA_mIe is None: if BvR26GEvba2I is not RjQP07DYIdkf: n_DqV9fOWrXc[roI3spqORKae(ES5oEprVxulp(b'\xeb]Z\xa7\x86\xb6U\x89\x8e'), chr(0b110 + 0o136) + chr(8957 - 8856) + '\x63' + '\x6f' + '\x64' + chr(0b110011 + 0o62))(chr(117) + '\x74' + chr(3642 - 3540) + '\055' + chr(76 - 20))] = nRSX3HCpSIw0 GgXLIV4arziQ = Qw4aGwlvX4zs(**n_DqV9fOWrXc) elif vORwukGt10Mx(SLVB2BPA_mIe): if BvR26GEvba2I is not RjQP07DYIdkf: n_DqV9fOWrXc[roI3spqORKae(ES5oEprVxulp(b'\xeb]Z\xa7\x86\xb6U\x89\x8e'), '\x64' + chr(0b11110 + 0o107) + '\x63' + '\x6f' + chr(0b1100100) + '\145')(chr(0b1110101) + '\x74' + '\146' + chr(45) + chr(769 - 713))] = nRSX3HCpSIw0 GgXLIV4arziQ = SLVB2BPA_mIe if ftfygxgFas5X(n_DqV9fOWrXc) > nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(0b1101111) + '\060', 8): GgXLIV4arziQ = GgXLIV4arziQ.copy(**n_DqV9fOWrXc) else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xee\\A\xa6\x93\xfa]\x8f\x90\x81\x8e\xc9\xdd\xbd\x7f\x07\xf6\x8e\xd3\x8e\x087\t\xc3+\xd5\xc1\x99\x85;\xea\xda\xbd\x11V\xceS\xa4\x01B\xfa\x15}\xba\x89\xbf'), chr(100) + chr(0b110101 + 0o60) + '\x63' + chr(0b1100010 + 0o15) + chr(0b1100100) + '\x65')(chr(0b11100 + 0o131) + '\x74' + chr(977 - 875) + chr(45) + chr(0b100011 + 0o25))) if VuxDtS70tmON is not None: olfRNjSgvQh6 = GgXLIV4arziQ.extract_mesh(VuxDtS70tmON) if olfRNjSgvQh6 is not None: GgXLIV4arziQ = GgXLIV4arziQ.copy(mesh=olfRNjSgvQh6) GgXLIV4arziQ = GgXLIV4arziQ.persist() if VtCS7piwIkeg is nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(1124 - 1013) + chr(0b100011 + 0o16), 8): if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xe1Fl\xa6\x93\xa8'), '\144' + chr(0b1010001 + 0o24) + '\x63' + chr(0b1101111) + '\144' + '\x65')(chr(0b1110101) + chr(11310 - 11194) + '\x66' + chr(0b101101) + '\070'))(SLVB2BPA_mIe): SLVB2BPA_mIe = SLVB2BPA_mIe.Xn8ENWMZdIRt() SWcXba0IqPyC = al26oixoy7aF.GUKetu4xaGsJ(nRSX3HCpSIw0, hFt7yOCw4gV2.tF75nqoNENFL()) al26oixoy7aF = al26oixoy7aF.Bvi71nNyvlqO(nRSX3HCpSIw0, SWcXba0IqPyC.Bvi71nNyvlqO(SLVB2BPA_mIe, GgXLIV4arziQ)) else: roI3spqORKae(EyN62Frii5S5, roI3spqORKae(ES5oEprVxulp(b'\xfb\x7fb\x83\xb8\x92M\xae\xce\x92\x84\xd6'), '\x64' + '\145' + '\x63' + chr(0b1101111) + '\144' + '\145')(chr(8008 - 7891) + chr(0b1001101 + 0o47) + '\x66' + '\055' + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'\xcbT]\xbb\x88\xae\x1c\x8e\x96\x82\x86\x8c\xde\xa8/G\xf3\x8f\xc8\xc4\x0f1]\xcb"\xdd\x88\x80\x89c\xa2\x89\xa7\x0cQ\x8dG\xfcSD\xe6R\x13\xbb\x86\xb7Y'), chr(0b1100100) + '\145' + chr(9227 - 9128) + chr(111) + '\144' + chr(101))(chr(117) + chr(116) + chr(0b1100110) + chr(45) + chr(0b101101 + 0o13))) return GgXLIV4arziQ
noahbenson/neuropythy
neuropythy/geometry/mesh.py
to_map_projection
def to_map_projection(arg, hemi=Ellipsis, chirality=Ellipsis, center=Ellipsis, center_right=Ellipsis, radius=Ellipsis, method=Ellipsis, registration=Ellipsis, sphere_radius=Ellipsis, pre_affine=Ellipsis, post_affine=Ellipsis, meta_data=Ellipsis): ''' to_map_projection(mp) yields mp if mp is a map projection object. to_map_projection((name, hemi)) is equivalent to map_projection(name, chirality=hemi). to_map_projection((name, opts)) uses the given options dictionary as options to map_projection; (name, hemi, opts) is also allowed as input. to_map_projection(filename) yields the map projection loaded from the given filename. to_map_projection('<name>:<hemi>') is equivalent to to_map_projection(('<name>', '<hemi>')). to_map_projection('<name>') is equivalent to to_map_projection(('<name>', 'lr')). to_map_projection((affine, hemi)) converts the given affine transformation, which must be a transformation from spherical coordinates to 2D map coordinates (once the transformed z-value is dropped), to a map projection. The hemi argument may alternately be an options mapping. The to_map_projection() function may also be called with the the elements of the above tuples passed directly; i.e. to_map_projection(name, hemi) is equivalent to to_map_projection((name,hemi)). Additionaly, all optional arguments to the map_projection function may be given and will be copied into the map_projection that is returned. Note that the named chirality argument is used to set the chirality of the returned map projection but never to specify the chirality of a map projection that is being looked up or loaded; for that use the second argument, second tuple entry, or hemi keyword. ''' kw = dict(center=center, center_right=center_right, radius=radius, chirality=chirality, method=method, registration=registration, sphere_radius=sphere_radius, pre_affine=pre_affine, post_affine=post_affine, meta_data=meta_data) kw = {k:v for (k,v) in six.iteritems(kw) if v is not Ellipsis} if pimms.is_vector(arg): if len(arg) == 1: arg = arg[0] elif len(arg) == 2: (arg, tmp) = arg if pimms.is_map(tmp): kw = {k:v for (k,v) in six.iteritems(pimms.merge(tmp, kw)) if v is not Ellipsis} elif hemi is Ellipsis: hemi = arg elif len(arg) == 3: (arg, h, opts) = arg kw = {k:v for (k,v) in six.iteritems(pimms.merge(opts, kw)) if v is not Ellipsis} if hemi is Ellipsis: hemi = h else: raise ValueError('Invalid vector argument given to to_map_projection()') hemi = deduce_chirality(hemi) mp = None if is_map_projection(arg): mp = arg elif pimms.is_str(arg): # first see if there's a hemi appended if ':' in arg: spl = arg.split(':') (a,h) = (':'.join(spl[:-1]), spl[-1]) try: (hemtmp, arg) = (to_hemi_str(h), a) if hemi is None: hemi = hemtmp except Exception: pass # otherwise, strings alone might be map projection names or filenames mp = map_projection(arg, hemi) else: raise ValueError('Cannot interpret argument to to_map_projection') if len(kw) == 0: return mp else: return mp.copy(**kw)
python
def to_map_projection(arg, hemi=Ellipsis, chirality=Ellipsis, center=Ellipsis, center_right=Ellipsis, radius=Ellipsis, method=Ellipsis, registration=Ellipsis, sphere_radius=Ellipsis, pre_affine=Ellipsis, post_affine=Ellipsis, meta_data=Ellipsis): ''' to_map_projection(mp) yields mp if mp is a map projection object. to_map_projection((name, hemi)) is equivalent to map_projection(name, chirality=hemi). to_map_projection((name, opts)) uses the given options dictionary as options to map_projection; (name, hemi, opts) is also allowed as input. to_map_projection(filename) yields the map projection loaded from the given filename. to_map_projection('<name>:<hemi>') is equivalent to to_map_projection(('<name>', '<hemi>')). to_map_projection('<name>') is equivalent to to_map_projection(('<name>', 'lr')). to_map_projection((affine, hemi)) converts the given affine transformation, which must be a transformation from spherical coordinates to 2D map coordinates (once the transformed z-value is dropped), to a map projection. The hemi argument may alternately be an options mapping. The to_map_projection() function may also be called with the the elements of the above tuples passed directly; i.e. to_map_projection(name, hemi) is equivalent to to_map_projection((name,hemi)). Additionaly, all optional arguments to the map_projection function may be given and will be copied into the map_projection that is returned. Note that the named chirality argument is used to set the chirality of the returned map projection but never to specify the chirality of a map projection that is being looked up or loaded; for that use the second argument, second tuple entry, or hemi keyword. ''' kw = dict(center=center, center_right=center_right, radius=radius, chirality=chirality, method=method, registration=registration, sphere_radius=sphere_radius, pre_affine=pre_affine, post_affine=post_affine, meta_data=meta_data) kw = {k:v for (k,v) in six.iteritems(kw) if v is not Ellipsis} if pimms.is_vector(arg): if len(arg) == 1: arg = arg[0] elif len(arg) == 2: (arg, tmp) = arg if pimms.is_map(tmp): kw = {k:v for (k,v) in six.iteritems(pimms.merge(tmp, kw)) if v is not Ellipsis} elif hemi is Ellipsis: hemi = arg elif len(arg) == 3: (arg, h, opts) = arg kw = {k:v for (k,v) in six.iteritems(pimms.merge(opts, kw)) if v is not Ellipsis} if hemi is Ellipsis: hemi = h else: raise ValueError('Invalid vector argument given to to_map_projection()') hemi = deduce_chirality(hemi) mp = None if is_map_projection(arg): mp = arg elif pimms.is_str(arg): # first see if there's a hemi appended if ':' in arg: spl = arg.split(':') (a,h) = (':'.join(spl[:-1]), spl[-1]) try: (hemtmp, arg) = (to_hemi_str(h), a) if hemi is None: hemi = hemtmp except Exception: pass # otherwise, strings alone might be map projection names or filenames mp = map_projection(arg, hemi) else: raise ValueError('Cannot interpret argument to to_map_projection') if len(kw) == 0: return mp else: return mp.copy(**kw)
[ "def", "to_map_projection", "(", "arg", ",", "hemi", "=", "Ellipsis", ",", "chirality", "=", "Ellipsis", ",", "center", "=", "Ellipsis", ",", "center_right", "=", "Ellipsis", ",", "radius", "=", "Ellipsis", ",", "method", "=", "Ellipsis", ",", "registration"...
to_map_projection(mp) yields mp if mp is a map projection object. to_map_projection((name, hemi)) is equivalent to map_projection(name, chirality=hemi). to_map_projection((name, opts)) uses the given options dictionary as options to map_projection; (name, hemi, opts) is also allowed as input. to_map_projection(filename) yields the map projection loaded from the given filename. to_map_projection('<name>:<hemi>') is equivalent to to_map_projection(('<name>', '<hemi>')). to_map_projection('<name>') is equivalent to to_map_projection(('<name>', 'lr')). to_map_projection((affine, hemi)) converts the given affine transformation, which must be a transformation from spherical coordinates to 2D map coordinates (once the transformed z-value is dropped), to a map projection. The hemi argument may alternately be an options mapping. The to_map_projection() function may also be called with the the elements of the above tuples passed directly; i.e. to_map_projection(name, hemi) is equivalent to to_map_projection((name,hemi)). Additionaly, all optional arguments to the map_projection function may be given and will be copied into the map_projection that is returned. Note that the named chirality argument is used to set the chirality of the returned map projection but never to specify the chirality of a map projection that is being looked up or loaded; for that use the second argument, second tuple entry, or hemi keyword.
[ "to_map_projection", "(", "mp", ")", "yields", "mp", "if", "mp", "is", "a", "map", "projection", "object", ".", "to_map_projection", "((", "name", "hemi", "))", "is", "equivalent", "to", "map_projection", "(", "name", "chirality", "=", "hemi", ")", ".", "t...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/mesh.py#L2648-L2706
train
Converts a given argument to a map projection.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ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D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(111) + '\061' + chr(0b110111) + '\x36', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1001000 + 0o47) + chr(52) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(614 - 566) + chr(0b1101111) + chr(50) + chr(0b100010 + 0o20) + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\x30' + chr(7873 - 7762) + '\065' + chr(982 - 933), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b10 + 0o61) + chr(0b110001), 0b1000), nzTpIcepk0o8('\x30' + chr(3148 - 3037) + chr(644 - 590) + chr(0b110000), 58100 - 58092), nzTpIcepk0o8('\060' + chr(6128 - 6017) + chr(0b110011) + chr(50) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(2151 - 2103) + chr(111) + '\x32' + chr(1001 - 946) + '\060', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b100011 + 0o17) + '\x35' + chr(0b11 + 0o56), 23798 - 23790), nzTpIcepk0o8(chr(0b110000) + chr(0b11100 + 0o123) + chr(639 - 586), 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\063' + chr(408 - 360) + chr(0b100101 + 0o21), 0o10), nzTpIcepk0o8(chr(1994 - 1946) + chr(0b111010 + 0o65) + chr(843 - 794) + chr(54) + '\x34', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1000 + 0o147) + chr(0b1111 + 0o43) + chr(1648 - 1598) + chr(1412 - 1359), 8), nzTpIcepk0o8('\060' + chr(111) + chr(0b110000 + 0o2) + '\x31' + chr(0b100100 + 0o15), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b110001 + 0o76) + chr(2449 - 2399) + chr(54) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\x6f' + '\x31' + chr(0b110000) + '\064', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b1100 + 0o47) + '\062' + chr(49), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + '\x35' + chr(0b100000 + 0o20), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(972 - 923) + chr(132 - 84) + chr(1465 - 1416), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1001111 + 0o40) + chr(0b110010) + '\063' + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(111) + chr(0b110001) + chr(0b110011 + 0o0) + chr(48), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(50) + chr(52) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b11010 + 0o34) + chr(0b110101), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(2560 - 2509) + chr(0b101000 + 0o15) + '\x30', 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x33' + '\x30' + chr(53), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(6351 - 6240) + '\x33' + chr(273 - 218) + chr(52), 0o10), nzTpIcepk0o8('\060' + chr(7648 - 7537) + '\062' + chr(677 - 626) + chr(2009 - 1955), ord("\x08")), nzTpIcepk0o8(chr(715 - 667) + chr(111) + chr(0b101100 + 0o6) + '\x30' + '\064', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + chr(55) + chr(0b100010 + 0o25), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(649 - 598) + chr(48) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(111) + chr(0b110110) + '\x36', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + '\063' + chr(0b10 + 0o56), 0b1000), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\x6f' + '\061' + '\063' + '\062', 0b1000), nzTpIcepk0o8(chr(1404 - 1356) + chr(111) + '\x37' + chr(1029 - 974), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(52) + '\064', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + chr(0b100101 + 0o15) + '\063', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101101 + 0o2) + chr(0b11100 + 0o26) + chr(48) + chr(0b100111 + 0o15), 8), nzTpIcepk0o8(chr(2138 - 2090) + '\x6f' + '\x32' + '\061', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b100110 + 0o15) + '\x34' + chr(547 - 492), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110010) + chr(0b110001) + '\060', 63588 - 63580)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x35' + chr(0b110000), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'P'), chr(100) + chr(0b0 + 0o145) + chr(99) + chr(11073 - 10962) + chr(6851 - 6751) + chr(0b1100101))(chr(0b1110101) + chr(0b1010011 + 0o41) + '\146' + chr(531 - 486) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def JO2IBqfmJJdS(S6EI_gyMl2nC, nRSX3HCpSIw0=RjQP07DYIdkf, BvR26GEvba2I=RjQP07DYIdkf, YAVVfOMUvAIv=RjQP07DYIdkf, bK7fGTEitKAw=RjQP07DYIdkf, qGhcQMWNyIbI=RjQP07DYIdkf, e5rcHW8hR5dL=RjQP07DYIdkf, DLbBU9_iMFpN=RjQP07DYIdkf, JUC_POnxcDNU=RjQP07DYIdkf, Zk8OMPtOO91A=RjQP07DYIdkf, IrjxkMmVBD3e=RjQP07DYIdkf, YmVq8cSlKKaV=RjQP07DYIdkf): n_DqV9fOWrXc = znjnJWK64FDT(center=YAVVfOMUvAIv, center_right=bK7fGTEitKAw, radius=qGhcQMWNyIbI, chirality=BvR26GEvba2I, method=e5rcHW8hR5dL, registration=DLbBU9_iMFpN, sphere_radius=JUC_POnxcDNU, pre_affine=Zk8OMPtOO91A, post_affine=IrjxkMmVBD3e, meta_data=YmVq8cSlKKaV) n_DqV9fOWrXc = {B6UAF1zReOyJ: r7AA1pbLjb44 for (B6UAF1zReOyJ, r7AA1pbLjb44) in YVS_F7_wWn_o.tcSkjcrLksk1(n_DqV9fOWrXc) if r7AA1pbLjb44 is not RjQP07DYIdkf} if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x17V\xca_|S\xa4\xd7\xdb'), chr(0b11100 + 0o110) + chr(0b1001101 + 0o30) + chr(99) + chr(0b1101111) + '\x64' + chr(9060 - 8959))(chr(117) + '\164' + chr(6920 - 6818) + chr(45) + chr(0b111000)))(S6EI_gyMl2nC): if ftfygxgFas5X(S6EI_gyMl2nC) == nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(217 - 168), 0o10): S6EI_gyMl2nC = S6EI_gyMl2nC[nzTpIcepk0o8('\x30' + '\157' + chr(2144 - 2096), 0o10)] elif ftfygxgFas5X(S6EI_gyMl2nC) == nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010), 9061 - 9053): (S6EI_gyMl2nC, PT32xG247TS3) = S6EI_gyMl2nC if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x17V\xcaDx@'), chr(0b1100100) + chr(9367 - 9266) + chr(4722 - 4623) + chr(6075 - 5964) + chr(100) + chr(2577 - 2476))(chr(0b10001 + 0o144) + chr(0b1000000 + 0o64) + chr(102) + '\x2d' + '\x38'))(PT32xG247TS3): n_DqV9fOWrXc = {B6UAF1zReOyJ: r7AA1pbLjb44 for (B6UAF1zReOyJ, r7AA1pbLjb44) in YVS_F7_wWn_o.tcSkjcrLksk1(zAgo8354IlJ7.merge(PT32xG247TS3, n_DqV9fOWrXc)) if r7AA1pbLjb44 is not RjQP07DYIdkf} elif nRSX3HCpSIw0 is RjQP07DYIdkf: nRSX3HCpSIw0 = S6EI_gyMl2nC elif ftfygxgFas5X(S6EI_gyMl2nC) == nzTpIcepk0o8('\060' + '\x6f' + chr(0b1110 + 0o45), 0b1000): (S6EI_gyMl2nC, _9ve2uheHd6a, M8wfvmpEewAe) = S6EI_gyMl2nC n_DqV9fOWrXc = {B6UAF1zReOyJ: r7AA1pbLjb44 for (B6UAF1zReOyJ, r7AA1pbLjb44) in YVS_F7_wWn_o.tcSkjcrLksk1(zAgo8354IlJ7.merge(M8wfvmpEewAe, n_DqV9fOWrXc)) if r7AA1pbLjb44 is not RjQP07DYIdkf} if nRSX3HCpSIw0 is RjQP07DYIdkf: nRSX3HCpSIw0 = _9ve2uheHd6a else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'7K\xe3HuY\xb4\x98\xdf`\xa5\x00\xfa\xfb\x94%\xa3\xcf4\xf6=\xccA\xc8\xa2\x95\xe8\xe1\x91\xe3B\xb7zK\x0b\x8c\xe9p\x97\xd7\x0eW\xfaC|S\xa4\xd1\xc6k\xee]'), chr(0b1100100 + 0o0) + '\145' + chr(0b1100011) + chr(5169 - 5058) + chr(0b1100100) + chr(0b1100101))('\165' + chr(7488 - 7372) + '\x66' + chr(0b110 + 0o47) + chr(0b100011 + 0o25))) nRSX3HCpSIw0 = EJ2Ds0CcoDFq(nRSX3HCpSIw0) GgXLIV4arziQ = None if vORwukGt10Mx(S6EI_gyMl2nC): GgXLIV4arziQ = S6EI_gyMl2nC elif roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x17V\xcaZmB'), '\144' + chr(10187 - 10086) + '\x63' + '\x6f' + chr(0b1100100) + '\145')(chr(0b1110101) + chr(10669 - 10553) + chr(0b1100110) + chr(45) + chr(0b111000)))(S6EI_gyMl2nC): if roI3spqORKae(ES5oEprVxulp(b'D'), chr(2542 - 2442) + '\x65' + chr(206 - 107) + '\x6f' + '\144' + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(4579 - 4477) + chr(1733 - 1688) + chr(0b101 + 0o63)) in S6EI_gyMl2nC: kz_M8x29sikx = S6EI_gyMl2nC.LfRrQOxuDvnC(roI3spqORKae(ES5oEprVxulp(b'D'), chr(704 - 604) + '\x65' + '\143' + chr(0b1001011 + 0o44) + '\144' + chr(6512 - 6411))(chr(117) + chr(0b1110100) + chr(0b1010 + 0o134) + chr(0b10010 + 0o33) + chr(1159 - 1103))) (AQ9ceR9AaoT1, _9ve2uheHd6a) = (roI3spqORKae(ES5oEprVxulp(b'D'), chr(0b11001 + 0o113) + chr(101) + chr(0b1100011) + chr(0b1101111) + '\144' + '\x65')(chr(13643 - 13526) + '\x74' + chr(0b1111 + 0o127) + chr(45) + chr(0b101110 + 0o12)).Y4yM9BcfTCNq(kz_M8x29sikx[:-nzTpIcepk0o8(chr(510 - 462) + chr(111) + chr(0b10110 + 0o33), 8)]), kz_M8x29sikx[-nzTpIcepk0o8(chr(48) + chr(111) + chr(243 - 194), 8)]) try: (LdY5zToKGnL7, S6EI_gyMl2nC) = (ichlriegRKzS(_9ve2uheHd6a), AQ9ceR9AaoT1) if nRSX3HCpSIw0 is None: nRSX3HCpSIw0 = LdY5zToKGnL7 except zfo2Sgkz3IVJ: pass GgXLIV4arziQ = AC9Fo8iPmFoE(S6EI_gyMl2nC, nRSX3HCpSIw0) else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'=D\xfbGvD\xf0\xd1\xc7q\xa3\x06\xe5\xfb\xd10\xf1\xc93\xfc-\xcfP\x86\xb1\xdc\xea\xeb\xdf\xb7Y\x877^\x14\x8c\xf4c\x88\xe2\x1bF\xe1@v^'), chr(0b11000 + 0o114) + '\x65' + chr(0b11001 + 0o112) + chr(0b1101111) + chr(845 - 745) + chr(101))(chr(11093 - 10976) + chr(0b1110100) + chr(0b1011000 + 0o16) + '\055' + chr(0b1100 + 0o54))) if ftfygxgFas5X(n_DqV9fOWrXc) == nzTpIcepk0o8(chr(1400 - 1352) + '\x6f' + chr(0b101101 + 0o3), 8): return GgXLIV4arziQ else: return roI3spqORKae(GgXLIV4arziQ, roI3spqORKae(ES5oEprVxulp(b'\x1dJ\xe5P'), '\x64' + chr(0b1100101) + chr(99) + '\x6f' + chr(100) + '\145')(chr(0b1110101) + '\164' + '\146' + '\055' + '\x38'))(**n_DqV9fOWrXc)
noahbenson/neuropythy
neuropythy/geometry/mesh.py
to_flatmap
def to_flatmap(name, hemi=Ellipsis, center=Ellipsis, center_right=Ellipsis, radius=Ellipsis, chirality=Ellipsis, method=Ellipsis, registration=Ellipsis, sphere_radius=Ellipsis, pre_affine=Ellipsis, post_affine=Ellipsis, meta_data=Ellipsis): ''' to_flatmap(name, topo) yields a flatmap of the given topology topo using the map projection obtained via to_map_projection(name). to_flatmap(name, mesh) yields a flatmap of the given mesh. If no hemisphere is specified in the name argument nor in the mesh meta-data, then 'lr' is assumed. to_flatmap(name, subj) uses the given hemisphere from the given subject. to_flatmap((name, obj)) is equivalent to to_flatmap(name, obj). to_flatmap((name, obj, opts_map)) is equivalent to to_flatmap(name, obj, **opts_map). All optional arguments that can be passed to map_projection() may also be passed to the to_flatmap() function and are copied into the map projection object prior to its use in creating the resulting 2D mesh. Note that the named chirality argument is used to set the chirality of the returned map projection but never to specify the chirality of a map projection that is being looked up or loaded; for that use the second argument, second tuple entry, or hemi keyword. ''' from neuropythy.mri import is_subject kw = dict(center=center, center_right=center_right, radius=radius, chirality=chirality, method=method, registration=registration, sphere_radius=sphere_radius, pre_affine=pre_affine, post_affine=post_affine, meta_data=meta_data) kw = {k:v for (k,v) in six.iteritems(kw) if v is not Ellipsis} if pimms.is_vector(name): if len(name) == 1: name = name[0] elif len(name) == 2: (name, tmp) = name if pimms.is_map(tmp): kw = {k:v for (k,v) in six.iteritems(pimms.merge(tmp, kw)) if v is not Ellipsis} else: hemi = tmp elif len(name) == 3: (name, hemi, opts) = name kw = {k:v for (k,v) in six.iteritems(pimms.merge(opts, kw)) if v is not Ellipsis} if 'hemi' in kw: if hemi is Ellipsis: hemi = kw['hemi'] del kw['hemi'] # okay, we can get the map projection now... mp = to_map_projection(name, hemi, **kw) return mp(hemi)
python
def to_flatmap(name, hemi=Ellipsis, center=Ellipsis, center_right=Ellipsis, radius=Ellipsis, chirality=Ellipsis, method=Ellipsis, registration=Ellipsis, sphere_radius=Ellipsis, pre_affine=Ellipsis, post_affine=Ellipsis, meta_data=Ellipsis): ''' to_flatmap(name, topo) yields a flatmap of the given topology topo using the map projection obtained via to_map_projection(name). to_flatmap(name, mesh) yields a flatmap of the given mesh. If no hemisphere is specified in the name argument nor in the mesh meta-data, then 'lr' is assumed. to_flatmap(name, subj) uses the given hemisphere from the given subject. to_flatmap((name, obj)) is equivalent to to_flatmap(name, obj). to_flatmap((name, obj, opts_map)) is equivalent to to_flatmap(name, obj, **opts_map). All optional arguments that can be passed to map_projection() may also be passed to the to_flatmap() function and are copied into the map projection object prior to its use in creating the resulting 2D mesh. Note that the named chirality argument is used to set the chirality of the returned map projection but never to specify the chirality of a map projection that is being looked up or loaded; for that use the second argument, second tuple entry, or hemi keyword. ''' from neuropythy.mri import is_subject kw = dict(center=center, center_right=center_right, radius=radius, chirality=chirality, method=method, registration=registration, sphere_radius=sphere_radius, pre_affine=pre_affine, post_affine=post_affine, meta_data=meta_data) kw = {k:v for (k,v) in six.iteritems(kw) if v is not Ellipsis} if pimms.is_vector(name): if len(name) == 1: name = name[0] elif len(name) == 2: (name, tmp) = name if pimms.is_map(tmp): kw = {k:v for (k,v) in six.iteritems(pimms.merge(tmp, kw)) if v is not Ellipsis} else: hemi = tmp elif len(name) == 3: (name, hemi, opts) = name kw = {k:v for (k,v) in six.iteritems(pimms.merge(opts, kw)) if v is not Ellipsis} if 'hemi' in kw: if hemi is Ellipsis: hemi = kw['hemi'] del kw['hemi'] # okay, we can get the map projection now... mp = to_map_projection(name, hemi, **kw) return mp(hemi)
[ "def", "to_flatmap", "(", "name", ",", "hemi", "=", "Ellipsis", ",", "center", "=", "Ellipsis", ",", "center_right", "=", "Ellipsis", ",", "radius", "=", "Ellipsis", ",", "chirality", "=", "Ellipsis", ",", "method", "=", "Ellipsis", ",", "registration", "=...
to_flatmap(name, topo) yields a flatmap of the given topology topo using the map projection obtained via to_map_projection(name). to_flatmap(name, mesh) yields a flatmap of the given mesh. If no hemisphere is specified in the name argument nor in the mesh meta-data, then 'lr' is assumed. to_flatmap(name, subj) uses the given hemisphere from the given subject. to_flatmap((name, obj)) is equivalent to to_flatmap(name, obj). to_flatmap((name, obj, opts_map)) is equivalent to to_flatmap(name, obj, **opts_map). All optional arguments that can be passed to map_projection() may also be passed to the to_flatmap() function and are copied into the map projection object prior to its use in creating the resulting 2D mesh. Note that the named chirality argument is used to set the chirality of the returned map projection but never to specify the chirality of a map projection that is being looked up or loaded; for that use the second argument, second tuple entry, or hemi keyword.
[ "to_flatmap", "(", "name", "topo", ")", "yields", "a", "flatmap", "of", "the", "given", "topology", "topo", "using", "the", "map", "projection", "obtained", "via", "to_map_projection", "(", "name", ")", ".", "to_flatmap", "(", "name", "mesh", ")", "yields", ...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/mesh.py#L2707-L2746
train
Converts a neuropythy object to a flatmap object.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p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lockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(0b111 + 0o150) + chr(51) + '\062', 21726 - 21718), nzTpIcepk0o8('\060' + chr(111) + chr(0b11111 + 0o22) + chr(49) + '\065', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + chr(0b110000) + chr(0b101 + 0o61), 0o10), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(0b1101111) + chr(50) + chr(51) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(99 - 48) + chr(0b10100 + 0o36) + chr(430 - 377), 44938 - 44930), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(111) + chr(50) + chr(48) + chr(0b100011 + 0o23), 50607 - 50599), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b11100 + 0o123) + chr(49) + chr(0b110011) + chr(0b111 + 0o56), 25236 - 25228), nzTpIcepk0o8(chr(2032 - 1984) + chr(111) + chr(51) + '\x32' + '\x37', 4211 - 4203), nzTpIcepk0o8(chr(48) + chr(0b111001 + 0o66) + chr(0b110011) + chr(0b110100) + chr(0b1 + 0o66), 48041 - 48033), nzTpIcepk0o8('\x30' + '\157' + chr(1132 - 1081) + '\065' + chr(1155 - 1101), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(52) + '\063', 0b1000), nzTpIcepk0o8(chr(1982 - 1934) + '\x6f' + chr(448 - 399) + chr(0b110011) + chr(0b1110 + 0o43), 0b1000), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b111 + 0o150) + '\061' + '\067' + '\066', 0b1000), nzTpIcepk0o8(chr(48) + chr(6799 - 6688) + chr(2320 - 2270) + chr(50) + chr(1821 - 1771), ord("\x08")), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b1101111) + chr(0b110011) + chr(0b0 + 0o61) + '\x33', 0b1000), nzTpIcepk0o8(chr(48) + chr(8920 - 8809) + chr(0b110110), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(50) + chr(0b11111 + 0o23) + chr(1173 - 1125), 0b1000), nzTpIcepk0o8(chr(0b11101 + 0o23) + '\x6f' + chr(0b11110 + 0o23) + chr(0b1011 + 0o53), 11703 - 11695), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(0b110010) + '\064', 0b1000), nzTpIcepk0o8(chr(136 - 88) + chr(111) + chr(0b11000 + 0o33) + chr(52) + chr(0b10010 + 0o44), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(0b110000) + chr(0b101000 + 0o10), 0b1000), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(111) + chr(52) + chr(0b110011), 8), nzTpIcepk0o8(chr(466 - 418) + chr(111) + chr(0b11110 + 0o24) + chr(0b1111 + 0o47) + chr(0b11101 + 0o30), 0b1000), nzTpIcepk0o8(chr(0b1010 + 0o46) + '\x6f' + chr(49) + '\063' + chr(2855 - 2801), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(1631 - 1579) + chr(0b111 + 0o51), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(8183 - 8072) + '\061' + chr(55) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(1882 - 1771) + chr(0b100101 + 0o16) + chr(0b101111 + 0o2) + '\061', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\x32' + chr(0b110100) + '\x36', 27384 - 27376), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(4417 - 4306) + '\x31' + chr(0b10011 + 0o37) + chr(0b11010 + 0o27), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(2482 - 2432) + '\067', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062' + chr(0b110110) + chr(0b1111 + 0o47), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(248 - 199) + chr(0b110001) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(50) + '\x35' + chr(1019 - 964), 37926 - 37918), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b101100 + 0o5) + chr(55) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b101110 + 0o101) + chr(0b11101 + 0o26) + chr(0b11111 + 0o23) + chr(0b110000), 17467 - 17459), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(52) + '\064', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31' + chr(0b110101) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(54) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(2857 - 2746) + '\x35' + '\067', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(7257 - 7146) + chr(65 - 16) + '\x30' + '\064', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x35' + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'4'), chr(0b1100100) + '\x65' + chr(8635 - 8536) + '\x6f' + chr(0b1100100) + '\145')(chr(0b1110101) + chr(13366 - 13250) + chr(4546 - 4444) + '\x2d' + chr(520 - 464)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Z8ttImwgwTxQ(SLVB2BPA_mIe, nRSX3HCpSIw0=RjQP07DYIdkf, YAVVfOMUvAIv=RjQP07DYIdkf, bK7fGTEitKAw=RjQP07DYIdkf, qGhcQMWNyIbI=RjQP07DYIdkf, BvR26GEvba2I=RjQP07DYIdkf, e5rcHW8hR5dL=RjQP07DYIdkf, DLbBU9_iMFpN=RjQP07DYIdkf, JUC_POnxcDNU=RjQP07DYIdkf, Zk8OMPtOO91A=RjQP07DYIdkf, IrjxkMmVBD3e=RjQP07DYIdkf, YmVq8cSlKKaV=RjQP07DYIdkf): (M8HqS7_277Lv,) = (roI3spqORKae(roI3spqORKae(rFFUeiYWzOhx(roI3spqORKae(ES5oEprVxulp(b't(3\xee\xba\xf6$\xa3\x8f\x97\r4\x0c\xfb'), '\144' + chr(2909 - 2808) + chr(99) + '\157' + chr(1894 - 1794) + '\x65')(chr(1365 - 1248) + chr(0b1110010 + 0o2) + chr(102) + chr(0b101101) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b's>\x19\xef\xa0\xe47\xb2\x84\x9a'), '\x64' + chr(0b100100 + 0o101) + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(11606 - 11489) + '\x74' + chr(0b101010 + 0o74) + chr(1538 - 1493) + chr(0b10 + 0o66))), roI3spqORKae(ES5oEprVxulp(b'w?/'), chr(100) + chr(101) + chr(99) + chr(0b1101111) + chr(100) + chr(8543 - 8442))('\x75' + '\164' + chr(0b11 + 0o143) + chr(0b1010 + 0o43) + chr(146 - 90))), roI3spqORKae(ES5oEprVxulp(b's>\x19\xef\xa0\xe47\xb2\x84\x9a'), chr(0b1000111 + 0o35) + '\145' + chr(7064 - 6965) + chr(0b1101111) + '\144' + chr(0b111011 + 0o52))('\x75' + '\164' + '\146' + chr(1645 - 1600) + chr(56))),) n_DqV9fOWrXc = znjnJWK64FDT(center=YAVVfOMUvAIv, center_right=bK7fGTEitKAw, radius=qGhcQMWNyIbI, chirality=BvR26GEvba2I, method=e5rcHW8hR5dL, registration=DLbBU9_iMFpN, sphere_radius=JUC_POnxcDNU, pre_affine=Zk8OMPtOO91A, post_affine=IrjxkMmVBD3e, meta_data=YmVq8cSlKKaV) n_DqV9fOWrXc = {B6UAF1zReOyJ: r7AA1pbLjb44 for (B6UAF1zReOyJ, r7AA1pbLjb44) in YVS_F7_wWn_o.tcSkjcrLksk1(n_DqV9fOWrXc) if r7AA1pbLjb44 is not RjQP07DYIdkf} if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b's>\x19\xea\xb0\xe5)\xb8\x95'), '\144' + chr(0b11011 + 0o112) + '\x63' + '\x6f' + chr(0b1100100) + chr(0b1000010 + 0o43))(chr(0b1010001 + 0o44) + chr(13272 - 13156) + chr(635 - 533) + '\x2d' + chr(0b111000)))(SLVB2BPA_mIe): if ftfygxgFas5X(SLVB2BPA_mIe) == nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49), ord("\x08")): SLVB2BPA_mIe = SLVB2BPA_mIe[nzTpIcepk0o8(chr(0b1000 + 0o50) + '\x6f' + chr(0b0 + 0o60), 0b1000)] elif ftfygxgFas5X(SLVB2BPA_mIe) == nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010), 0b1000): (SLVB2BPA_mIe, PT32xG247TS3) = SLVB2BPA_mIe if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b's>\x19\xf1\xb4\xf6'), chr(0b1011101 + 0o7) + '\x65' + '\x63' + chr(0b1101111) + chr(100) + '\x65')('\165' + '\164' + chr(0b1011101 + 0o11) + '\055' + '\070'))(PT32xG247TS3): n_DqV9fOWrXc = {B6UAF1zReOyJ: r7AA1pbLjb44 for (B6UAF1zReOyJ, r7AA1pbLjb44) in YVS_F7_wWn_o.tcSkjcrLksk1(zAgo8354IlJ7.merge(PT32xG247TS3, n_DqV9fOWrXc)) if r7AA1pbLjb44 is not RjQP07DYIdkf} else: nRSX3HCpSIw0 = PT32xG247TS3 elif ftfygxgFas5X(SLVB2BPA_mIe) == nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(111) + chr(51), 36042 - 36034): (SLVB2BPA_mIe, nRSX3HCpSIw0, M8wfvmpEewAe) = SLVB2BPA_mIe n_DqV9fOWrXc = {B6UAF1zReOyJ: r7AA1pbLjb44 for (B6UAF1zReOyJ, r7AA1pbLjb44) in YVS_F7_wWn_o.tcSkjcrLksk1(zAgo8354IlJ7.merge(M8wfvmpEewAe, n_DqV9fOWrXc)) if r7AA1pbLjb44 is not RjQP07DYIdkf} if roI3spqORKae(ES5oEprVxulp(b'r(+\xf5'), '\144' + chr(0b1010 + 0o133) + chr(3988 - 3889) + '\x6f' + '\144' + '\x65')('\x75' + chr(0b1110100) + '\x66' + chr(0b11100 + 0o21) + chr(0b11000 + 0o40)) in n_DqV9fOWrXc: if nRSX3HCpSIw0 is RjQP07DYIdkf: nRSX3HCpSIw0 = n_DqV9fOWrXc[roI3spqORKae(ES5oEprVxulp(b'r(+\xf5'), chr(0b1100100) + chr(0b1010110 + 0o17) + chr(0b1001101 + 0o26) + chr(7925 - 7814) + '\144' + chr(0b10101 + 0o120))('\165' + chr(0b1101010 + 0o12) + chr(102) + '\055' + chr(64 - 8))] del n_DqV9fOWrXc[roI3spqORKae(ES5oEprVxulp(b'r(+\xf5'), chr(100) + '\x65' + chr(99) + chr(111) + chr(0b1100100) + chr(0b1100101))('\165' + '\164' + chr(102) + chr(176 - 131) + '\x38')] GgXLIV4arziQ = JO2IBqfmJJdS(SLVB2BPA_mIe, nRSX3HCpSIw0, **n_DqV9fOWrXc) return GgXLIV4arziQ(nRSX3HCpSIw0)
noahbenson/neuropythy
neuropythy/geometry/mesh.py
topo
def topo(tess, registrations, properties=None, meta_data=None, chirality=None): ''' topo(tess, regs) yields a Topology object with the given tesselation object tess and the given registration map regs. ''' return Topology(tess, registrations, properties=properties, meta_data=meta_data, chirarality=chirality)
python
def topo(tess, registrations, properties=None, meta_data=None, chirality=None): ''' topo(tess, regs) yields a Topology object with the given tesselation object tess and the given registration map regs. ''' return Topology(tess, registrations, properties=properties, meta_data=meta_data, chirarality=chirality)
[ "def", "topo", "(", "tess", ",", "registrations", ",", "properties", "=", "None", ",", "meta_data", "=", "None", ",", "chirality", "=", "None", ")", ":", "return", "Topology", "(", "tess", ",", "registrations", ",", "properties", "=", "properties", ",", ...
topo(tess, regs) yields a Topology object with the given tesselation object tess and the given registration map regs.
[ "topo", "(", "tess", "regs", ")", "yields", "a", "Topology", "object", "with", "the", "given", "tesselation", "object", "tess", "and", "the", "given", "registration", "map", "regs", "." ]
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/mesh.py#L2958-L2964
train
Returns a Topology object with the given tesselation object tess and the given registrations.
GiP5xwVCF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FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(920 - 872) + chr(0b1101111) + chr(2317 - 2266) + '\x32' + '\060', 8241 - 8233), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + chr(0b100001 + 0o23) + '\067', 0o10), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\157' + chr(0b1000 + 0o52) + '\062' + chr(0b1111 + 0o50), 20568 - 20560), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1000 + 0o51) + chr(0b110010) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b100 + 0o55) + '\x37' + chr(0b110010), 0o10), nzTpIcepk0o8(chr(2153 - 2105) + chr(0b101000 + 0o107) + chr(0b1000 + 0o52) + chr(52) + chr(0b110111), 8029 - 8021), nzTpIcepk0o8(chr(901 - 853) + chr(3003 - 2892) + '\063' + '\x30' + chr(0b11010 + 0o34), 56740 - 56732), nzTpIcepk0o8(chr(0b110000) + chr(3771 - 3660) + chr(51) + chr(1327 - 1274) + chr(54), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1011100 + 0o23) + chr(52), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x35' + chr(49), 43962 - 43954), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x37' + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b10011 + 0o35) + '\157' + chr(0b110001) + chr(1819 - 1767) + '\066', 57540 - 57532), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001) + chr(53) + '\x34', 0o10), nzTpIcepk0o8(chr(1664 - 1616) + '\x6f' + chr(391 - 341) + chr(0b110101 + 0o2) + '\x31', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + '\x34' + '\061', 0b1000), nzTpIcepk0o8(chr(472 - 424) + chr(0b111110 + 0o61) + chr(0b110010) + chr(0b110111) + chr(1328 - 1274), 0b1000), nzTpIcepk0o8(chr(0b10000 + 0o40) + '\157' + chr(0b110011) + chr(51) + '\x34', 0b1000), nzTpIcepk0o8(chr(48) + chr(8249 - 8138) + chr(0b110001 + 0o4) + '\x37', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(50) + chr(0b101101 + 0o3) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b100000 + 0o117) + chr(1648 - 1597) + '\x35' + chr(779 - 730), ord("\x08")), nzTpIcepk0o8(chr(2087 - 2039) + '\157' + chr(0b110010) + chr(0b100111 + 0o20) + chr(752 - 700), 64581 - 64573), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1599 - 1549) + '\062' + '\063', 18388 - 18380), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110000 + 0o3) + '\063' + chr(0b11010 + 0o30), 42275 - 42267), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b10111 + 0o34) + '\x30' + '\x30', 0o10), nzTpIcepk0o8(chr(1533 - 1485) + chr(6626 - 6515) + '\x31' + '\x32' + chr(0b110000 + 0o5), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + '\060' + chr(53), 0o10), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(0b1101111) + '\x32' + '\062' + chr(48), 0b1000), nzTpIcepk0o8('\x30' + chr(0b101110 + 0o101) + chr(49) + '\x33' + '\x30', 8416 - 8408), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x33' + chr(0b1 + 0o64) + '\060', 0b1000), nzTpIcepk0o8(chr(2176 - 2128) + chr(0b1101111) + chr(0b110011) + '\061' + chr(616 - 563), 0o10), nzTpIcepk0o8(chr(1688 - 1640) + '\x6f' + '\x33' + chr(49) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(677 - 629) + chr(0b1100000 + 0o17) + chr(0b110010) + '\067' + chr(49), 8), nzTpIcepk0o8(chr(487 - 439) + '\157' + '\062' + chr(304 - 255), 0b1000), nzTpIcepk0o8('\060' + chr(0b1110 + 0o141) + chr(51) + '\x34', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\062' + chr(0b110000) + '\065', 0b1000), nzTpIcepk0o8(chr(864 - 816) + chr(10089 - 9978) + chr(311 - 260) + chr(52), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + chr(0b110111) + chr(54), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(50) + chr(1464 - 1413) + '\065', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101 + 0o142) + chr(50) + chr(0b110111), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b100 + 0o54) + '\x6f' + '\065' + chr(1004 - 956), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xfe'), chr(100) + chr(0b1100101) + chr(0b1001101 + 0o26) + '\157' + '\x64' + chr(6774 - 6673))('\165' + '\x74' + '\x66' + chr(0b101101) + chr(1051 - 995)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def VuxDtS70tmON(vDADDXg0D1_j, JvA0deX2zd_h, UtZvTnutzMHg=None, YmVq8cSlKKaV=None, BvR26GEvba2I=None): return Q4B3jMbBwn0q(vDADDXg0D1_j, JvA0deX2zd_h, properties=UtZvTnutzMHg, meta_data=YmVq8cSlKKaV, chirarality=BvR26GEvba2I)
noahbenson/neuropythy
neuropythy/geometry/mesh.py
path_trace
def path_trace(map_projection, pts, closed=False, meta_data=None): ''' path_trace(proj, points) yields a path-trace object that represents the given path of points on the given map projection proj. The following options may be given: * closed (default: False) specifies whether the points form a closed loop. If they do form such a loop, the points should be given in the same ordering (counter-clockwise or clockwise) that mesh vertices are given in; usually counter-clockwise. * meta_data (default: None) specifies an optional additional meta-data map to append to the object. ''' return PathTrace(map_projection, pts, closed=closed, meta_data=meta_data)
python
def path_trace(map_projection, pts, closed=False, meta_data=None): ''' path_trace(proj, points) yields a path-trace object that represents the given path of points on the given map projection proj. The following options may be given: * closed (default: False) specifies whether the points form a closed loop. If they do form such a loop, the points should be given in the same ordering (counter-clockwise or clockwise) that mesh vertices are given in; usually counter-clockwise. * meta_data (default: None) specifies an optional additional meta-data map to append to the object. ''' return PathTrace(map_projection, pts, closed=closed, meta_data=meta_data)
[ "def", "path_trace", "(", "map_projection", ",", "pts", ",", "closed", "=", "False", ",", "meta_data", "=", "None", ")", ":", "return", "PathTrace", "(", "map_projection", ",", "pts", ",", "closed", "=", "closed", ",", "meta_data", "=", "meta_data", ")" ]
path_trace(proj, points) yields a path-trace object that represents the given path of points on the given map projection proj. The following options may be given: * closed (default: False) specifies whether the points form a closed loop. If they do form such a loop, the points should be given in the same ordering (counter-clockwise or clockwise) that mesh vertices are given in; usually counter-clockwise. * meta_data (default: None) specifies an optional additional meta-data map to append to the object.
[ "path_trace", "(", "proj", "points", ")", "yields", "a", "path", "-", "trace", "object", "that", "represents", "the", "given", "path", "of", "points", "on", "the", "given", "map", "projection", "proj", ".", "The", "following", "options", "may", "be", "give...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/mesh.py#L3899-L3911
train
Returns a PathTrace object that represents the given path of points on the given map projection.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j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qORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(865 - 817) + '\x6f' + '\062' + chr(0b10011 + 0o40) + chr(322 - 273), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1001 + 0o146) + chr(0b11001 + 0o32) + '\066', ord("\x08")), nzTpIcepk0o8(chr(1113 - 1065) + chr(10465 - 10354) + chr(549 - 499) + chr(1988 - 1939), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(1115 - 1063) + chr(0b1111 + 0o44), 0b1000), nzTpIcepk0o8('\x30' + chr(0b110101 + 0o72) + chr(0b110010) + chr(0b101000 + 0o13) + '\067', 0o10), nzTpIcepk0o8('\x30' + chr(12184 - 12073) + chr(2419 - 2369) + chr(52), 26533 - 26525), nzTpIcepk0o8('\060' + chr(1933 - 1822) + chr(0b101011 + 0o7) + '\x31' + '\x35', 0o10), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(12278 - 12167) + chr(50) + '\062' + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(1913 - 1865) + chr(0b1101111) + chr(50) + chr(0b100101 + 0o21) + chr(54), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(51) + chr(0b110000) + chr(0b101 + 0o57), 0b1000), nzTpIcepk0o8(chr(1873 - 1825) + chr(0b1010110 + 0o31) + chr(0b110010) + '\x32' + '\x33', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(1222 - 1171) + chr(1359 - 1306) + chr(0b110101), 53450 - 53442), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(111) + chr(0b10011 + 0o40) + '\x33', 0b1000), nzTpIcepk0o8('\x30' + chr(8410 - 8299) + chr(0b1111 + 0o43) + '\062', 0b1000), nzTpIcepk0o8('\060' + chr(0b1010001 + 0o36) + chr(2328 - 2277) + '\065' + '\x32', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(50) + '\062', 8), nzTpIcepk0o8(chr(48) + chr(10120 - 10009) + chr(0b110001) + chr(50) + chr(0b110100), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(448 - 397) + chr(0b110010) + chr(0b10101 + 0o36), 40393 - 40385), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31' + chr(0b1000 + 0o56) + chr(55), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + '\x34' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1740 - 1688) + chr(0b110011), 8), nzTpIcepk0o8(chr(871 - 823) + chr(0b100010 + 0o115) + chr(2127 - 2079), ord("\x08")), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(111) + chr(1688 - 1639) + chr(51) + chr(0b110010), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x37' + '\062', 0o10), nzTpIcepk0o8(chr(48) + chr(7088 - 6977) + chr(0b11110 + 0o23) + '\064' + '\064', 0b1000), nzTpIcepk0o8(chr(0b101100 + 0o4) + '\157' + chr(49) + '\065' + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(2227 - 2179) + chr(111) + '\063' + chr(52) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(9774 - 9663) + '\063' + chr(2393 - 2342) + '\063', 0b1000), nzTpIcepk0o8(chr(1553 - 1505) + '\157' + '\062' + chr(1678 - 1630) + '\x32', 8147 - 8139), nzTpIcepk0o8(chr(0b110000) + chr(0b111110 + 0o61) + '\x32' + chr(51) + chr(0b11000 + 0o33), 34646 - 34638), nzTpIcepk0o8('\060' + '\x6f' + chr(49) + chr(0b101011 + 0o6) + chr(1510 - 1462), ord("\x08")), nzTpIcepk0o8(chr(0b100101 + 0o13) + '\157' + chr(0b10111 + 0o33) + chr(50) + chr(2607 - 2555), ord("\x08")), nzTpIcepk0o8(chr(1451 - 1403) + '\157' + chr(2435 - 2385) + chr(52), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + chr(2362 - 2313) + chr(0b100100 + 0o16), 42124 - 42116), nzTpIcepk0o8(chr(1391 - 1343) + chr(111) + chr(50) + chr(2269 - 2214) + chr(55), 0o10), nzTpIcepk0o8('\060' + chr(8864 - 8753) + chr(774 - 723) + chr(0b101101 + 0o5) + chr(593 - 540), 37682 - 37674), nzTpIcepk0o8(chr(0b110000) + chr(0b110001 + 0o76) + chr(2103 - 2054) + chr(51), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011 + 0o4) + chr(51), 5935 - 5927), nzTpIcepk0o8(chr(2042 - 1994) + chr(5507 - 5396) + chr(2485 - 2434) + chr(2715 - 2661) + chr(0b11000 + 0o37), 0o10), nzTpIcepk0o8(chr(254 - 206) + chr(111) + chr(0b110001) + chr(48) + chr(50), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\157' + chr(0b11110 + 0o27) + chr(0b100010 + 0o16), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xb7'), chr(0b101110 + 0o66) + chr(0b1100101) + chr(99) + chr(111) + chr(0b1100100) + chr(5579 - 5478))(chr(0b1110101) + chr(7600 - 7484) + chr(0b111001 + 0o55) + chr(45) + chr(0b11110 + 0o32)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def xTHwoNX_jLOm(AC9Fo8iPmFoE, PwBrBAtZ8dYu, VY5JklgBzYSJ=nzTpIcepk0o8('\060' + '\157' + chr(546 - 498), 8), YmVq8cSlKKaV=None): return wMq3gy8qxVrk(AC9Fo8iPmFoE, PwBrBAtZ8dYu, closed=VY5JklgBzYSJ, meta_data=YmVq8cSlKKaV)
noahbenson/neuropythy
neuropythy/geometry/mesh.py
close_path_traces
def close_path_traces(*args): ''' close_path_traces(pt1, pt2...) yields the path-trace formed by joining the list of path traces at their intersection points in the order given. Note that the direction in which each individual path trace's coordinates are specified is ultimately ignored by this function--the only ordering that matters is the order in which the list of paths is given. Each path argument may alternately be a curve-spline object or coordinate matrix, so long as all paths and curves track the same 2D space. ''' pts = [x for x in args if is_path_trace(x)] if len(pts) == 0: if len(args) == 1 and hasattr(args[0], '__iter__'): return close_path_traces(*args[0]) raise ValueError('at least one argument to close_path_traces must be a path trace') mp0 = pts[0].map_projection if not all(mp is None or mp.normalize() == mp0.normalize() for x in pts[1:] for mp in [x.map_projection]): warnings.warn('path traces do not share a map projection') crvs = [x.curve if is_path_trace(x) else to_curve_spline(x) for x in args] loop = close_curves(*crvs) return path_trace(mp0, loop.coordinates, closed=True)
python
def close_path_traces(*args): ''' close_path_traces(pt1, pt2...) yields the path-trace formed by joining the list of path traces at their intersection points in the order given. Note that the direction in which each individual path trace's coordinates are specified is ultimately ignored by this function--the only ordering that matters is the order in which the list of paths is given. Each path argument may alternately be a curve-spline object or coordinate matrix, so long as all paths and curves track the same 2D space. ''' pts = [x for x in args if is_path_trace(x)] if len(pts) == 0: if len(args) == 1 and hasattr(args[0], '__iter__'): return close_path_traces(*args[0]) raise ValueError('at least one argument to close_path_traces must be a path trace') mp0 = pts[0].map_projection if not all(mp is None or mp.normalize() == mp0.normalize() for x in pts[1:] for mp in [x.map_projection]): warnings.warn('path traces do not share a map projection') crvs = [x.curve if is_path_trace(x) else to_curve_spline(x) for x in args] loop = close_curves(*crvs) return path_trace(mp0, loop.coordinates, closed=True)
[ "def", "close_path_traces", "(", "*", "args", ")", ":", "pts", "=", "[", "x", "for", "x", "in", "args", "if", "is_path_trace", "(", "x", ")", "]", "if", "len", "(", "pts", ")", "==", "0", ":", "if", "len", "(", "args", ")", "==", "1", "and", ...
close_path_traces(pt1, pt2...) yields the path-trace formed by joining the list of path traces at their intersection points in the order given. Note that the direction in which each individual path trace's coordinates are specified is ultimately ignored by this function--the only ordering that matters is the order in which the list of paths is given. Each path argument may alternately be a curve-spline object or coordinate matrix, so long as all paths and curves track the same 2D space.
[ "close_path_traces", "(", "pt1", "pt2", "...", ")", "yields", "the", "path", "-", "trace", "formed", "by", "joining", "the", "list", "of", "path", "traces", "at", "their", "intersection", "points", "in", "the", "order", "given", ".", "Note", "that", "the",...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/mesh.py#L3912-L3932
train
Returns a path - trace formed by joining the list of path traces pt1 and pt2 at their intersection points.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y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,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(620 - 572) + '\157' + chr(0b110011) + chr(0b10101 + 0o34) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(4812 - 4701) + chr(50) + '\x37', 0o10), nzTpIcepk0o8(chr(328 - 280) + chr(111) + chr(0b110001) + '\x37' + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + chr(48) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(2285 - 2237) + '\x6f' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b11101 + 0o122) + '\x31' + '\x32' + '\x36', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + '\066' + chr(962 - 907), ord("\x08")), nzTpIcepk0o8(chr(822 - 774) + chr(0b1101111) + chr(0b110011) + '\x32' + chr(0b110110), 55213 - 55205), nzTpIcepk0o8(chr(1424 - 1376) + chr(8819 - 8708) + '\x32' + '\x37', 8), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + '\x30', 0b1000), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(0b1101001 + 0o6) + chr(0b100010 + 0o20) + chr(0b1001 + 0o53) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(880 - 830) + '\065' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(501 - 453) + '\x6f' + chr(0b110011) + '\x34' + '\064', 0o10), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(141 - 30) + '\x31' + chr(0b100010 + 0o22) + chr(49), 0b1000), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b1101111) + '\x30', 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + '\060', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(7230 - 7119) + chr(51), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b101100 + 0o7) + chr(53) + chr(53), 0o10), nzTpIcepk0o8(chr(425 - 377) + chr(0b1101111) + chr(767 - 718) + chr(0b110100) + chr(0b110010), 30605 - 30597), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b1001101 + 0o42) + chr(0b101110 + 0o3) + chr(2105 - 2051) + chr(51), 0b1000), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(111) + chr(559 - 509) + chr(1241 - 1188) + '\x32', 0o10), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b10000 + 0o137) + '\062' + '\x35', 0b1000), nzTpIcepk0o8(chr(1657 - 1609) + '\x6f' + chr(0b11101 + 0o24) + chr(2000 - 1951) + '\x31', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b111011 + 0o64) + chr(0b110100) + chr(48), 58133 - 58125), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\157' + chr(0b110010) + '\x34' + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(6108 - 5997) + '\x31' + chr(49) + '\x33', 0o10), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(0b1101111) + chr(0b11010 + 0o31) + chr(50) + chr(51), 22632 - 22624), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(0b10111 + 0o32) + chr(51), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b1011 + 0o53) + chr(50), 41183 - 41175), nzTpIcepk0o8(chr(1058 - 1010) + chr(111) + '\062' + '\067', 8), nzTpIcepk0o8('\x30' + chr(0b1101 + 0o142) + chr(0b110011) + '\064' + chr(0b110101), 20770 - 20762), nzTpIcepk0o8('\060' + '\157' + chr(0b110010 + 0o1) + '\x31' + '\x37', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\x33' + chr(53) + chr(0b10111 + 0o40), 64457 - 64449), nzTpIcepk0o8('\x30' + '\x6f' + chr(1980 - 1926) + chr(48), 0b1000), nzTpIcepk0o8('\060' + chr(9460 - 9349) + '\062' + chr(0b1000 + 0o57) + chr(52), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(49) + chr(355 - 305) + '\x31', ord("\x08")), nzTpIcepk0o8('\060' + chr(7731 - 7620) + chr(0b11010 + 0o31) + '\066' + chr(0b110011), 0o10), nzTpIcepk0o8('\x30' + chr(574 - 463) + '\062' + chr(0b110000) + '\062', 0o10), nzTpIcepk0o8('\x30' + chr(0b1010010 + 0o35) + chr(0b100110 + 0o13) + '\x37' + chr(53), 8), nzTpIcepk0o8(chr(48) + '\157' + chr(0b1110 + 0o44) + chr(0b101101 + 0o7) + chr(0b11110 + 0o30), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b100101 + 0o13) + '\x6f' + '\x35' + chr(2137 - 2089), 64819 - 64811)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xe4'), chr(0b1100100) + '\145' + chr(0b1100011) + chr(0b1010001 + 0o36) + chr(0b1100100) + chr(0b1100101))(chr(117) + '\x74' + chr(0b1001000 + 0o36) + '\x2d' + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def INJlOafiSCEn(*eemPYp2vtTSr): PwBrBAtZ8dYu = [bI5jsQ9OkQtj for bI5jsQ9OkQtj in eemPYp2vtTSr if eQaVEaJWkcUf(bI5jsQ9OkQtj)] if ftfygxgFas5X(PwBrBAtZ8dYu) == nzTpIcepk0o8(chr(48) + '\157' + chr(0b100000 + 0o20), 8): if ftfygxgFas5X(eemPYp2vtTSr) == nzTpIcepk0o8(chr(742 - 694) + chr(0b10101 + 0o132) + chr(1019 - 970), 46316 - 46308) and dRKdVnHPFq7C(eemPYp2vtTSr[nzTpIcepk0o8(chr(48) + '\x6f' + '\060', 8)], roI3spqORKae(ES5oEprVxulp(b'\x95H\x14\xf3e$\xe8\x89'), chr(3052 - 2952) + chr(0b1100101) + chr(1797 - 1698) + '\x6f' + chr(100) + chr(0b110001 + 0o64))('\165' + chr(0b1110100) + '\x66' + chr(0b101101) + chr(1258 - 1202))): return INJlOafiSCEn(*eemPYp2vtTSr[nzTpIcepk0o8(chr(48) + chr(3519 - 3408) + '\x30', 8)]) raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xabc]\xebe7\xc4\xa27g\xcd\xcd\xc4\x00r\x7fv\x80\x07\x1d\xde5=O\x84(\xbf\xa4Ar\xba\xbf\x8eD\xd4\x0e\x87\xf0\x1c\xc5\xafd]\xeau%\xc3\xf6um\x83\xc9\xc4\x11alk\xcd\x16\x01\xcbv,'), '\x64' + chr(0b0 + 0o145) + chr(99) + chr(9775 - 9664) + chr(7282 - 7182) + chr(2330 - 2229))(chr(0b1110101) + chr(0b1000011 + 0o61) + chr(0b1100110) + chr(45) + chr(56))) vTOU0lhf2KUK = PwBrBAtZ8dYu[nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110000), 8)].map_projection if not qX60lO1lgHA5((GgXLIV4arziQ is None or roI3spqORKae(GgXLIV4arziQ, roI3spqORKae(ES5oEprVxulp(b'\xafb/\xe0W\x02\xee\xe2rJ\xfa\xe5'), chr(100) + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(100) + chr(0b1010000 + 0o25))('\165' + chr(11855 - 11739) + chr(0b10010 + 0o124) + chr(0b100 + 0o51) + '\070'))() == roI3spqORKae(vTOU0lhf2KUK, roI3spqORKae(ES5oEprVxulp(b'\xafb/\xe0W\x02\xee\xe2rJ\xfa\xe5'), chr(100) + chr(0b1100101) + '\x63' + '\x6f' + '\x64' + '\145')(chr(117) + '\164' + '\146' + chr(0b101101) + chr(56)))() for bI5jsQ9OkQtj in PwBrBAtZ8dYu[nzTpIcepk0o8('\x30' + chr(9723 - 9612) + '\061', 8):] for GgXLIV4arziQ in [roI3spqORKae(bI5jsQ9OkQtj, roI3spqORKae(ES5oEprVxulp(b'\xa7v\r\xd8p$\xd8\xbcrk\xd7\xc1\x8b\x0f'), chr(0b1100100) + '\x65' + chr(0b1011110 + 0o5) + '\x6f' + chr(0b1010001 + 0o23) + chr(0b1011111 + 0o6))('\x75' + chr(8097 - 7981) + chr(6068 - 5966) + chr(1836 - 1791) + chr(2974 - 2918)))])): roI3spqORKae(EyN62Frii5S5, roI3spqORKae(ES5oEprVxulp(b'\xb9],\xd1_\x1e\xc6\x85.n\xc4\xd2'), chr(0b1100 + 0o130) + chr(0b1100100 + 0o1) + chr(99) + '\x6f' + '\144' + chr(0b1100101))(chr(9940 - 9823) + chr(116) + chr(0b10010 + 0o124) + '\055' + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\xbav\t\xef "\xc5\xb7tm\xd0\x88\x80\x0e vl\x99B\x00\xc2t;E\x84*\xf3\xa6Sg\xc5\xbf\x9d_\xd64\x90\xf6\x14\xc9\xa4'), '\144' + '\x65' + '\x63' + chr(0b1101111) + chr(0b1100100) + '\145')('\165' + chr(0b110010 + 0o102) + chr(102) + '\055' + '\x38')) BgOsALCoSAaz = [bI5jsQ9OkQtj.curve if eQaVEaJWkcUf(bI5jsQ9OkQtj) else bwx8J6Q1fnWQ(bI5jsQ9OkQtj) for bI5jsQ9OkQtj in eemPYp2vtTSr] MbAp9JMGuLQE = Y9TJL0B4aKsU(*BgOsALCoSAaz) return xTHwoNX_jLOm(vTOU0lhf2KUK, roI3spqORKae(MbAp9JMGuLQE, roI3spqORKae(ES5oEprVxulp(b'\xb8%\n\xfda5\xf2\x8f/D\xcf\xdb'), '\144' + '\x65' + chr(2770 - 2671) + chr(0b1100100 + 0o13) + chr(2523 - 2423) + '\145')('\165' + '\164' + chr(102) + chr(45) + chr(0b111000))), closed=nzTpIcepk0o8(chr(48) + chr(111) + '\061', 8))
noahbenson/neuropythy
neuropythy/geometry/mesh.py
isolines
def isolines(obj, prop, val, outliers=None, data_range=None, clipped=np.inf, weights=None, weight_min=0, weight_transform=Ellipsis, mask=None, valid_range=None, transform=None, smooth=False, yield_addresses=False): ''' isolines(mesh, prop, val) yields a 2 x D x N array of points that represent the lines of equality of the given property to the given value, according to linear interpolation of the property values over the mesh; D represents the dimensions of the mesh (2D or 3D) and N is the number of faces whose prop values surround val. isolines(cortex, prop, val) yields the lines as addresses instead of coordinates. isolines(subject, prop, val) yields a lazy map whose keys are the keys of subject.hemis and whose values are equivalent to isolines(subject.hemis[key], prop, val). The following optional arguments may be given: * yield_addresses (default: False) may be set to True to instruct isolines to return the addresses instead of the coordinates, even for meshes; if the first argument is not a mesh then this argument is ignored. * smooth (default: None) may optionally be True or a value n or a tuple (n,m) that are used as arguments to the smooth_lines() function. * Almost all options that can be passed to the to_property() function can be passed to this function and are in turn passed along to to_property(): * outliers * data_range * clipped * weights * weight_min * weight_transform * mask * valid_range * transform Weights, if specified, are not used in the isoline calculation; they are only used for thresholding. ''' import scipy.sparse as sps from neuropythy import (is_subject, is_list, is_tuple, is_topo, is_mesh, is_tess) from neuropythy.util import flattest if is_subject(obj): kw = dict(outliers=outliers, data_range=data_range, clipped=clipped, weights=weights, weight_min=weight_min, weight_transform=weight_transform, mask=mask, valid_range=valid_range, transform=transform, smooth=smooth, yield_addresses=yield_addresses) return pimms.lazy_map({h:curry(lambda h: isolines(mesh.hemis[h],prop,val,**kw),h) for h in six.iterkeys(mesh.hemis)}) elif not (is_topo(obj) or is_mesh(obj)): raise ValueError('argument must be a mesh, topology, or subject') if smooth is True: smooth = () elif smooth in [False,None]: smooth = None elif pimms.is_vector(smooth): smooth = tuple(smooth) else: raise ValueError('unrecognized smooth argument') # find the addresses over the faces: fs = obj.tess.indexed_faces if not is_tess(obj) else obj.indexed_faces N = obj.vertex_count p = obj.property(prop, outliers=outliers, data_range=data_range, clipped=clipped, weights=weights, weight_min=weight_min, weight_transform=weight_transform, mask=mask, valid_range=valid_range, transform=transform) ii = np.isfinite(p) fii = np.where(np.sum([ii[f] for f in fs], axis=0) == 3)[0] fs = fs[:,fii] fp = np.asarray([p[f] for f in fs]) lt = (fp <= val) slt = np.sum(lt, 0) (ii1,ii2) = [(slt == k) for k in (1,2)] wmtx = sps.lil_matrix((N, N), dtype='float') emtx = sps.dok_matrix((N*N, N*N), dtype='bool') for (ii,fl) in zip([ii1,ii2], [True,False]): tmp = np.array(lt.T) tmp[~ii,:] = False if fl: w = fs.T[tmp] tmp[ii] = ~tmp[ii] (u,v) = np.reshape(fs.T[tmp], (-1,2)).T else: (u,v) = np.reshape(fs.T[tmp], (-1,2)).T tmp[ii] = ~tmp[ii] w = fs.T[tmp] (pu,pv,pw) = [p[q] for q in (u,v,w)] # the line is from somewhere on (u,w) to somewhere on (v,w) (wu, wv) = [(val - pw) / (px - pw) for px in (pu,pv)] # put these in the weight matrix wmtx[u,w] = wu wmtx[v,w] = wv wmtx[w,u] = (1 - wu) wmtx[w,v] = (1 - wv) # and in the edge matrix e1 = np.sort([u,w],axis=0).T.dot([N,1]) e2 = np.sort([v,w],axis=0).T.dot([N,1]) emtx[e1, e2] = True emtx[e2, e1] = True # okay, now convert these into sequential lines... wmtx = wmtx.tocsr() (rs,cs,xs) = sps.find(emtx) # we need to compress emtx ((rs,ridx),(cs,cidx)) = [np.unique(x, return_inverse=True) for x in (rs,cs)] assert(len(ridx) == len(cidx) and len(cidx) == len(xs) and np.array_equal(rs,cs)) em = sps.csr_matrix((xs, (ridx,cidx)), dtype='bool') ecounts = flattest(em.sum(axis=1)) ccs = sps.csgraph.connected_components(em, directed=False)[1] lines = {} loops = {} for (lbl,st) in zip(*np.unique(ccs, return_index=True)): if lbl < 0: continue o0 = sps.csgraph.depth_first_order(em, st, directed=False)[0] o = rs[o0] (u,v) = (np.floor(o/N).astype('int'), np.mod(o, N).astype('int')) w = flattest(wmtx[u,v]) if ecounts[o0[-1]] == 2: loops[lbl] = (u,v,w) else: if ecounts[st] != 1: o0 = sps.csgraph.depth_first_order(em, o0[-1], directed=False)[0] o = rs[o0] (u,v) = (np.floor(o/N).astype('int'), np.mod(o, N).astype('int')) w = flattest(wmtx[u,v]) lines[lbl] = (u,v,w) # okay, we add all of these to the addrs that we return; it's potentially # more useful to have each face's full crossing in its own BC coordinates # at times, and the duplicates can be eliminated with just a slice addrs = [] for (lbl,(us,vs,ws)) in six.iteritems(lines): (u0s,v0s,u1s,v1s) = (us[:-1],vs[:-1],us[1:],vs[1:]) qs = [np.setdiff1d([u1,v1], [u0,v0])[0] for (u0,v0,u1,v1) in zip(u0s,v0s,u1s,v1s)] fs = np.asarray([u0s, qs, v0s], dtype=np.int) fend = (u1s[-1], np.setdiff1d(fs[:,-1], (u1s[-1],v1s[-1])), v1s[-1]) fs = np.hstack([fs, np.reshape(fend, (3,1))]) # convert faces back to labels fs = np.asarray([obj.labels[f] for f in fs]) # make the weights ws = np.asarray([ws, 0*ws]) addrs.append({'faces': fs, 'coordinates': ws}) addrs = list(sorted(addrs, key=lambda a:a['faces'].shape[0])) # if obj is a topology or addresses were requested, return them now if yield_addresses or not is_mesh(obj): return addrs # otherwise, we now convert these into coordinates xs = [obj.unaddress(addr) for addr in addrs] if smooth is not None: xs = smooth_lines(xs, *smooth) return xs
python
def isolines(obj, prop, val, outliers=None, data_range=None, clipped=np.inf, weights=None, weight_min=0, weight_transform=Ellipsis, mask=None, valid_range=None, transform=None, smooth=False, yield_addresses=False): ''' isolines(mesh, prop, val) yields a 2 x D x N array of points that represent the lines of equality of the given property to the given value, according to linear interpolation of the property values over the mesh; D represents the dimensions of the mesh (2D or 3D) and N is the number of faces whose prop values surround val. isolines(cortex, prop, val) yields the lines as addresses instead of coordinates. isolines(subject, prop, val) yields a lazy map whose keys are the keys of subject.hemis and whose values are equivalent to isolines(subject.hemis[key], prop, val). The following optional arguments may be given: * yield_addresses (default: False) may be set to True to instruct isolines to return the addresses instead of the coordinates, even for meshes; if the first argument is not a mesh then this argument is ignored. * smooth (default: None) may optionally be True or a value n or a tuple (n,m) that are used as arguments to the smooth_lines() function. * Almost all options that can be passed to the to_property() function can be passed to this function and are in turn passed along to to_property(): * outliers * data_range * clipped * weights * weight_min * weight_transform * mask * valid_range * transform Weights, if specified, are not used in the isoline calculation; they are only used for thresholding. ''' import scipy.sparse as sps from neuropythy import (is_subject, is_list, is_tuple, is_topo, is_mesh, is_tess) from neuropythy.util import flattest if is_subject(obj): kw = dict(outliers=outliers, data_range=data_range, clipped=clipped, weights=weights, weight_min=weight_min, weight_transform=weight_transform, mask=mask, valid_range=valid_range, transform=transform, smooth=smooth, yield_addresses=yield_addresses) return pimms.lazy_map({h:curry(lambda h: isolines(mesh.hemis[h],prop,val,**kw),h) for h in six.iterkeys(mesh.hemis)}) elif not (is_topo(obj) or is_mesh(obj)): raise ValueError('argument must be a mesh, topology, or subject') if smooth is True: smooth = () elif smooth in [False,None]: smooth = None elif pimms.is_vector(smooth): smooth = tuple(smooth) else: raise ValueError('unrecognized smooth argument') # find the addresses over the faces: fs = obj.tess.indexed_faces if not is_tess(obj) else obj.indexed_faces N = obj.vertex_count p = obj.property(prop, outliers=outliers, data_range=data_range, clipped=clipped, weights=weights, weight_min=weight_min, weight_transform=weight_transform, mask=mask, valid_range=valid_range, transform=transform) ii = np.isfinite(p) fii = np.where(np.sum([ii[f] for f in fs], axis=0) == 3)[0] fs = fs[:,fii] fp = np.asarray([p[f] for f in fs]) lt = (fp <= val) slt = np.sum(lt, 0) (ii1,ii2) = [(slt == k) for k in (1,2)] wmtx = sps.lil_matrix((N, N), dtype='float') emtx = sps.dok_matrix((N*N, N*N), dtype='bool') for (ii,fl) in zip([ii1,ii2], [True,False]): tmp = np.array(lt.T) tmp[~ii,:] = False if fl: w = fs.T[tmp] tmp[ii] = ~tmp[ii] (u,v) = np.reshape(fs.T[tmp], (-1,2)).T else: (u,v) = np.reshape(fs.T[tmp], (-1,2)).T tmp[ii] = ~tmp[ii] w = fs.T[tmp] (pu,pv,pw) = [p[q] for q in (u,v,w)] # the line is from somewhere on (u,w) to somewhere on (v,w) (wu, wv) = [(val - pw) / (px - pw) for px in (pu,pv)] # put these in the weight matrix wmtx[u,w] = wu wmtx[v,w] = wv wmtx[w,u] = (1 - wu) wmtx[w,v] = (1 - wv) # and in the edge matrix e1 = np.sort([u,w],axis=0).T.dot([N,1]) e2 = np.sort([v,w],axis=0).T.dot([N,1]) emtx[e1, e2] = True emtx[e2, e1] = True # okay, now convert these into sequential lines... wmtx = wmtx.tocsr() (rs,cs,xs) = sps.find(emtx) # we need to compress emtx ((rs,ridx),(cs,cidx)) = [np.unique(x, return_inverse=True) for x in (rs,cs)] assert(len(ridx) == len(cidx) and len(cidx) == len(xs) and np.array_equal(rs,cs)) em = sps.csr_matrix((xs, (ridx,cidx)), dtype='bool') ecounts = flattest(em.sum(axis=1)) ccs = sps.csgraph.connected_components(em, directed=False)[1] lines = {} loops = {} for (lbl,st) in zip(*np.unique(ccs, return_index=True)): if lbl < 0: continue o0 = sps.csgraph.depth_first_order(em, st, directed=False)[0] o = rs[o0] (u,v) = (np.floor(o/N).astype('int'), np.mod(o, N).astype('int')) w = flattest(wmtx[u,v]) if ecounts[o0[-1]] == 2: loops[lbl] = (u,v,w) else: if ecounts[st] != 1: o0 = sps.csgraph.depth_first_order(em, o0[-1], directed=False)[0] o = rs[o0] (u,v) = (np.floor(o/N).astype('int'), np.mod(o, N).astype('int')) w = flattest(wmtx[u,v]) lines[lbl] = (u,v,w) # okay, we add all of these to the addrs that we return; it's potentially # more useful to have each face's full crossing in its own BC coordinates # at times, and the duplicates can be eliminated with just a slice addrs = [] for (lbl,(us,vs,ws)) in six.iteritems(lines): (u0s,v0s,u1s,v1s) = (us[:-1],vs[:-1],us[1:],vs[1:]) qs = [np.setdiff1d([u1,v1], [u0,v0])[0] for (u0,v0,u1,v1) in zip(u0s,v0s,u1s,v1s)] fs = np.asarray([u0s, qs, v0s], dtype=np.int) fend = (u1s[-1], np.setdiff1d(fs[:,-1], (u1s[-1],v1s[-1])), v1s[-1]) fs = np.hstack([fs, np.reshape(fend, (3,1))]) # convert faces back to labels fs = np.asarray([obj.labels[f] for f in fs]) # make the weights ws = np.asarray([ws, 0*ws]) addrs.append({'faces': fs, 'coordinates': ws}) addrs = list(sorted(addrs, key=lambda a:a['faces'].shape[0])) # if obj is a topology or addresses were requested, return them now if yield_addresses or not is_mesh(obj): return addrs # otherwise, we now convert these into coordinates xs = [obj.unaddress(addr) for addr in addrs] if smooth is not None: xs = smooth_lines(xs, *smooth) return xs
[ "def", "isolines", "(", "obj", ",", "prop", ",", "val", ",", "outliers", "=", "None", ",", "data_range", "=", "None", ",", "clipped", "=", "np", ".", "inf", ",", "weights", "=", "None", ",", "weight_min", "=", "0", ",", "weight_transform", "=", "Elli...
isolines(mesh, prop, val) yields a 2 x D x N array of points that represent the lines of equality of the given property to the given value, according to linear interpolation of the property values over the mesh; D represents the dimensions of the mesh (2D or 3D) and N is the number of faces whose prop values surround val. isolines(cortex, prop, val) yields the lines as addresses instead of coordinates. isolines(subject, prop, val) yields a lazy map whose keys are the keys of subject.hemis and whose values are equivalent to isolines(subject.hemis[key], prop, val). The following optional arguments may be given: * yield_addresses (default: False) may be set to True to instruct isolines to return the addresses instead of the coordinates, even for meshes; if the first argument is not a mesh then this argument is ignored. * smooth (default: None) may optionally be True or a value n or a tuple (n,m) that are used as arguments to the smooth_lines() function. * Almost all options that can be passed to the to_property() function can be passed to this function and are in turn passed along to to_property(): * outliers * data_range * clipped * weights * weight_min * weight_transform * mask * valid_range * transform Weights, if specified, are not used in the isoline calculation; they are only used for thresholding.
[ "isolines", "(", "mesh", "prop", "val", ")", "yields", "a", "2", "x", "D", "x", "N", "array", "of", "points", "that", "represent", "the", "lines", "of", "equality", "of", "the", "given", "property", "to", "the", "given", "value", "according", "to", "li...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/mesh.py#L3934-L4069
train
Returns a lazy map of isoline lines of the given property and value.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB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PT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b101100 + 0o4) + '\x6f' + chr(0b100 + 0o63) + chr(49), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b1010 + 0o51) + chr(53) + '\063', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(2452 - 2402) + chr(48) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062' + '\061', 49378 - 49370), nzTpIcepk0o8('\060' + chr(0b101011 + 0o104) + chr(0b101011 + 0o10) + '\067' + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b1000010 + 0o55) + chr(55) + chr(0b110100), 18691 - 18683), nzTpIcepk0o8('\x30' + '\157' + chr(2163 - 2113) + '\x30' + chr(53), 8), nzTpIcepk0o8('\060' + chr(0b110011 + 0o74) + '\063' + chr(48) + '\061', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + '\064' + '\x36', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b1010 + 0o47) + chr(386 - 337) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + chr(53) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b110110 + 0o71) + '\061' + chr(0b110101) + '\065', 53986 - 53978), nzTpIcepk0o8(chr(0b110000) + chr(3093 - 2982) + '\062' + chr(223 - 168) + '\066', 0b1000), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b1101111) + '\x31' + chr(0b110000) + '\061', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(52) + chr(940 - 885), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(2181 - 2131) + chr(0b110110) + chr(0b1 + 0o66), 53447 - 53439), nzTpIcepk0o8(chr(48) + '\x6f' + chr(49) + '\x32' + '\063', 0b1000), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(2683 - 2572) + chr(0b1010 + 0o47) + chr(0b110011) + chr(415 - 364), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b1111 + 0o43) + chr(2453 - 2401) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(96 - 48) + chr(0b1101111) + chr(0b110111) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + chr(0b100101 + 0o17) + chr(0b110010), 36654 - 36646), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(0b1101111) + '\063' + '\x31' + chr(54), 38708 - 38700), nzTpIcepk0o8(chr(140 - 92) + chr(0b1101011 + 0o4) + chr(50) + chr(0b100010 + 0o21) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b11010 + 0o31) + chr(53) + chr(0b110011), 8), nzTpIcepk0o8(chr(48) + chr(0b1100000 + 0o17) + chr(0b110011) + chr(0b110101) + chr(0b11000 + 0o36), 0o10), nzTpIcepk0o8(chr(558 - 510) + chr(0b1101111) + chr(0b110001) + chr(2999 - 2944) + '\x35', 0o10), nzTpIcepk0o8('\060' + chr(0b1011001 + 0o26) + chr(0b100100 + 0o17) + chr(1790 - 1737) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(1337 - 1289) + chr(0b1101111) + chr(222 - 173) + chr(0b110110) + chr(0b101110 + 0o2), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101 + 0o56) + '\060' + '\061', 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(438 - 389) + chr(0b110010) + chr(48), 37906 - 37898), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + '\x32' + '\x30', 0b1000), nzTpIcepk0o8('\x30' + chr(5949 - 5838) + '\x32' + '\x30', 0o10), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(3298 - 3187) + '\x36' + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + chr(0b110100) + chr(0b110000), 38072 - 38064), nzTpIcepk0o8(chr(754 - 706) + '\x6f' + chr(0b110110) + '\067', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + chr(49) + chr(55), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(187 - 136) + '\065' + chr(892 - 843), 0o10), nzTpIcepk0o8('\x30' + chr(4729 - 4618) + chr(282 - 232) + '\x33' + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(9007 - 8896) + '\x32' + chr(0b101010 + 0o6) + chr(2034 - 1982), 9705 - 9697), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b1011 + 0o50) + chr(52) + chr(0b110011), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(111) + chr(0b110101) + '\060', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x17'), chr(100) + '\x65' + chr(0b1100011) + chr(5527 - 5416) + '\144' + chr(0b1100101))(chr(117) + '\164' + chr(2212 - 2110) + '\055' + chr(880 - 824)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def l6Enx3F5RXhW(kIMfkyypPTcC, RvoBw1HupUDa, pXwvT17vr09s, l_XbxTJKTKk5=None, C3J6efgF3Sty=None, ImNCXMyvHdev=roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'_\xa6\xcbi\xa1\x05\xe1\x86\x87}\xe5T'), '\144' + '\x65' + chr(5714 - 5615) + chr(0b1101111) + '\144' + chr(0b1100101))('\x75' + chr(4706 - 4590) + '\x66' + chr(0b101101) + chr(56))), TtzqJLqe_ecy=None, Ln79tjAfkW3Z=nzTpIcepk0o8(chr(1336 - 1288) + chr(111) + chr(0b110000), 50884 - 50876), zE1VNchq4Yfu=RjQP07DYIdkf, BBM8dxm7YWge=None, L9cCeviOO53V=None, ioI6nQEObAZT=None, XfpFtdM0c1Sj=nzTpIcepk0o8(chr(0b110 + 0o52) + chr(3707 - 3596) + chr(0b11001 + 0o27), 8), VXckH9I1vFZF=nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(854 - 806), 8)): (KMn4iTJEAO1P,) = (roI3spqORKae(rFFUeiYWzOhx(roI3spqORKae(ES5oEprVxulp(b'J\x88\xeca\x80\x12\xf6\xb1\x87:\xde\x08'), chr(0b1100100) + '\x65' + chr(99) + chr(0b1101111) + chr(3350 - 3250) + chr(0b1100101))(chr(0b101010 + 0o113) + '\x74' + chr(3531 - 3429) + chr(842 - 797) + '\070'), roI3spqORKae(ES5oEprVxulp(b'J\x9b\xe4c\x8aY'), chr(100) + '\145' + chr(0b1001101 + 0o26) + chr(11382 - 11271) + chr(100) + '\145')(chr(0b1110101) + '\164' + chr(102) + chr(1293 - 1248) + chr(1185 - 1129))), roI3spqORKae(ES5oEprVxulp(b'J\x9b\xe4c\x8aY'), chr(0b1100100) + '\145' + chr(4344 - 4245) + '\157' + chr(0b100100 + 0o100) + '\145')(chr(0b1110101) + '\164' + chr(0b1100110) + chr(916 - 871) + chr(56))),) (M8HqS7_277Lv, ckw3KzAL3kba, kBeKB4Df6Zrm, bq5iOr1Z0M2l, a8iMfp52DT0e, LUgQoDF9i5l6) = (roI3spqORKae(rFFUeiYWzOhx(roI3spqORKae(ES5oEprVxulp(b'W\x8e\xf0c\x96L\xfc\xb5\x8e1'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(111) + '\144' + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + '\146' + '\x2d' + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'P\x98\xdab\x8c^\xef\xa4\x85<'), '\x64' + chr(101) + chr(6999 - 6900) + '\x6f' + chr(0b10100 + 0o120) + '\x65')(chr(0b1110101) + '\x74' + '\x66' + chr(502 - 457) + chr(0b111000))), roI3spqORKae(ES5oEprVxulp(b'P\x98\xdab\x8c^\xef\xa4\x85<'), chr(100) + '\145' + '\143' + chr(6013 - 5902) + '\144' + chr(0b1100101))(chr(0b1011001 + 0o34) + '\164' + '\146' + chr(45) + '\x38')), roI3spqORKae(rFFUeiYWzOhx(roI3spqORKae(ES5oEprVxulp(b'W\x8e\xf0c\x96L\xfc\xb5\x8e1'), chr(100) + chr(0b1001000 + 0o35) + chr(0b1100010 + 0o1) + chr(0b111 + 0o150) + chr(0b1100100) + chr(0b1100101))(chr(0b111 + 0o156) + chr(116) + chr(0b11110 + 0o110) + chr(0b100111 + 0o6) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'P\x98\xda}\x90O\xf1'), chr(7918 - 7818) + chr(101) + chr(1966 - 1867) + chr(8902 - 8791) + '\144' + chr(8405 - 8304))('\x75' + chr(9254 - 9138) + chr(0b111111 + 0o47) + chr(0b101101) + chr(56))), roI3spqORKae(ES5oEprVxulp(b'P\x98\xda}\x90O\xf1'), '\x64' + chr(0b1100010 + 0o3) + chr(0b1100011) + chr(5626 - 5515) + chr(0b1001001 + 0o33) + chr(0b1100101))('\165' + chr(12902 - 12786) + chr(0b111100 + 0o52) + '\x2d' + '\070')), roI3spqORKae(rFFUeiYWzOhx(roI3spqORKae(ES5oEprVxulp(b'W\x8e\xf0c\x96L\xfc\xb5\x8e1'), '\144' + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(100) + '\145')(chr(0b1110101) + chr(116) + '\x66' + '\x2d' + chr(1060 - 1004)), roI3spqORKae(ES5oEprVxulp(b'P\x98\xdae\x8cL\xe9\xa4'), chr(100) + chr(0b1100101) + '\x63' + '\x6f' + chr(0b11010 + 0o112) + '\x65')(chr(0b1110101) + '\164' + chr(5068 - 4966) + chr(649 - 604) + chr(1973 - 1917))), roI3spqORKae(ES5oEprVxulp(b'P\x98\xdae\x8cL\xe9\xa4'), '\x64' + chr(101) + chr(0b1100011) + '\x6f' + chr(6084 - 5984) + chr(0b11001 + 0o114))(chr(117) + '\164' + chr(0b1100110) + chr(0b101101) + chr(0b111000))), roI3spqORKae(rFFUeiYWzOhx(roI3spqORKae(ES5oEprVxulp(b'W\x8e\xf0c\x96L\xfc\xb5\x8e1'), chr(0b1 + 0o143) + '\145' + chr(0b1100011) + chr(2655 - 2544) + '\144' + chr(0b1011111 + 0o6))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + '\055' + '\x38'), roI3spqORKae(ES5oEprVxulp(b'P\x98\xdae\x96L\xea'), chr(0b100101 + 0o77) + '\145' + '\143' + chr(5351 - 5240) + '\144' + chr(4621 - 4520))(chr(0b1110101) + '\164' + '\146' + '\055' + chr(0b100100 + 0o24))), roI3spqORKae(ES5oEprVxulp(b'P\x98\xdae\x96L\xea'), chr(7612 - 7512) + chr(0b1100101) + '\x63' + chr(111) + chr(0b1100100) + chr(0b1100000 + 0o5))(chr(117) + '\x74' + chr(0b1100110) + chr(45) + chr(0b111000))), roI3spqORKae(rFFUeiYWzOhx(roI3spqORKae(ES5oEprVxulp(b'W\x8e\xf0c\x96L\xfc\xb5\x8e1'), chr(0b101111 + 0o65) + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(2321 - 2221) + chr(0b10000 + 0o125))('\x75' + chr(0b1110 + 0o146) + chr(0b11011 + 0o113) + chr(45) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'P\x98\xda|\x9cO\xed'), chr(7531 - 7431) + chr(0b1100101) + chr(0b110101 + 0o56) + '\x6f' + chr(100) + '\145')(chr(0b100110 + 0o117) + chr(0b1110100) + chr(8131 - 8029) + '\055' + chr(0b111000))), roI3spqORKae(ES5oEprVxulp(b'P\x98\xda|\x9cO\xed'), chr(0b1100100) + '\145' + chr(0b11110 + 0o105) + chr(0b100000 + 0o117) + '\x64' + '\x65')(chr(0b1000011 + 0o62) + chr(2589 - 2473) + chr(4535 - 4433) + chr(0b101101) + chr(1381 - 1325))), roI3spqORKae(rFFUeiYWzOhx(roI3spqORKae(ES5oEprVxulp(b'W\x8e\xf0c\x96L\xfc\xb5\x8e1'), '\x64' + chr(0b1000111 + 0o36) + chr(99) + chr(111) + chr(0b1010101 + 0o17) + '\x65')(chr(117) + chr(8507 - 8391) + chr(102) + '\055' + '\070'), roI3spqORKae(ES5oEprVxulp(b'P\x98\xdae\x9cO\xf6'), chr(0b11110 + 0o106) + chr(0b11100 + 0o111) + chr(99) + chr(111) + chr(0b1100100) + '\145')('\165' + chr(116) + '\x66' + chr(0b11000 + 0o25) + chr(1081 - 1025))), roI3spqORKae(ES5oEprVxulp(b'P\x98\xdae\x9cO\xf6'), '\144' + '\145' + chr(7783 - 7684) + chr(0b100100 + 0o113) + chr(0b1100100) + chr(101))('\x75' + chr(8372 - 8256) + chr(0b1111 + 0o127) + chr(45) + chr(0b111000)))) (JO8DAj4D3zxb,) = (roI3spqORKae(roI3spqORKae(rFFUeiYWzOhx(roI3spqORKae(ES5oEprVxulp(b'W\x8e\xf0c\x96L\xfc\xb5\x8e1\x83\x18\xca(K'), '\x64' + chr(3985 - 3884) + '\143' + '\x6f' + '\x64' + chr(101))(chr(1699 - 1582) + chr(0b1110100) + chr(652 - 550) + chr(1623 - 1578) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'_\x87\xe4e\x8dY\xf6\xb5'), chr(0b1100100) + '\x65' + '\143' + chr(4375 - 4264) + chr(7121 - 7021) + '\x65')(chr(0b11 + 0o162) + chr(116) + chr(102) + chr(1475 - 1430) + '\070')), roI3spqORKae(ES5oEprVxulp(b'L\x9f\xec}'), chr(6117 - 6017) + chr(0b1100101) + chr(0b1100011) + chr(293 - 182) + chr(0b1100100) + chr(0b1100000 + 0o5))(chr(117) + chr(0b1110100) + chr(7619 - 7517) + '\x2d' + '\070')), roI3spqORKae(ES5oEprVxulp(b'_\x87\xe4e\x8dY\xf6\xb5'), chr(100) + chr(0b101011 + 0o72) + '\143' + chr(111) + chr(0b1100100) + chr(7633 - 7532))(chr(9856 - 9739) + '\164' + chr(9505 - 9403) + '\055' + chr(0b100011 + 0o25))),) if M8HqS7_277Lv(kIMfkyypPTcC): n_DqV9fOWrXc = znjnJWK64FDT(outliers=l_XbxTJKTKk5, data_range=C3J6efgF3Sty, clipped=ImNCXMyvHdev, weights=TtzqJLqe_ecy, weight_min=Ln79tjAfkW3Z, weight_transform=zE1VNchq4Yfu, mask=BBM8dxm7YWge, valid_range=L9cCeviOO53V, transform=ioI6nQEObAZT, smooth=XfpFtdM0c1Sj, yield_addresses=VXckH9I1vFZF) return roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'U\x8a\xffh\xa6Q\xe4\xb1'), chr(0b11011 + 0o111) + chr(0b1100101) + '\x63' + chr(0b101111 + 0o100) + chr(0b1100100) + chr(0b1100101))('\x75' + chr(0b1110100) + chr(6283 - 6181) + chr(0b11110 + 0o17) + '\070'))({_9ve2uheHd6a: BoZcxPaOCjhS(lambda _9ve2uheHd6a: l6Enx3F5RXhW(roI3spqORKae(olfRNjSgvQh6, roI3spqORKae(ES5oEprVxulp(b'Q\x8e\xe8x\x8a'), chr(0b1100100) + chr(101) + chr(0b1010110 + 0o15) + '\157' + '\x64' + chr(3462 - 3361))('\165' + '\x74' + '\146' + '\x2d' + chr(2939 - 2883)))[_9ve2uheHd6a], RvoBw1HupUDa, pXwvT17vr09s, **n_DqV9fOWrXc), _9ve2uheHd6a) for _9ve2uheHd6a in roI3spqORKae(YVS_F7_wWn_o, roI3spqORKae(ES5oEprVxulp(b'P\x9f\xe0c\x92Y\xfc\xb2'), chr(5107 - 5007) + '\145' + chr(0b1100011) + chr(6156 - 6045) + '\144' + '\x65')(chr(117) + chr(0b1110100) + chr(2624 - 2522) + chr(45) + chr(0b101111 + 0o11)))(roI3spqORKae(olfRNjSgvQh6, roI3spqORKae(ES5oEprVxulp(b'Q\x8e\xe8x\x8a'), '\144' + '\145' + '\x63' + chr(0b1000 + 0o147) + '\144' + chr(821 - 720))('\x75' + '\x74' + chr(9583 - 9481) + chr(0b10100 + 0o31) + chr(0b100101 + 0o23))))}) elif not (bq5iOr1Z0M2l(kIMfkyypPTcC) or a8iMfp52DT0e(kIMfkyypPTcC)): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'X\x99\xe2d\x94Y\xeb\xb5\xc6%\xd8\x1e\xcaaE\xd2s:\x82V\x87\xbd\xf1\xc7\xce\t\x82\x00\xae<\xbfwKL\x17\xe0\x9b\xbc\xf7\x96[\x81\xe0r\x8d'), chr(0b1100100) + '\145' + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(101))('\x75' + chr(116) + chr(0b110010 + 0o64) + chr(0b10010 + 0o33) + chr(56))) if XfpFtdM0c1Sj is nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061', 0o10): XfpFtdM0c1Sj = () elif XfpFtdM0c1Sj in [nzTpIcepk0o8('\060' + chr(7267 - 7156) + chr(1319 - 1271), 8), None]: XfpFtdM0c1Sj = None elif roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'P\x98\xdag\x9c_\xf1\xae\x94'), chr(100) + '\145' + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(6197 - 6096))(chr(117) + '\x74' + '\x66' + chr(0b11100 + 0o21) + chr(0b111000)))(XfpFtdM0c1Sj): XfpFtdM0c1Sj = nfNqtJL5aRaY(XfpFtdM0c1Sj) else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'L\x85\xf7t\x9aS\xe2\xaf\x8f2\xc8\t\x9e2J\xd8</\xca\x1b\x83\xbc\xfe\x9e\x83\x18\x83\x04'), '\x64' + chr(0b111101 + 0o50) + '\143' + chr(0b1101111) + chr(0b11001 + 0o113) + chr(101))('\165' + '\164' + chr(102) + chr(45) + chr(1759 - 1703))) ANVmZzFk_RHC = kIMfkyypPTcC.tess.indexed_faces if not LUgQoDF9i5l6(kIMfkyypPTcC) else kIMfkyypPTcC.indexed_faces UtB2m8Xmgf5k = kIMfkyypPTcC.vertex_count fSdw5wwLo9MO = kIMfkyypPTcC.property(RvoBw1HupUDa, outliers=l_XbxTJKTKk5, data_range=C3J6efgF3Sty, clipped=ImNCXMyvHdev, weights=TtzqJLqe_ecy, weight_min=Ln79tjAfkW3Z, weight_transform=zE1VNchq4Yfu, mask=BBM8dxm7YWge, valid_range=L9cCeviOO53V, transform=ioI6nQEObAZT) p8Ou2emaDF7Z = nDF4gVNx0u9Q.AWxpWpGwxU15(fSdw5wwLo9MO) KFPsmZRv6kXS = nDF4gVNx0u9Q.xWH4M7K6Qbd3(nDF4gVNx0u9Q.oclC8DLjA_lV([p8Ou2emaDF7Z[_R8IKF5IwAfX] for _R8IKF5IwAfX in ANVmZzFk_RHC], axis=nzTpIcepk0o8('\x30' + chr(0b1101111) + '\060', 8)) == nzTpIcepk0o8('\060' + '\157' + chr(0b100101 + 0o16), 0b1000))[nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x30', 8)] ANVmZzFk_RHC = ANVmZzFk_RHC[:, KFPsmZRv6kXS] KhXPEIWBXQzE = nDF4gVNx0u9Q.asarray([fSdw5wwLo9MO[_R8IKF5IwAfX] for _R8IKF5IwAfX in ANVmZzFk_RHC]) mZHp8cBIvmxu = KhXPEIWBXQzE <= pXwvT17vr09s bVJ6mlAhHO5X = nDF4gVNx0u9Q.oclC8DLjA_lV(mZHp8cBIvmxu, nzTpIcepk0o8(chr(757 - 709) + chr(0b1101111) + '\060', 8)) (VlTDfkJpdhGZ, ACEF27NhPUmw) = [bVJ6mlAhHO5X == B6UAF1zReOyJ for B6UAF1zReOyJ in (nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31', 8), nzTpIcepk0o8(chr(0b110000 + 0o0) + '\157' + '\x32', 0b1000))] BTNlp_5Urfqm = KMn4iTJEAO1P.lil_matrix((UtB2m8Xmgf5k, UtB2m8Xmgf5k), dtype=roI3spqORKae(ES5oEprVxulp(b'_\x87\xeap\x8d'), '\x64' + chr(9749 - 9648) + '\x63' + '\157' + chr(0b11010 + 0o112) + '\145')(chr(0b100001 + 0o124) + chr(9896 - 9780) + '\146' + chr(0b101101) + chr(56))) virSkwGvJ0I2 = KMn4iTJEAO1P.dok_matrix((UtB2m8Xmgf5k * UtB2m8Xmgf5k, UtB2m8Xmgf5k * UtB2m8Xmgf5k), dtype=roI3spqORKae(ES5oEprVxulp(b'[\x84\xea}'), '\144' + chr(7536 - 7435) + chr(0b11111 + 0o104) + chr(0b1011010 + 0o25) + chr(0b110010 + 0o62) + '\x65')(chr(0b1010 + 0o153) + chr(0b1110010 + 0o2) + chr(0b10101 + 0o121) + chr(45) + '\070')) for (p8Ou2emaDF7Z, XwFcScMajEjS) in TxMFWa_Xzviv([VlTDfkJpdhGZ, ACEF27NhPUmw], [nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001), 8), nzTpIcepk0o8('\060' + chr(0b101100 + 0o103) + chr(0b10001 + 0o37), 8)]): PT32xG247TS3 = nDF4gVNx0u9Q.Tn6rGr7XTM7t(mZHp8cBIvmxu.hq6XE4_Nhd6R) PT32xG247TS3[~p8Ou2emaDF7Z, :] = nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1010010 + 0o35) + '\060', 8) if XwFcScMajEjS: sm7_CLmeWGR7 = ANVmZzFk_RHC.hq6XE4_Nhd6R[PT32xG247TS3] PT32xG247TS3[p8Ou2emaDF7Z] = ~PT32xG247TS3[p8Ou2emaDF7Z] (GRbsaHW8BT5I, r7AA1pbLjb44) = nDF4gVNx0u9Q.reshape(ANVmZzFk_RHC.T[PT32xG247TS3], (-nzTpIcepk0o8(chr(1904 - 1856) + chr(0b1001001 + 0o46) + chr(2079 - 2030), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010), 8))).hq6XE4_Nhd6R else: (GRbsaHW8BT5I, r7AA1pbLjb44) = nDF4gVNx0u9Q.reshape(ANVmZzFk_RHC.T[PT32xG247TS3], (-nzTpIcepk0o8('\060' + '\x6f' + '\061', 8), nzTpIcepk0o8(chr(48) + chr(111) + '\062', 8))).hq6XE4_Nhd6R PT32xG247TS3[p8Ou2emaDF7Z] = ~PT32xG247TS3[p8Ou2emaDF7Z] sm7_CLmeWGR7 = ANVmZzFk_RHC.hq6XE4_Nhd6R[PT32xG247TS3] (MFTzPD02hK2A, pIDkdNfxpzj9, saCGFe0zE73j) = [fSdw5wwLo9MO[P1yWu4gF7vxH] for P1yWu4gF7vxH in (GRbsaHW8BT5I, r7AA1pbLjb44, sm7_CLmeWGR7)] (sq5NYthFBU8K, M9Xb0AVuKvsr) = [(pXwvT17vr09s - saCGFe0zE73j) / (gXBf7Xnkfcbz - saCGFe0zE73j) for gXBf7Xnkfcbz in (MFTzPD02hK2A, pIDkdNfxpzj9)] BTNlp_5Urfqm[GRbsaHW8BT5I, sm7_CLmeWGR7] = sq5NYthFBU8K BTNlp_5Urfqm[r7AA1pbLjb44, sm7_CLmeWGR7] = M9Xb0AVuKvsr BTNlp_5Urfqm[sm7_CLmeWGR7, GRbsaHW8BT5I] = nzTpIcepk0o8('\x30' + chr(0b11000 + 0o127) + chr(353 - 304), 8) - sq5NYthFBU8K BTNlp_5Urfqm[sm7_CLmeWGR7, r7AA1pbLjb44] = nzTpIcepk0o8('\060' + chr(0b1101111 + 0o0) + chr(0b110001), 8) - M9Xb0AVuKvsr CKQNB3xZKUK0 = nDF4gVNx0u9Q.sort([GRbsaHW8BT5I, sm7_CLmeWGR7], axis=nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(111) + chr(1232 - 1184), 8)).T.dot([UtB2m8Xmgf5k, nzTpIcepk0o8('\060' + '\x6f' + chr(49), 8)]) Djh1dtsZpI59 = nDF4gVNx0u9Q.sort([r7AA1pbLjb44, sm7_CLmeWGR7], axis=nzTpIcepk0o8(chr(0b110000) + chr(111) + '\060', 8)).T.dot([UtB2m8Xmgf5k, nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061', 8)]) virSkwGvJ0I2[CKQNB3xZKUK0, Djh1dtsZpI59] = nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49), 8) virSkwGvJ0I2[Djh1dtsZpI59, CKQNB3xZKUK0] = nzTpIcepk0o8(chr(48) + '\x6f' + chr(1221 - 1172), 8) BTNlp_5Urfqm = BTNlp_5Urfqm.tocsr() (HI6BdQqJMt95, sxESRJP_bi4G, hyJ0JzFCbHEy) = KMn4iTJEAO1P.mlLPzxww6J51(virSkwGvJ0I2) ((HI6BdQqJMt95, YSWBwQ7FW8ZU), (sxESRJP_bi4G, RVjHgTb425LG)) = [nDF4gVNx0u9Q.G3de2eWQaS0D(bI5jsQ9OkQtj, return_inverse=nzTpIcepk0o8(chr(1424 - 1376) + chr(111) + '\x31', 8)) for bI5jsQ9OkQtj in (HI6BdQqJMt95, sxESRJP_bi4G)] assert ftfygxgFas5X(YSWBwQ7FW8ZU) == ftfygxgFas5X(RVjHgTb425LG) and ftfygxgFas5X(RVjHgTb425LG) == ftfygxgFas5X(hyJ0JzFCbHEy) and roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'X\x99\xf7p\x80c\xe0\xb0\x93)\xc1'), '\x64' + chr(8802 - 8701) + chr(0b1100011) + chr(1476 - 1365) + chr(100) + '\x65')(chr(0b1110101) + chr(0b11011 + 0o131) + chr(0b101010 + 0o74) + chr(884 - 839) + chr(2597 - 2541)))(HI6BdQqJMt95, sxESRJP_bi4G) CtnIXGBWGE5R = KMn4iTJEAO1P.csr_matrix((hyJ0JzFCbHEy, (YSWBwQ7FW8ZU, RVjHgTb425LG)), dtype=roI3spqORKae(ES5oEprVxulp(b'[\x84\xea}'), chr(0b1100100) + chr(101) + '\x63' + chr(4511 - 4400) + chr(0b1100100) + '\x65')('\x75' + chr(0b1110100) + chr(0b100001 + 0o105) + chr(0b101101) + '\x38')) FcyJA_cIzsJe = JO8DAj4D3zxb(CtnIXGBWGE5R.oclC8DLjA_lV(axis=nzTpIcepk0o8(chr(48) + chr(0b101 + 0o152) + chr(0b110001), 8))) hDUYO8B96uLy = KMn4iTJEAO1P.csgraph.connected_components(CtnIXGBWGE5R, directed=nzTpIcepk0o8(chr(0b110000) + '\157' + '\x30', 8))[nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31', 8)] vniSnlI09HNg = {} PIWaWzlLrbtn = {} for (aYHSBMjZouVV, VDjrOduK2lPk) in TxMFWa_Xzviv(*roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'~\xd8\xe1t\xcbY\xd2\x90\x87\x1b\x9d)'), '\144' + '\145' + chr(0b1001001 + 0o32) + chr(0b1101111) + '\144' + chr(0b1100101))(chr(117) + '\x74' + chr(102) + chr(0b10101 + 0o30) + '\070'))(hDUYO8B96uLy, return_index=nzTpIcepk0o8(chr(0b11111 + 0o21) + '\157' + '\x31', 8))): if aYHSBMjZouVV < nzTpIcepk0o8('\060' + chr(10080 - 9969) + chr(48), 8): continue ynwvHfUg2jMo = KMn4iTJEAO1P.csgraph.depth_first_order(CtnIXGBWGE5R, VDjrOduK2lPk, directed=nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100100 + 0o14), 8))[nzTpIcepk0o8('\060' + '\157' + chr(48), 8)] WgZUEOuIyTUO = HI6BdQqJMt95[ynwvHfUg2jMo] (GRbsaHW8BT5I, r7AA1pbLjb44) = (nDF4gVNx0u9Q.floor(WgZUEOuIyTUO / UtB2m8Xmgf5k).astype(roI3spqORKae(ES5oEprVxulp(b'P\x85\xf1'), chr(100) + chr(0b11110 + 0o107) + chr(99) + chr(0b1101111) + chr(0b1100100) + '\145')(chr(0b1011100 + 0o31) + chr(116) + chr(1590 - 1488) + chr(0b11001 + 0o24) + '\x38')), nDF4gVNx0u9Q.mod(WgZUEOuIyTUO, UtB2m8Xmgf5k).astype(roI3spqORKae(ES5oEprVxulp(b'P\x85\xf1'), '\x64' + '\x65' + chr(0b10001 + 0o122) + chr(111) + '\144' + chr(0b1100101))('\165' + '\x74' + chr(102) + chr(45) + chr(1748 - 1692)))) sm7_CLmeWGR7 = JO8DAj4D3zxb(BTNlp_5Urfqm[GRbsaHW8BT5I, r7AA1pbLjb44]) if FcyJA_cIzsJe[ynwvHfUg2jMo[-nzTpIcepk0o8(chr(0b110000) + chr(0b111 + 0o150) + '\061', 8)]] == nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(0b1001001 + 0o46) + chr(0b110000 + 0o2), 8): PIWaWzlLrbtn[aYHSBMjZouVV] = (GRbsaHW8BT5I, r7AA1pbLjb44, sm7_CLmeWGR7) else: if FcyJA_cIzsJe[VDjrOduK2lPk] != nzTpIcepk0o8(chr(0b10 + 0o56) + '\x6f' + '\061', 8): ynwvHfUg2jMo = KMn4iTJEAO1P.csgraph.depth_first_order(CtnIXGBWGE5R, ynwvHfUg2jMo[-nzTpIcepk0o8('\x30' + chr(12098 - 11987) + chr(0b101101 + 0o4), 8)], directed=nzTpIcepk0o8('\x30' + chr(0b1111 + 0o140) + '\x30', 8))[nzTpIcepk0o8('\060' + chr(111) + '\x30', 8)] WgZUEOuIyTUO = HI6BdQqJMt95[ynwvHfUg2jMo] (GRbsaHW8BT5I, r7AA1pbLjb44) = (nDF4gVNx0u9Q.floor(WgZUEOuIyTUO / UtB2m8Xmgf5k).astype(roI3spqORKae(ES5oEprVxulp(b'P\x85\xf1'), '\x64' + chr(4827 - 4726) + chr(2827 - 2728) + chr(0b1101111) + chr(0b1100100) + chr(101))('\165' + chr(0b1110100) + chr(0b1010 + 0o134) + '\055' + '\x38')), nDF4gVNx0u9Q.mod(WgZUEOuIyTUO, UtB2m8Xmgf5k).astype(roI3spqORKae(ES5oEprVxulp(b'P\x85\xf1'), chr(0b100010 + 0o102) + chr(0b1011 + 0o132) + chr(99) + chr(0b1101111) + chr(100) + '\145')('\x75' + chr(116) + chr(102) + chr(0b101100 + 0o1) + chr(2326 - 2270)))) sm7_CLmeWGR7 = JO8DAj4D3zxb(BTNlp_5Urfqm[GRbsaHW8BT5I, r7AA1pbLjb44]) vniSnlI09HNg[aYHSBMjZouVV] = (GRbsaHW8BT5I, r7AA1pbLjb44, sm7_CLmeWGR7) QjAGNOA0Tdrm = [] for (aYHSBMjZouVV, (U5KlL_cqnQuW, Gg0FL3LvJXEM, i_EO7JFAVLSs)) in roI3spqORKae(YVS_F7_wWn_o, roI3spqORKae(ES5oEprVxulp(b'M\x88\xd6z\x93_\xf7\x8d\x8d;\xc6\\'), '\x64' + '\x65' + chr(0b1100011) + chr(0b1101111) + '\144' + chr(0b1000111 + 0o36))(chr(0b1010001 + 0o44) + chr(116) + '\x66' + chr(0b11001 + 0o24) + chr(0b100101 + 0o23)))(vniSnlI09HNg): (EouTGJZd3cKR, l7tdbCryeWhB, wmbpjqRiJ0lo, NCY2Cul_McSI) = (U5KlL_cqnQuW[:-nzTpIcepk0o8('\060' + chr(0b101 + 0o152) + '\061', 8)], Gg0FL3LvJXEM[:-nzTpIcepk0o8(chr(0b110000) + chr(0b11111 + 0o120) + '\061', 8)], U5KlL_cqnQuW[nzTpIcepk0o8('\060' + '\x6f' + '\061', 8):], Gg0FL3LvJXEM[nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(111) + '\x31', 8):]) Jo5XkLZv08h9 = [nDF4gVNx0u9Q.setdiff1d([EvNMqQBPZBtq, pDhUq4x6UMmH], [ZeliKAG3nkek, a_25nCkImxKI])[nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b101101 + 0o3), 8)] for (ZeliKAG3nkek, a_25nCkImxKI, EvNMqQBPZBtq, pDhUq4x6UMmH) in TxMFWa_Xzviv(EouTGJZd3cKR, l7tdbCryeWhB, wmbpjqRiJ0lo, NCY2Cul_McSI)] ANVmZzFk_RHC = nDF4gVNx0u9Q.asarray([EouTGJZd3cKR, Jo5XkLZv08h9, l7tdbCryeWhB], dtype=nDF4gVNx0u9Q.nzTpIcepk0o8) GqDPUKFixsDc = (wmbpjqRiJ0lo[-nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(111) + chr(1667 - 1618), 8)], nDF4gVNx0u9Q.setdiff1d(ANVmZzFk_RHC[:, -nzTpIcepk0o8('\x30' + chr(2785 - 2674) + chr(49), 8)], (wmbpjqRiJ0lo[-nzTpIcepk0o8(chr(719 - 671) + '\157' + '\x31', 8)], NCY2Cul_McSI[-nzTpIcepk0o8(chr(0b110000) + chr(0b1000101 + 0o52) + chr(0b110001), 8)])), NCY2Cul_McSI[-nzTpIcepk0o8(chr(48) + chr(12045 - 11934) + chr(2240 - 2191), 8)]) ANVmZzFk_RHC = nDF4gVNx0u9Q.hstack([ANVmZzFk_RHC, nDF4gVNx0u9Q.reshape(GqDPUKFixsDc, (nzTpIcepk0o8('\x30' + '\x6f' + chr(387 - 336), 8), nzTpIcepk0o8(chr(0b111 + 0o51) + '\157' + chr(49), 8)))]) ANVmZzFk_RHC = nDF4gVNx0u9Q.asarray([kIMfkyypPTcC.Ar0km3TBAurm[_R8IKF5IwAfX] for _R8IKF5IwAfX in ANVmZzFk_RHC]) i_EO7JFAVLSs = nDF4gVNx0u9Q.asarray([i_EO7JFAVLSs, nzTpIcepk0o8(chr(646 - 598) + '\157' + chr(1433 - 1385), 8) * i_EO7JFAVLSs]) roI3spqORKae(QjAGNOA0Tdrm, roI3spqORKae(ES5oEprVxulp(b"q\xbf\xd6%\x81[\xc2\xae\x8c'\xf8X"), '\x64' + '\x65' + chr(0b1001101 + 0o26) + chr(1423 - 1312) + chr(0b1100100) + chr(0b1001011 + 0o32))('\x75' + chr(4911 - 4795) + chr(0b11110 + 0o110) + chr(0b101101) + '\070'))({roI3spqORKae(ES5oEprVxulp(b'_\x8a\xe6t\x8a'), '\x64' + chr(0b1100101) + chr(99) + '\x6f' + chr(2836 - 2736) + chr(0b1100101))(chr(0b1110101) + '\164' + chr(0b1100110) + '\x2d' + chr(1224 - 1168)): ANVmZzFk_RHC, roI3spqORKae(ES5oEprVxulp(b'Z\x84\xeac\x9dU\xeb\xa0\x92-\xde'), '\x64' + '\145' + chr(99) + '\x6f' + '\144' + chr(0b1001 + 0o134))('\165' + chr(0b10110 + 0o136) + chr(102) + chr(1143 - 1098) + chr(0b1101 + 0o53)): i_EO7JFAVLSs}) QjAGNOA0Tdrm = H4NoA26ON7iG(V3OlOVg98A85(QjAGNOA0Tdrm, key=lambda AQ9ceR9AaoT1: AQ9ceR9AaoT1[roI3spqORKae(ES5oEprVxulp(b'_\x8a\xe6t\x8a'), '\144' + chr(0b10101 + 0o120) + chr(7608 - 7509) + chr(0b1101111) + chr(0b100111 + 0o75) + '\x65')(chr(0b1110101) + chr(116) + '\x66' + '\055' + chr(0b111000))].lhbM092AFW8f[nzTpIcepk0o8(chr(48) + chr(0b1001000 + 0o47) + chr(0b1011 + 0o45), 8)])) if VXckH9I1vFZF or not a8iMfp52DT0e(kIMfkyypPTcC): return QjAGNOA0Tdrm hyJ0JzFCbHEy = [kIMfkyypPTcC.unaddress(_m0lLs6iTLa5) for _m0lLs6iTLa5 in QjAGNOA0Tdrm] if XfpFtdM0c1Sj is not None: hyJ0JzFCbHEy = Ned2EfaJwYLJ(hyJ0JzFCbHEy, *XfpFtdM0c1Sj) return hyJ0JzFCbHEy
noahbenson/neuropythy
neuropythy/geometry/mesh.py
smooth_lines
def smooth_lines(lns, n=1, inertia=0.5): ''' smooth_lines(matrix) runs one smoothing iteration on the lines implied by the {2,3}xN matrix. smooth_lines(collection) iteratively descends lists, sets, and the values of maps, converting all valid matrices that it finds; note that if it encounters anything that cannot be interpreted as a line matrix (such as a string), an error is raised. Smoothing is performed by adding to the coordinates of each vertex with two neighbors half of the coordinates of each of its neighbors then dividing that sum by 2; i.e.: x_new[i] == x_old[i]/2 + x_old[i-1]/4 + x_old[i+1]/4. The following options may be given: * n (default: 1) indicates the number of times to perform the above smoothing operation. * inertia (default: 0.5) specifies the fraction of the new value that is derived from the old value of a node as opposed to the old values of its neighbors. If intertia is m, then x_new[i] == m*x_old[i] + (1-m)/2*(x_old[i-1] + x_old[i+1]). A higher intertia will smooth the line less each iteration. ''' if pimms.is_lazy_map(lns): return pimms.lazy_map({k:curry(lambda k: smooth_lines(lns[k], n=n, inertia=inertia), k) for k in six.iterkeys(lns)}) elif pimms.is_map(lns): m = {k:smooth_lines(v,n=n,inertia=inertia) for (k,v) in six.iteritems(lns)} return pyr.pmap(m) if pimms.is_pmap(lns) else m elif pimms.is_matrix(lns, 'number'): (p,q) = (inertia, 1 - inertia) l = lns if lns.shape[0] in (2,3) else lns.T if np.allclose(l[:,0], l[:,-1]): for ii in range(n): lns = p*l + q/2*(np.roll(l, -1, 1) + np.roll(l, 1, 1)) else: l = np.array(l) for ii in range(n): l[1:-1] = p*l[1:-1] + q/2*(l[:-2] + l[2:]) if lns.shape != l.shape: l = l.T l.setflags(write=lns.flags['WRITEABLE']) return l elif not pimms.is_scalar(lns): u = [smooth_lines(u, n=n, inertia=inertia) for u in lns] return (tuple(u) if is_tuple(lns) else pyr.pvector(u) if isinstance(lns, pyr.PVector) else np.asarray(u) if pimms.is_nparray(lns) else type(lns)(u)) else: raise ValueError('smooth_lines could not interpret object: %s' % lns)
python
def smooth_lines(lns, n=1, inertia=0.5): ''' smooth_lines(matrix) runs one smoothing iteration on the lines implied by the {2,3}xN matrix. smooth_lines(collection) iteratively descends lists, sets, and the values of maps, converting all valid matrices that it finds; note that if it encounters anything that cannot be interpreted as a line matrix (such as a string), an error is raised. Smoothing is performed by adding to the coordinates of each vertex with two neighbors half of the coordinates of each of its neighbors then dividing that sum by 2; i.e.: x_new[i] == x_old[i]/2 + x_old[i-1]/4 + x_old[i+1]/4. The following options may be given: * n (default: 1) indicates the number of times to perform the above smoothing operation. * inertia (default: 0.5) specifies the fraction of the new value that is derived from the old value of a node as opposed to the old values of its neighbors. If intertia is m, then x_new[i] == m*x_old[i] + (1-m)/2*(x_old[i-1] + x_old[i+1]). A higher intertia will smooth the line less each iteration. ''' if pimms.is_lazy_map(lns): return pimms.lazy_map({k:curry(lambda k: smooth_lines(lns[k], n=n, inertia=inertia), k) for k in six.iterkeys(lns)}) elif pimms.is_map(lns): m = {k:smooth_lines(v,n=n,inertia=inertia) for (k,v) in six.iteritems(lns)} return pyr.pmap(m) if pimms.is_pmap(lns) else m elif pimms.is_matrix(lns, 'number'): (p,q) = (inertia, 1 - inertia) l = lns if lns.shape[0] in (2,3) else lns.T if np.allclose(l[:,0], l[:,-1]): for ii in range(n): lns = p*l + q/2*(np.roll(l, -1, 1) + np.roll(l, 1, 1)) else: l = np.array(l) for ii in range(n): l[1:-1] = p*l[1:-1] + q/2*(l[:-2] + l[2:]) if lns.shape != l.shape: l = l.T l.setflags(write=lns.flags['WRITEABLE']) return l elif not pimms.is_scalar(lns): u = [smooth_lines(u, n=n, inertia=inertia) for u in lns] return (tuple(u) if is_tuple(lns) else pyr.pvector(u) if isinstance(lns, pyr.PVector) else np.asarray(u) if pimms.is_nparray(lns) else type(lns)(u)) else: raise ValueError('smooth_lines could not interpret object: %s' % lns)
[ "def", "smooth_lines", "(", "lns", ",", "n", "=", "1", ",", "inertia", "=", "0.5", ")", ":", "if", "pimms", ".", "is_lazy_map", "(", "lns", ")", ":", "return", "pimms", ".", "lazy_map", "(", "{", "k", ":", "curry", "(", "lambda", "k", ":", "smoot...
smooth_lines(matrix) runs one smoothing iteration on the lines implied by the {2,3}xN matrix. smooth_lines(collection) iteratively descends lists, sets, and the values of maps, converting all valid matrices that it finds; note that if it encounters anything that cannot be interpreted as a line matrix (such as a string), an error is raised. Smoothing is performed by adding to the coordinates of each vertex with two neighbors half of the coordinates of each of its neighbors then dividing that sum by 2; i.e.: x_new[i] == x_old[i]/2 + x_old[i-1]/4 + x_old[i+1]/4. The following options may be given: * n (default: 1) indicates the number of times to perform the above smoothing operation. * inertia (default: 0.5) specifies the fraction of the new value that is derived from the old value of a node as opposed to the old values of its neighbors. If intertia is m, then x_new[i] == m*x_old[i] + (1-m)/2*(x_old[i-1] + x_old[i+1]). A higher intertia will smooth the line less each iteration.
[ "smooth_lines", "(", "matrix", ")", "runs", "one", "smoothing", "iteration", "on", "the", "lines", "implied", "by", "the", "{", "2", "3", "}", "xN", "matrix", ".", "smooth_lines", "(", "collection", ")", "iteratively", "descends", "lists", "sets", "and", "...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/mesh.py#L4070-L4113
train
smooth_lines takes a list of lines and returns a new version of the line matrix.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPik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LnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + chr(0b1001 + 0o55) + chr(553 - 505), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + chr(0b110100) + chr(52), 48889 - 48881), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b1101111) + '\x31' + chr(0b110001) + '\061', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(1812 - 1760) + chr(0b1100 + 0o51), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101110 + 0o1) + chr(0b110011) + chr(0b110110) + chr(1725 - 1677), 8), nzTpIcepk0o8('\x30' + chr(0b1101000 + 0o7) + '\063' + '\060' + chr(0b10 + 0o60), ord("\x08")), nzTpIcepk0o8(chr(2207 - 2159) + '\x6f' + '\062' + chr(109 - 59) + '\x33', 18887 - 18879), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(870 - 816) + '\066', 0o10), nzTpIcepk0o8(chr(1330 - 1282) + '\x6f' + chr(1282 - 1232) + chr(0b110010) + chr(1905 - 1857), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b100110 + 0o13) + chr(0b110101) + '\065', 0o10), nzTpIcepk0o8(chr(399 - 351) + chr(0b101011 + 0o104) + chr(50) + '\x31' + chr(0b101 + 0o61), 0o10), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(111) + chr(0b110101) + chr(0b110100), 24683 - 24675), nzTpIcepk0o8(chr(0b110000) + chr(3500 - 3389) + '\x36' + chr(1760 - 1710), 28977 - 28969), nzTpIcepk0o8('\x30' + '\157' + chr(1189 - 1140) + chr(0b110101), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110110) + chr(53), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\062' + chr(50) + chr(0b11 + 0o55), 8), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1010101 + 0o32) + '\062' + chr(0b0 + 0o62) + '\061', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\x36' + chr(0b1 + 0o64), 8), nzTpIcepk0o8(chr(1707 - 1659) + chr(111) + chr(51) + '\x32' + chr(1509 - 1458), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(2111 - 2062) + chr(1584 - 1535) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(2434 - 2323) + chr(49) + '\x33' + '\x34', 19324 - 19316), nzTpIcepk0o8(chr(48 - 0) + chr(0b1101111) + chr(49) + chr(54) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110100) + '\x33', 63580 - 63572), nzTpIcepk0o8(chr(0b110000) + chr(0b110010 + 0o75) + '\061' + chr(0b100011 + 0o16) + chr(1966 - 1912), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(345 - 295) + chr(0b110010) + chr(0b110011), 8), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + chr(2385 - 2330) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(1286 - 1238) + '\157' + chr(0b101110 + 0o4) + chr(0b10100 + 0o41) + '\x34', 0o10), nzTpIcepk0o8(chr(48) + chr(1372 - 1261) + '\066', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(4238 - 4127) + '\x31' + chr(53) + '\064', 38831 - 38823), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + chr(0b110110) + '\067', 0o10), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(111) + chr(1918 - 1869) + chr(0b1010 + 0o47) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + chr(778 - 726) + chr(1356 - 1301), 9311 - 9303), nzTpIcepk0o8('\x30' + '\157' + chr(51) + '\x36' + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(9846 - 9735) + '\x31' + chr(54) + chr(1862 - 1813), 0o10), nzTpIcepk0o8(chr(0b100000 + 0o20) + '\157' + chr(50) + chr(0b11011 + 0o32) + '\x32', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x35' + chr(50), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010) + chr(0b11110 + 0o25) + chr(0b101111 + 0o10), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + chr(49) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b11000 + 0o127) + chr(0b110001) + chr(0b10101 + 0o34) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(214 - 103) + '\063' + '\067' + chr(52), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(3743 - 3632) + chr(2373 - 2320) + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xde'), '\144' + chr(101) + chr(0b1011001 + 0o12) + chr(111) + '\x64' + chr(454 - 353))(chr(117) + '\x74' + chr(0b1101 + 0o131) + chr(0b100100 + 0o11) + chr(398 - 342)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Ned2EfaJwYLJ(n3sh9UGr5i2w, NoZxuO7wjArS=nzTpIcepk0o8('\x30' + chr(0b11100 + 0o123) + '\x31', 0o10), WjFLGglCY4qK=0.5): if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x99\x17\x16I\x91\xb8\xeai\xfd\x0c\xfe'), '\144' + chr(6105 - 6004) + chr(8474 - 8375) + chr(111) + chr(0b10 + 0o142) + chr(101))(chr(9938 - 9821) + chr(0b1010000 + 0o44) + chr(10385 - 10283) + chr(0b101101) + chr(0b111000)))(n3sh9UGr5i2w): return roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x9c\x053\\\xaf\xaf\xf2F'), chr(100) + chr(2281 - 2180) + chr(0b1100011) + chr(3025 - 2914) + '\144' + chr(0b11011 + 0o112))('\165' + chr(2802 - 2686) + chr(0b1100110) + chr(0b1001 + 0o44) + '\070'))({B6UAF1zReOyJ: BoZcxPaOCjhS(lambda B6UAF1zReOyJ: Ned2EfaJwYLJ(n3sh9UGr5i2w[B6UAF1zReOyJ], n=NoZxuO7wjArS, inertia=WjFLGglCY4qK), B6UAF1zReOyJ) for B6UAF1zReOyJ in roI3spqORKae(YVS_F7_wWn_o, roI3spqORKae(ES5oEprVxulp(b'\x99\x10,W\x9b\xa7\xeaE'), '\x64' + chr(101) + chr(0b1100011) + chr(4729 - 4618) + '\x64' + '\x65')(chr(0b1110101) + chr(4888 - 4772) + chr(102) + '\055' + chr(874 - 818)))(n3sh9UGr5i2w)}) elif roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x99\x17\x16H\x91\xb2'), chr(4574 - 4474) + chr(8927 - 8826) + '\143' + chr(0b1101111) + '\x64' + '\145')(chr(0b10011 + 0o142) + '\164' + chr(0b1100110) + chr(0b101101) + chr(0b111000)))(n3sh9UGr5i2w): tF75nqoNENFL = {B6UAF1zReOyJ: Ned2EfaJwYLJ(r7AA1pbLjb44, n=NoZxuO7wjArS, inertia=WjFLGglCY4qK) for (B6UAF1zReOyJ, r7AA1pbLjb44) in YVS_F7_wWn_o.tcSkjcrLksk1(n3sh9UGr5i2w)} return roI3spqORKae(hFt7yOCw4gV2, roI3spqORKae(ES5oEprVxulp(b'\x80\t(U'), '\144' + chr(0b111 + 0o136) + chr(0b1100011) + chr(4099 - 3988) + chr(100) + '\145')('\165' + chr(0b1110100) + chr(3386 - 3284) + chr(1756 - 1711) + '\070'))(tF75nqoNENFL) if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x99\x17\x16U\x9d\xa3\xe3'), chr(0b101111 + 0o65) + '\145' + '\143' + chr(0b1101111) + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(0b1011111 + 0o25) + chr(0b1100110) + chr(0b101101) + '\070'))(n3sh9UGr5i2w) else tF75nqoNENFL elif roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x99\x17\x16H\x91\xb6\xe1_\xe8'), '\x64' + chr(101) + '\143' + chr(111) + chr(0b11110 + 0o106) + '\x65')('\165' + chr(0b1110001 + 0o3) + chr(0b1001010 + 0o34) + '\055' + chr(0b1111 + 0o51)))(n3sh9UGr5i2w, roI3spqORKae(ES5oEprVxulp(b'\x9e\x11$G\x95\xb0'), '\144' + '\145' + chr(0b101111 + 0o64) + '\157' + chr(100) + chr(0b101 + 0o140))(chr(4194 - 4077) + chr(0b1110100) + chr(1547 - 1445) + chr(0b10001 + 0o34) + chr(0b100100 + 0o24))): (fSdw5wwLo9MO, P1yWu4gF7vxH) = (WjFLGglCY4qK, nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061', 8) - WjFLGglCY4qK) fPrVrKACaFCC = n3sh9UGr5i2w if n3sh9UGr5i2w.lhbM092AFW8f[nzTpIcepk0o8(chr(48) + chr(1773 - 1662) + '\060', 0b1000)] in (nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010), 9148 - 9140), nzTpIcepk0o8(chr(1927 - 1879) + chr(0b1100000 + 0o17) + chr(124 - 73), 0o10)) else n3sh9UGr5i2w.hq6XE4_Nhd6R if roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\x91\x08%F\x9c\xad\xe0S'), chr(0b1 + 0o143) + chr(4500 - 4399) + '\x63' + chr(111) + '\x64' + chr(2779 - 2678))('\x75' + '\x74' + '\x66' + '\x2d' + '\x38'))(fPrVrKACaFCC[:, nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110000), 8)], fPrVrKACaFCC[:, -nzTpIcepk0o8('\060' + '\157' + chr(0b110001), 8)]): for p8Ou2emaDF7Z in bbT2xIe5pzk7(NoZxuO7wjArS): n3sh9UGr5i2w = fSdw5wwLo9MO * fPrVrKACaFCC + P1yWu4gF7vxH / nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010 + 0o0), 8) * (nDF4gVNx0u9Q.roll(fPrVrKACaFCC, -nzTpIcepk0o8('\x30' + chr(0b1100 + 0o143) + '\x31', 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001), 8)) + nDF4gVNx0u9Q.roll(fPrVrKACaFCC, nzTpIcepk0o8(chr(48) + chr(7287 - 7176) + chr(0b110001), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061', 8))) else: fPrVrKACaFCC = nDF4gVNx0u9Q.Tn6rGr7XTM7t(fPrVrKACaFCC) for p8Ou2emaDF7Z in bbT2xIe5pzk7(NoZxuO7wjArS): fPrVrKACaFCC[nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2347 - 2298), 8):-nzTpIcepk0o8(chr(0b11011 + 0o25) + '\157' + chr(0b110001), 8)] = fSdw5wwLo9MO * fPrVrKACaFCC[nzTpIcepk0o8(chr(1191 - 1143) + chr(111) + chr(0b110001), 8):-nzTpIcepk0o8(chr(0b111 + 0o51) + chr(0b1101111) + chr(49), 8)] + P1yWu4gF7vxH / nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32', 8) * (fPrVrKACaFCC[:-nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x32', 8)] + fPrVrKACaFCC[nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062', 8):]) if roI3spqORKae(n3sh9UGr5i2w, roI3spqORKae(ES5oEprVxulp(b'\x9c\x0c+h\xc0\xfb\xa1w\xd6:\xb6J'), '\x64' + chr(0b100110 + 0o77) + '\x63' + chr(0b1101111) + chr(7741 - 7641) + chr(0b1100101))('\x75' + '\x74' + chr(102) + chr(0b101101) + chr(0b111000))) != roI3spqORKae(fPrVrKACaFCC, roI3spqORKae(ES5oEprVxulp(b'\x9c\x0c+h\xc0\xfb\xa1w\xd6:\xb6J'), '\x64' + chr(0b1111 + 0o126) + '\x63' + '\157' + chr(4251 - 4151) + '\145')(chr(6193 - 6076) + chr(0b110110 + 0o76) + chr(102) + chr(0b10110 + 0o27) + '\070')): fPrVrKACaFCC = fPrVrKACaFCC.hq6XE4_Nhd6R roI3spqORKae(fPrVrKACaFCC, roI3spqORKae(ES5oEprVxulp(b'\x83\x01=C\x9c\xa3\xf4E'), '\144' + '\145' + '\143' + chr(111) + chr(0b100111 + 0o75) + chr(0b100100 + 0o101))(chr(0b1110101) + '\164' + chr(102) + chr(312 - 267) + chr(56)))(write=roI3spqORKae(n3sh9UGr5i2w, roI3spqORKae(ES5oEprVxulp(b'\x876\r\x7f\xb3\x88\xe6S\xc2\x1c\xecI'), '\144' + chr(101) + chr(5423 - 5324) + chr(0b110 + 0o151) + '\144' + chr(0b1100000 + 0o5))(chr(0b1010101 + 0o40) + '\x74' + chr(102) + chr(0b101101) + chr(56)))[roI3spqORKae(ES5oEprVxulp(b'\xa76\x00q\xb5\x83\xd1z\xd5'), chr(0b1100100) + chr(0b0 + 0o145) + chr(99) + chr(0b1101111) + chr(2652 - 2552) + chr(101))('\165' + chr(0b1110100) + chr(102) + chr(0b11 + 0o52) + chr(0b111000))]) return fPrVrKACaFCC elif not roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x99\x17\x16V\x93\xa3\xffW\xe2'), chr(9203 - 9103) + '\x65' + chr(0b1100011) + chr(8910 - 8799) + chr(6664 - 6564) + chr(8883 - 8782))(chr(0b1110101) + chr(7450 - 7334) + '\x66' + '\x2d' + '\x38'))(n3sh9UGr5i2w): GRbsaHW8BT5I = [Ned2EfaJwYLJ(GRbsaHW8BT5I, n=NoZxuO7wjArS, inertia=WjFLGglCY4qK) for GRbsaHW8BT5I in n3sh9UGr5i2w] return nfNqtJL5aRaY(GRbsaHW8BT5I) if kBeKB4Df6Zrm(n3sh9UGr5i2w) else roI3spqORKae(hFt7yOCw4gV2, roI3spqORKae(ES5oEprVxulp(b'\x80\x12,F\x84\xad\xe1'), '\144' + chr(0b1100101) + chr(99) + '\x6f' + chr(0b1100100) + chr(0b1100101))('\165' + chr(5614 - 5498) + chr(893 - 791) + '\055' + '\070'))(GRbsaHW8BT5I) if suIjIS24Zkqw(n3sh9UGr5i2w, roI3spqORKae(hFt7yOCw4gV2, roI3spqORKae(ES5oEprVxulp(b'\xa02,F\x84\xad\xe1'), chr(384 - 284) + '\145' + chr(0b1100011) + chr(0b1101010 + 0o5) + '\x64' + chr(101))(chr(13657 - 13540) + chr(116) + '\146' + chr(1820 - 1775) + chr(0b110010 + 0o6)))) else roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\x91\x17(W\x82\xa3\xea'), '\x64' + chr(0b10111 + 0o116) + chr(8788 - 8689) + '\157' + chr(0b110011 + 0o61) + chr(0b1100101))(chr(0b10010 + 0o143) + chr(871 - 755) + chr(6008 - 5906) + chr(551 - 506) + '\070'))(GRbsaHW8BT5I) if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x99\x17\x16K\x80\xa3\xe1D\xf1\x14'), chr(0b1100100) + '\x65' + chr(4627 - 4528) + '\x6f' + chr(100) + '\145')(chr(0b1110101) + '\x74' + chr(102) + chr(0b101101) + chr(0b101 + 0o63)))(n3sh9UGr5i2w) else MJ07XsN5uFgW(n3sh9UGr5i2w)(GRbsaHW8BT5I) else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b"\x83\t&J\x84\xaa\xccZ\xf9\x03\xeb_\x12nZ\xe5\xfdQ\xf3%3\x01\x03'\xfd\x0c\xc9t\x1c\x05(\x93\xd3\x1e\xc8@\xfa\xa8<\xc6\xd0A:"), chr(100) + chr(0b1010 + 0o133) + chr(0b1100001 + 0o2) + chr(10469 - 10358) + chr(7951 - 7851) + chr(101))(chr(117) + chr(0b1110100) + '\146' + '\x2d' + chr(1572 - 1516)) % n3sh9UGr5i2w)
noahbenson/neuropythy
neuropythy/geometry/mesh.py
to_tess
def to_tess(obj): ''' to_tess(obj) yields a Tesselation object that is equivalent to obj; if obj is a tesselation object already and no changes are requested (see options) then obj is returned unmolested. The following objects can be converted into tesselations: * a tesselation object * a mesh or topology object (yields their tess objects) * a 3 x n or n x 3 matrix of integers (the faces) * a tuple of coordinates and faces that can be passed to to_mesh ''' if is_tess(obj): return obj elif is_mesh(obj): return obj.tess elif is_topo(obj): return obj.tess else: # couple things to try: (1) might specify a tess face matrix, (2) might be a mesh-like obj try: return tess(obj) except Exception: pass try: return to_mesh(obj).tess except Exception: pass raise ValueError('Could not convert argument to tesselation object')
python
def to_tess(obj): ''' to_tess(obj) yields a Tesselation object that is equivalent to obj; if obj is a tesselation object already and no changes are requested (see options) then obj is returned unmolested. The following objects can be converted into tesselations: * a tesselation object * a mesh or topology object (yields their tess objects) * a 3 x n or n x 3 matrix of integers (the faces) * a tuple of coordinates and faces that can be passed to to_mesh ''' if is_tess(obj): return obj elif is_mesh(obj): return obj.tess elif is_topo(obj): return obj.tess else: # couple things to try: (1) might specify a tess face matrix, (2) might be a mesh-like obj try: return tess(obj) except Exception: pass try: return to_mesh(obj).tess except Exception: pass raise ValueError('Could not convert argument to tesselation object')
[ "def", "to_tess", "(", "obj", ")", ":", "if", "is_tess", "(", "obj", ")", ":", "return", "obj", "elif", "is_mesh", "(", "obj", ")", ":", "return", "obj", ".", "tess", "elif", "is_topo", "(", "obj", ")", ":", "return", "obj", ".", "tess", "else", ...
to_tess(obj) yields a Tesselation object that is equivalent to obj; if obj is a tesselation object already and no changes are requested (see options) then obj is returned unmolested. The following objects can be converted into tesselations: * a tesselation object * a mesh or topology object (yields their tess objects) * a 3 x n or n x 3 matrix of integers (the faces) * a tuple of coordinates and faces that can be passed to to_mesh
[ "to_tess", "(", "obj", ")", "yields", "a", "Tesselation", "object", "that", "is", "equivalent", "to", "obj", ";", "if", "obj", "is", "a", "tesselation", "object", "already", "and", "no", "changes", "are", "requested", "(", "see", "options", ")", "then", ...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/mesh.py#L4139-L4159
train
Converts an object into a Tesselation object.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD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kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(53) + '\x36', 30592 - 30584), nzTpIcepk0o8('\060' + chr(111) + chr(0b11110 + 0o24) + chr(0b110001 + 0o2) + '\x33', 0b1000), nzTpIcepk0o8(chr(1918 - 1870) + chr(0b1101111) + chr(50) + chr(51) + '\x32', 6781 - 6773), nzTpIcepk0o8('\060' + chr(9650 - 9539) + '\x31' + chr(53) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + chr(0b110111) + chr(1045 - 993), 0b1000), nzTpIcepk0o8(chr(867 - 819) + chr(111) + chr(572 - 522) + '\x33' + '\x33', 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1011000 + 0o27) + chr(0b110011) + chr(0b101000 + 0o12) + '\065', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1100001 + 0o16) + '\062' + chr(0b110110) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10111 + 0o32) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(51) + chr(409 - 360) + '\065', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(2260 - 2210) + '\x33', 58428 - 58420), nzTpIcepk0o8(chr(968 - 920) + '\x6f' + chr(51) + '\x35' + '\063', 0o10), nzTpIcepk0o8('\060' + chr(0b1010011 + 0o34) + '\x33' + chr(0b110000) + chr(49), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1111 + 0o140) + chr(0b100110 + 0o21), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(578 - 528) + chr(0b1111 + 0o42) + '\x31', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + '\060' + '\x36', 0o10), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(111) + chr(0b10000 + 0o42) + chr(0b110000 + 0o4) + '\x34', 0b1000), nzTpIcepk0o8('\060' + chr(0b111011 + 0o64) + '\x32' + chr(0b101001 + 0o16) + chr(48), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(53) + '\061', 0b1000), nzTpIcepk0o8(chr(508 - 460) + chr(2578 - 2467) + chr(2343 - 2291) + '\x36', 63091 - 63083), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + chr(1222 - 1174) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(2019 - 1971) + chr(4931 - 4820) + chr(0b100010 + 0o21) + chr(54) + '\x30', 46171 - 46163), nzTpIcepk0o8(chr(1727 - 1679) + chr(0b1101111) + chr(51) + chr(0b11111 + 0o21) + '\x33', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + chr(0b110100) + chr(0b110011), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\063' + chr(666 - 612) + '\061', 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\x31' + chr(734 - 686) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(1766 - 1718) + chr(111) + '\063' + chr(0b11000 + 0o37) + '\066', 0o10), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(0b1101111) + chr(49) + '\064' + chr(0b1 + 0o60), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(353 - 303) + chr(1832 - 1779) + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\064' + chr(0b101000 + 0o12), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(0b101011 + 0o6) + chr(51), 0b1000), nzTpIcepk0o8(chr(1462 - 1414) + chr(111) + chr(0b110001) + '\x36' + '\x31', 0o10), nzTpIcepk0o8('\060' + chr(7685 - 7574) + '\062' + chr(51) + chr(0b110010), 8), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + chr(0b110111) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(1043 - 995) + chr(0b100110 + 0o111) + '\062' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(886 - 838) + chr(8366 - 8255) + chr(53) + '\062', 22757 - 22749), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\x6f' + chr(2053 - 2004) + chr(0b110110 + 0o0) + chr(1386 - 1334), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(2964 - 2853) + '\061' + chr(51) + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b110 + 0o151) + chr(0b110011) + '\062' + '\x32', 0o10), nzTpIcepk0o8(chr(2108 - 2060) + chr(0b1100101 + 0o12) + chr(49) + chr(1396 - 1342) + chr(2302 - 2253), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\x6f' + chr(0b101010 + 0o13) + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x00'), '\x64' + chr(0b111111 + 0o46) + chr(0b10100 + 0o117) + chr(0b11001 + 0o126) + chr(9220 - 9120) + '\x65')(chr(7390 - 7273) + chr(116) + chr(0b1100110) + chr(0b1010 + 0o43) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def kDlG_fSuzn4z(kIMfkyypPTcC): if LUgQoDF9i5l6(kIMfkyypPTcC): return kIMfkyypPTcC elif a8iMfp52DT0e(kIMfkyypPTcC): return roI3spqORKae(kIMfkyypPTcC, roI3spqORKae(ES5oEprVxulp(b'Z\xfe\xe9\x1c'), '\144' + chr(101) + chr(99) + chr(6805 - 6694) + chr(0b1011100 + 0o10) + chr(0b1100101))('\165' + chr(0b1101000 + 0o14) + chr(0b1100110) + chr(1369 - 1324) + chr(0b111000))) elif bq5iOr1Z0M2l(kIMfkyypPTcC): return roI3spqORKae(kIMfkyypPTcC, roI3spqORKae(ES5oEprVxulp(b'Z\xfe\xe9\x1c'), chr(100) + chr(101) + chr(0b1100011) + chr(554 - 443) + chr(0b1100100) + chr(0b1100101))(chr(117) + chr(9625 - 9509) + chr(0b1100110) + chr(1881 - 1836) + chr(0b111000))) else: try: return vDADDXg0D1_j(kIMfkyypPTcC) except zfo2Sgkz3IVJ: pass try: return roI3spqORKae(vp8E7Zmk7FEu(kIMfkyypPTcC), roI3spqORKae(ES5oEprVxulp(b'Z\xfe\xe9\x1c'), '\144' + chr(0b1100101) + chr(0b111011 + 0o50) + chr(1772 - 1661) + '\x64' + chr(0b1100101))('\165' + '\x74' + chr(0b1100110) + chr(0b101101) + '\x38')) except zfo2Sgkz3IVJ: pass raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b"m\xf4\xef\x03\xd8\xbb\xbb\xdc~\xedp\x84\xafq\xec\xf4\xd0\x98HT'\x85\xae\x86\x9f3\xde\x15\xc5\x02\xff\x14\xe9\x8fuF\x15(\xbb\x1e@\xbb\xf5\r\xd6\xfe\xb6\xc7"), '\144' + '\145' + chr(0b10100 + 0o117) + chr(0b111111 + 0o60) + '\144' + chr(0b1100101))(chr(2094 - 1977) + chr(116) + chr(0b1011101 + 0o11) + '\x2d' + chr(0b1101 + 0o53)))
noahbenson/neuropythy
neuropythy/geometry/mesh.py
to_mesh
def to_mesh(obj): ''' to_mesh(obj) yields a Mesh object that is equivalent to obj or identical to obj if obj is itself a mesh object. The following objects can be converted into meshes: * a mesh object * a tuple (coords, faces) where coords is a coordinate matrix and faces is a matrix of coordinate indices that make-up the triangles * a tuple (faces, coords) where faces is a triangle matrix and coords is a coordinate matrix; note that if neither matrix is of integer type, then the latter ordering (which is the same as that accepted by the mesh() function) is assumed. * a tuple (topo, regname) specifying the registration name to use (note that regname may optionally start with 'reg:' which is ignored). * a tuple (cortex, surfname) specifying the surface name to use. Note that surfname may optionally start with 'surf:' or 'reg:', both of which are used only to determine whether to lookup a registration or a surface. If no 'surf:' or 'reg:' is given as a prefix, then a surface is tried first followed by a registration. The surface name 'sphere' is automatically translated to 'reg:native' and any surface name of the form '<name>_sphere' is automatically translated to 'reg:<name>'. * a tuple (topo/cortex, mesh) results in the mesh being returned. * a tuple (mesh, string) or (mesh, None) results in mesh with the second argument ignored. * a tuple (mesh1, mesh2) results in mesh2 with mesh1 ignored. Note that some of the behavior described above is desirable because of a common use case of the to_mesh function. When another function f accepts as arguments both a hemi/topology object as well as an optional surface argument, the purpose is often to obtain a specific mesh from the topology but to allow the user to specify which or to pass their own mesh. ''' if is_mesh(obj): return obj elif pimms.is_vector(obj) and len(obj) == 2: (a,b) = obj if pimms.is_matrix(a, 'int') and pimms.is_matrix(b, 'real'): return mesh(a, b) elif pimms.is_matrix(b, 'int') and pimms.is_matrix(a, 'real'): return mesh(b, a) elif is_mesh(a) and (b is None or pimms.is_str(b)): return a elif is_mesh(a) and is_mesh(b): return b elif is_topo(a): from neuropythy import is_cortex if is_mesh(b): return b elif not pimms.is_str(b): raise ValueError('to_mesh: non-str surf/reg name: %s' % (b,)) (b0, lb) = (b, b.lower()) # check for translations of the name first: s = b[4:] if lb.startswith('reg:') else b[5:] if lb.startswith('surf:') else b ls = s.lower() if ls.endswith('_sphere'): b = ('reg:' + s[:-7]) elif ls == 'sphere': b = 'reg:native' lb = b.lower() # we try surfaces first (if a is a cortex and has surfaces) if is_cortex(a) and not lb.startswith('reg:'): (s,ls) = (b[5:],lb[5:]) if lb.startswith('surf:') else (b,lb) if s in a.surfaces: return a.surfaces[s] elif ls in a.surfaces: return a.surfaces[ls] # then check registrations if not lb.startswith('surf:'): (s,ls) = (b[4:],lb[4:]) if lb.startswith('reg:') else (b,lb) if s in a.registrations: return a.registrations[s] elif ls in a.registrations: return a.registrations[ls] # nothing found raise ValueError('to_mesh: mesh named "%s" not found in topology %s' % (b0, a)) else: raise ValueError('to_mesh: could not deduce meaning of row: %s' % (obj,)) else: raise ValueError('Could not deduce how object can be convertex into a mesh')
python
def to_mesh(obj): ''' to_mesh(obj) yields a Mesh object that is equivalent to obj or identical to obj if obj is itself a mesh object. The following objects can be converted into meshes: * a mesh object * a tuple (coords, faces) where coords is a coordinate matrix and faces is a matrix of coordinate indices that make-up the triangles * a tuple (faces, coords) where faces is a triangle matrix and coords is a coordinate matrix; note that if neither matrix is of integer type, then the latter ordering (which is the same as that accepted by the mesh() function) is assumed. * a tuple (topo, regname) specifying the registration name to use (note that regname may optionally start with 'reg:' which is ignored). * a tuple (cortex, surfname) specifying the surface name to use. Note that surfname may optionally start with 'surf:' or 'reg:', both of which are used only to determine whether to lookup a registration or a surface. If no 'surf:' or 'reg:' is given as a prefix, then a surface is tried first followed by a registration. The surface name 'sphere' is automatically translated to 'reg:native' and any surface name of the form '<name>_sphere' is automatically translated to 'reg:<name>'. * a tuple (topo/cortex, mesh) results in the mesh being returned. * a tuple (mesh, string) or (mesh, None) results in mesh with the second argument ignored. * a tuple (mesh1, mesh2) results in mesh2 with mesh1 ignored. Note that some of the behavior described above is desirable because of a common use case of the to_mesh function. When another function f accepts as arguments both a hemi/topology object as well as an optional surface argument, the purpose is often to obtain a specific mesh from the topology but to allow the user to specify which or to pass their own mesh. ''' if is_mesh(obj): return obj elif pimms.is_vector(obj) and len(obj) == 2: (a,b) = obj if pimms.is_matrix(a, 'int') and pimms.is_matrix(b, 'real'): return mesh(a, b) elif pimms.is_matrix(b, 'int') and pimms.is_matrix(a, 'real'): return mesh(b, a) elif is_mesh(a) and (b is None or pimms.is_str(b)): return a elif is_mesh(a) and is_mesh(b): return b elif is_topo(a): from neuropythy import is_cortex if is_mesh(b): return b elif not pimms.is_str(b): raise ValueError('to_mesh: non-str surf/reg name: %s' % (b,)) (b0, lb) = (b, b.lower()) # check for translations of the name first: s = b[4:] if lb.startswith('reg:') else b[5:] if lb.startswith('surf:') else b ls = s.lower() if ls.endswith('_sphere'): b = ('reg:' + s[:-7]) elif ls == 'sphere': b = 'reg:native' lb = b.lower() # we try surfaces first (if a is a cortex and has surfaces) if is_cortex(a) and not lb.startswith('reg:'): (s,ls) = (b[5:],lb[5:]) if lb.startswith('surf:') else (b,lb) if s in a.surfaces: return a.surfaces[s] elif ls in a.surfaces: return a.surfaces[ls] # then check registrations if not lb.startswith('surf:'): (s,ls) = (b[4:],lb[4:]) if lb.startswith('reg:') else (b,lb) if s in a.registrations: return a.registrations[s] elif ls in a.registrations: return a.registrations[ls] # nothing found raise ValueError('to_mesh: mesh named "%s" not found in topology %s' % (b0, a)) else: raise ValueError('to_mesh: could not deduce meaning of row: %s' % (obj,)) else: raise ValueError('Could not deduce how object can be convertex into a mesh')
[ "def", "to_mesh", "(", "obj", ")", ":", "if", "is_mesh", "(", "obj", ")", ":", "return", "obj", "elif", "pimms", ".", "is_vector", "(", "obj", ")", "and", "len", "(", "obj", ")", "==", "2", ":", "(", "a", ",", "b", ")", "=", "obj", "if", "pim...
to_mesh(obj) yields a Mesh object that is equivalent to obj or identical to obj if obj is itself a mesh object. The following objects can be converted into meshes: * a mesh object * a tuple (coords, faces) where coords is a coordinate matrix and faces is a matrix of coordinate indices that make-up the triangles * a tuple (faces, coords) where faces is a triangle matrix and coords is a coordinate matrix; note that if neither matrix is of integer type, then the latter ordering (which is the same as that accepted by the mesh() function) is assumed. * a tuple (topo, regname) specifying the registration name to use (note that regname may optionally start with 'reg:' which is ignored). * a tuple (cortex, surfname) specifying the surface name to use. Note that surfname may optionally start with 'surf:' or 'reg:', both of which are used only to determine whether to lookup a registration or a surface. If no 'surf:' or 'reg:' is given as a prefix, then a surface is tried first followed by a registration. The surface name 'sphere' is automatically translated to 'reg:native' and any surface name of the form '<name>_sphere' is automatically translated to 'reg:<name>'. * a tuple (topo/cortex, mesh) results in the mesh being returned. * a tuple (mesh, string) or (mesh, None) results in mesh with the second argument ignored. * a tuple (mesh1, mesh2) results in mesh2 with mesh1 ignored. Note that some of the behavior described above is desirable because of a common use case of the to_mesh function. When another function f accepts as arguments both a hemi/topology object as well as an optional surface argument, the purpose is often to obtain a specific mesh from the topology but to allow the user to specify which or to pass their own mesh.
[ "to_mesh", "(", "obj", ")", "yields", "a", "Mesh", "object", "that", "is", "equivalent", "to", "obj", "or", "identical", "to", "obj", "if", "obj", "is", "itself", "a", "mesh", "object", "." ]
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/mesh.py#L4160-L4220
train
Converts obj into a mesh object.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,E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Kae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(4924 - 4813) + '\061' + chr(500 - 447) + '\060', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b10 + 0o62) + '\065', 25141 - 25133), nzTpIcepk0o8(chr(48) + chr(1909 - 1798) + '\063' + '\061' + '\061', 64624 - 64616), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b111111 + 0o60) + chr(470 - 420) + '\060' + chr(0b1 + 0o64), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\063' + '\x32', 0o10), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(111) + '\062' + chr(52) + chr(0b110111), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b111 + 0o55) + chr(0b1111 + 0o50), ord("\x08")), nzTpIcepk0o8(chr(1391 - 1343) + chr(0b1101111) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101001 + 0o6) + '\063' + chr(54) + chr(0b110000), 8675 - 8667), nzTpIcepk0o8('\x30' + '\157' + '\x32' + chr(2221 - 2169) + chr(0b1000 + 0o56), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(51) + chr(49) + chr(0b110010), 3369 - 3361), nzTpIcepk0o8('\x30' + chr(111) + chr(704 - 653) + chr(1277 - 1224) + '\x36', 0b1000), nzTpIcepk0o8(chr(1676 - 1628) + '\x6f' + chr(0b1100 + 0o46) + '\x33' + chr(51), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(2770 - 2659) + '\062' + '\062' + chr(428 - 380), ord("\x08")), nzTpIcepk0o8(chr(0b1101 + 0o43) + '\157' + chr(0b11001 + 0o32) + chr(0b110101), 22138 - 22130), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(111) + '\x36' + chr(0b100110 + 0o20), ord("\x08")), nzTpIcepk0o8('\x30' + chr(5220 - 5109) + chr(2314 - 2264) + '\064' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(1210 - 1160) + chr(0b10101 + 0o34) + chr(405 - 357), 0b1000), nzTpIcepk0o8(chr(1893 - 1845) + '\x6f' + chr(378 - 329) + '\x30' + chr(54), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(50) + '\062' + '\x35', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(2773 - 2662) + '\x33' + chr(50) + '\066', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + '\x30' + chr(0b100011 + 0o21), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\x31' + chr(0b110000 + 0o4), ord("\x08")), nzTpIcepk0o8(chr(1742 - 1694) + chr(111) + chr(586 - 536) + chr(53) + chr(49), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\061' + chr(0b110000) + '\063', 0b1000), nzTpIcepk0o8(chr(276 - 228) + chr(0b1101111) + '\063' + '\x34' + chr(51), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(158 - 47) + chr(0b110011) + chr(0b110110) + chr(50), 15365 - 15357), nzTpIcepk0o8('\060' + chr(7387 - 7276) + '\066' + '\060', 0o10), nzTpIcepk0o8('\060' + chr(111) + '\065', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + chr(0b101110 + 0o5) + chr(54), 0o10), nzTpIcepk0o8(chr(608 - 560) + chr(111) + '\061' + '\066' + chr(0b10011 + 0o35), 0b1000), nzTpIcepk0o8('\060' + chr(0b110011 + 0o74) + chr(50) + '\x33' + '\x36', 60636 - 60628), nzTpIcepk0o8(chr(48) + chr(11900 - 11789) + '\x31' + chr(0b11001 + 0o36), ord("\x08")), nzTpIcepk0o8(chr(1772 - 1724) + '\x6f' + '\x33' + '\061' + chr(0b110001), 8), nzTpIcepk0o8('\060' + chr(0b10 + 0o155) + '\061' + chr(0b100 + 0o56), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001 + 0o0) + chr(1941 - 1892) + chr(1876 - 1826), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1011101 + 0o22) + chr(50) + chr(52) + chr(971 - 919), 37267 - 37259), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(0b1101111) + '\x32' + chr(0b110111) + '\065', 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + chr(48), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1010001 + 0o36) + '\x35' + '\x30', 2150 - 2142)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'F'), chr(0b1010010 + 0o22) + chr(7856 - 7755) + '\x63' + chr(1490 - 1379) + '\144' + chr(880 - 779))(chr(0b101000 + 0o115) + '\164' + '\146' + chr(45) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def vp8E7Zmk7FEu(kIMfkyypPTcC): if a8iMfp52DT0e(kIMfkyypPTcC): return kIMfkyypPTcC elif roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x01V\x96\xf3\x7f\xc4Shq'), chr(0b10011 + 0o121) + '\x65' + chr(0b1100011) + chr(0b1101111) + '\x64' + '\145')(chr(4703 - 4586) + chr(0b1100100 + 0o20) + chr(0b1001000 + 0o36) + '\x2d' + chr(0b10110 + 0o42)))(kIMfkyypPTcC) and ftfygxgFas5X(kIMfkyypPTcC) == nzTpIcepk0o8('\x30' + chr(6336 - 6225) + '\x32', 0b1000): (AQ9ceR9AaoT1, xFDEVQn5qSdh) = kIMfkyypPTcC if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x01V\x96\xe8{\xd3Un{'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(0b111 + 0o150) + chr(0b1100100) + chr(0b1100100 + 0o1))(chr(117) + '\164' + chr(0b1011011 + 0o13) + chr(0b100111 + 0o6) + chr(56)))(AQ9ceR9AaoT1, roI3spqORKae(ES5oEprVxulp(b'\x01K\xbd'), '\144' + '\x65' + chr(99) + chr(7085 - 6974) + '\144' + chr(0b110 + 0o137))(chr(117) + chr(0b1110100) + chr(0b101010 + 0o74) + chr(1423 - 1378) + '\070')) and roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x01V\x96\xe8{\xd3Un{'), chr(100) + chr(0b110010 + 0o63) + '\x63' + '\x6f' + chr(8438 - 8338) + '\145')('\165' + chr(0b1110100) + chr(102) + chr(0b101101) + '\x38'))(xFDEVQn5qSdh, roI3spqORKae(ES5oEprVxulp(b'\x1a@\xa8\xe9'), '\144' + chr(0b1100101) + '\x63' + '\157' + chr(100) + '\145')('\x75' + '\x74' + chr(0b110101 + 0o61) + chr(0b101101) + chr(56))): return olfRNjSgvQh6(AQ9ceR9AaoT1, xFDEVQn5qSdh) elif roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x01V\x96\xe8{\xd3Un{'), chr(0b1001001 + 0o33) + chr(952 - 851) + chr(99) + '\157' + '\x64' + chr(9165 - 9064))('\x75' + '\x74' + chr(0b1100110) + chr(45) + chr(56)))(xFDEVQn5qSdh, roI3spqORKae(ES5oEprVxulp(b'\x01K\xbd'), chr(0b1100100) + '\145' + '\x63' + chr(111) + chr(0b101001 + 0o73) + '\145')(chr(4414 - 4297) + '\x74' + chr(6986 - 6884) + '\055' + chr(0b111000))) and roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x01V\x96\xe8{\xd3Un{'), chr(0b110011 + 0o61) + '\145' + chr(99) + chr(3556 - 3445) + chr(0b1100100) + chr(1676 - 1575))(chr(0b1110101) + chr(0b1100 + 0o150) + chr(0b1001100 + 0o32) + chr(45) + '\070'))(AQ9ceR9AaoT1, roI3spqORKae(ES5oEprVxulp(b'\x1a@\xa8\xe9'), chr(100) + chr(0b1010001 + 0o24) + chr(0b1010001 + 0o22) + '\157' + chr(100) + chr(0b111010 + 0o53))(chr(0b1011111 + 0o26) + chr(0b111000 + 0o74) + chr(0b1100110) + chr(45) + chr(0b111000))): return olfRNjSgvQh6(xFDEVQn5qSdh, AQ9ceR9AaoT1) elif a8iMfp52DT0e(AQ9ceR9AaoT1) and (xFDEVQn5qSdh is None or roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x01V\x96\xf6n\xd5'), chr(100) + '\145' + chr(99) + '\x6f' + chr(0b1100100) + chr(0b101101 + 0o70))(chr(4611 - 4494) + '\164' + '\x66' + chr(0b10100 + 0o31) + '\x38'))(xFDEVQn5qSdh)): return AQ9ceR9AaoT1 elif a8iMfp52DT0e(AQ9ceR9AaoT1) and a8iMfp52DT0e(xFDEVQn5qSdh): return xFDEVQn5qSdh elif bq5iOr1Z0M2l(AQ9ceR9AaoT1): (Cg2wtTEv8idq,) = (roI3spqORKae(rFFUeiYWzOhx(roI3spqORKae(ES5oEprVxulp(b'\x06@\xbc\xf7u\xd7^sk\x89'), chr(900 - 800) + '\x65' + '\x63' + '\x6f' + chr(0b111100 + 0o50) + chr(0b101 + 0o140))(chr(0b1000110 + 0o57) + chr(0b1110100) + chr(9123 - 9021) + chr(45) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\x01V\x96\xe6u\xd5Sb{'), chr(3794 - 3694) + '\x65' + chr(0b1011001 + 0o12) + chr(0b1000101 + 0o52) + '\x64' + '\x65')(chr(0b111011 + 0o72) + chr(6312 - 6196) + chr(2231 - 2129) + '\055' + chr(0b110 + 0o62))), roI3spqORKae(ES5oEprVxulp(b'\x01V\x96\xe6u\xd5Sb{'), '\x64' + chr(4090 - 3989) + '\143' + chr(111) + chr(9961 - 9861) + chr(0b100101 + 0o100))(chr(0b111101 + 0o70) + chr(0b1110100) + chr(5742 - 5640) + '\x2d' + '\x38')),) if a8iMfp52DT0e(xFDEVQn5qSdh): return xFDEVQn5qSdh elif not roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x01V\x96\xf6n\xd5'), chr(0b1100100) + chr(0b110 + 0o137) + chr(0b1100011) + '\157' + chr(0b10000 + 0o124) + chr(9721 - 9620))('\x75' + chr(0b11110 + 0o126) + chr(102) + chr(62 - 17) + chr(0b111000)))(xFDEVQn5qSdh): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\x1cJ\x96\xe8\x7f\xd4O=#\x9e\xc9\xa4\xc3\xe8\xe4o\x16\xd3\xfd4\xf3\xf96i\xcec\x8d\x93]`\xe4P\xbb|'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(0b110001 + 0o76) + chr(100) + '\145')(chr(0b1110101) + chr(5424 - 5308) + '\146' + chr(1352 - 1307) + '\070') % (xFDEVQn5qSdh,)) (zvfcCLYd6Qhi, el9BHnKoxp_t) = (xFDEVQn5qSdh, xFDEVQn5qSdh.Xn8ENWMZdIRt()) PmE5_h409JAA = xFDEVQn5qSdh[nzTpIcepk0o8(chr(1826 - 1778) + '\157' + chr(52), 0b1000):] if el9BHnKoxp_t.startswith(roI3spqORKae(ES5oEprVxulp(b'\x1a@\xae\xbf'), chr(0b1100100) + chr(3060 - 2959) + chr(0b101 + 0o136) + chr(0b101011 + 0o104) + chr(5841 - 5741) + '\x65')(chr(13016 - 12899) + chr(0b111100 + 0o70) + chr(102) + '\055' + '\070')) else xFDEVQn5qSdh[nzTpIcepk0o8('\x30' + chr(9073 - 8962) + '\065', 8):] if el9BHnKoxp_t.startswith(roI3spqORKae(ES5oEprVxulp(b'\x1bP\xbb\xe3 '), chr(0b100011 + 0o101) + chr(3678 - 3577) + chr(0b111011 + 0o50) + chr(111) + chr(0b1100100) + '\145')(chr(117) + chr(116) + chr(0b1100110) + '\x2d' + chr(2402 - 2346))) else xFDEVQn5qSdh l6PDAoAbh2Y9 = PmE5_h409JAA.Xn8ENWMZdIRt() if roI3spqORKae(l6PDAoAbh2Y9, roI3spqORKae(ES5oEprVxulp(b'!\x1c\xaf\xceS\xe4fKb\x85\xec\xb8'), chr(9627 - 9527) + chr(0b1100101) + chr(0b11011 + 0o110) + chr(0b1101111) + '\x64' + chr(0b1010100 + 0o21))('\x75' + '\x74' + chr(0b1100110) + '\055' + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'7V\xb9\xed\x7f\xd5B'), chr(0b1100100 + 0o0) + chr(0b1100101) + chr(1145 - 1046) + chr(0b1101111) + '\144' + chr(101))(chr(0b1110101) + '\x74' + chr(0b1100110) + '\055' + '\x38')): xFDEVQn5qSdh = roI3spqORKae(ES5oEprVxulp(b'\x1a@\xae\xbf'), '\x64' + chr(0b110110 + 0o57) + chr(0b1100011) + '\157' + chr(5332 - 5232) + chr(0b1100101))(chr(0b1100110 + 0o17) + chr(116) + chr(0b1001111 + 0o27) + chr(1475 - 1430) + chr(0b111000)) + PmE5_h409JAA[:-nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b10110 + 0o41), 8)] elif l6PDAoAbh2Y9 == roI3spqORKae(ES5oEprVxulp(b'\x1bU\xa1\xe0h\xc2'), chr(100) + chr(819 - 718) + chr(0b1100011) + chr(4101 - 3990) + chr(0b1100100) + '\x65')('\165' + chr(116) + chr(0b110000 + 0o66) + chr(1204 - 1159) + '\x38'): xFDEVQn5qSdh = roI3spqORKae(ES5oEprVxulp(b'\x1a@\xae\xbft\xc6Snu\x95'), '\x64' + chr(101) + chr(0b100100 + 0o77) + '\157' + '\144' + chr(0b1100101))('\165' + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + '\070') el9BHnKoxp_t = xFDEVQn5qSdh.Xn8ENWMZdIRt() if Cg2wtTEv8idq(AQ9ceR9AaoT1) and (not roI3spqORKae(el9BHnKoxp_t, roI3spqORKae(ES5oEprVxulp(b'\x1bQ\xa8\xf7n\xd4Pnw\x98'), chr(100) + '\x65' + chr(0b1100001 + 0o2) + '\157' + chr(216 - 116) + chr(0b100010 + 0o103))(chr(0b1110101) + chr(0b1110100) + chr(0b1011111 + 0o7) + chr(0b101011 + 0o2) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\x1a@\xae\xbf'), chr(0b1011010 + 0o12) + chr(101) + chr(6580 - 6481) + chr(0b1001111 + 0o40) + chr(5472 - 5372) + chr(101))(chr(0b1100001 + 0o24) + chr(13172 - 13056) + chr(0b1000110 + 0o40) + chr(45) + chr(0b111000)))): (PmE5_h409JAA, l6PDAoAbh2Y9) = (xFDEVQn5qSdh[nzTpIcepk0o8(chr(48) + chr(0b1001011 + 0o44) + '\065', 8):], el9BHnKoxp_t[nzTpIcepk0o8(chr(0b110000) + chr(111) + '\065', 8):]) if el9BHnKoxp_t.startswith(roI3spqORKae(ES5oEprVxulp(b'\x1bP\xbb\xe3 '), chr(100) + chr(0b101011 + 0o72) + chr(0b1000110 + 0o35) + chr(0b1011000 + 0o27) + chr(0b1100100) + chr(9807 - 9706))('\x75' + '\164' + chr(7512 - 7410) + '\x2d' + chr(0b111000))) else (xFDEVQn5qSdh, el9BHnKoxp_t) if PmE5_h409JAA in roI3spqORKae(AQ9ceR9AaoT1, roI3spqORKae(ES5oEprVxulp(b'\x1bP\xbb\xe3{\xc4Bt'), chr(100) + chr(0b1100101) + chr(99) + '\157' + chr(0b1100100) + '\145')('\165' + '\164' + '\x66' + chr(1862 - 1817) + '\070')): return roI3spqORKae(AQ9ceR9AaoT1, roI3spqORKae(ES5oEprVxulp(b'\x1bP\xbb\xe3{\xc4Bt'), chr(4334 - 4234) + '\x65' + '\x63' + chr(0b1010100 + 0o33) + chr(7684 - 7584) + '\145')(chr(0b111101 + 0o70) + '\x74' + chr(0b1000 + 0o136) + chr(1772 - 1727) + chr(0b110000 + 0o10)))[PmE5_h409JAA] elif l6PDAoAbh2Y9 in roI3spqORKae(AQ9ceR9AaoT1, roI3spqORKae(ES5oEprVxulp(b'\x1bP\xbb\xe3{\xc4Bt'), '\x64' + '\x65' + chr(99) + chr(0b100110 + 0o111) + chr(0b100111 + 0o75) + chr(0b110010 + 0o63))('\x75' + '\164' + chr(102) + chr(45) + chr(56))): return roI3spqORKae(AQ9ceR9AaoT1, roI3spqORKae(ES5oEprVxulp(b'\x1bP\xbb\xe3{\xc4Bt'), chr(0b1100100) + chr(0b1100101) + chr(0b1000101 + 0o36) + '\x6f' + '\x64' + chr(0b1001001 + 0o34))(chr(0b1110101) + chr(0b1110100) + '\146' + '\055' + '\070'))[l6PDAoAbh2Y9] if not roI3spqORKae(el9BHnKoxp_t, roI3spqORKae(ES5oEprVxulp(b'\x1bQ\xa8\xf7n\xd4Pnw\x98'), chr(0b110111 + 0o55) + chr(1047 - 946) + chr(3433 - 3334) + '\x6f' + '\x64' + chr(5725 - 5624))(chr(0b1110101) + chr(116) + chr(0b1100110) + chr(1773 - 1728) + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'\x1bP\xbb\xe3 '), '\x64' + chr(6255 - 6154) + chr(99) + '\x6f' + chr(9369 - 9269) + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(494 - 392) + chr(0b101101) + chr(0b111000))): (PmE5_h409JAA, l6PDAoAbh2Y9) = (xFDEVQn5qSdh[nzTpIcepk0o8(chr(761 - 713) + '\x6f' + chr(2344 - 2292), 8):], el9BHnKoxp_t[nzTpIcepk0o8(chr(0b110000) + '\157' + chr(2689 - 2637), 8):]) if el9BHnKoxp_t.startswith(roI3spqORKae(ES5oEprVxulp(b'\x1a@\xae\xbf'), '\144' + chr(101) + '\143' + '\157' + '\x64' + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(0b1100110) + '\x2d' + chr(1774 - 1718))) else (xFDEVQn5qSdh, el9BHnKoxp_t) if PmE5_h409JAA in roI3spqORKae(AQ9ceR9AaoT1, roI3spqORKae(ES5oEprVxulp(b'\x1a@\xae\xeci\xd3Ufw\x99\xc9\xa4\x9d'), chr(0b1100100) + chr(2379 - 2278) + '\143' + '\157' + chr(0b11010 + 0o112) + chr(0b1100101))('\x75' + '\164' + '\146' + chr(0b1100 + 0o41) + chr(0b101011 + 0o15))): return roI3spqORKae(AQ9ceR9AaoT1, roI3spqORKae(ES5oEprVxulp(b'\x1a@\xae\xeci\xd3Ufw\x99\xc9\xa4\x9d'), '\x64' + '\x65' + '\143' + chr(0b1101111) + chr(0b1100100) + chr(0b111101 + 0o50))(chr(117) + chr(0b1101101 + 0o7) + chr(102) + chr(0b101101) + chr(0b111000)))[PmE5_h409JAA] elif l6PDAoAbh2Y9 in roI3spqORKae(AQ9ceR9AaoT1, roI3spqORKae(ES5oEprVxulp(b'\x1a@\xae\xeci\xd3Ufw\x99\xc9\xa4\x9d'), chr(7601 - 7501) + chr(0b1000001 + 0o44) + chr(6706 - 6607) + '\157' + '\x64' + '\x65')(chr(0b1110101) + chr(116) + '\x66' + '\055' + chr(0b111000))): return roI3spqORKae(AQ9ceR9AaoT1, roI3spqORKae(ES5oEprVxulp(b'\x1a@\xae\xeci\xd3Ufw\x99\xc9\xa4\x9d'), '\x64' + chr(0b1000010 + 0o43) + '\x63' + chr(0b1101011 + 0o4) + chr(0b11110 + 0o106) + chr(0b1100101))(chr(6901 - 6784) + chr(0b1110100) + '\146' + chr(0b101101) + chr(0b111000)))[l6PDAoAbh2Y9] raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\x1cJ\x96\xe8\x7f\xd4O=#\x9d\xc3\xb9\x86\xbb\xfe|[\xc5\xecf\xb7\xf37.\x89-\x8c\x86\x10c\xb1\x05\xf0k\xe9c$\x84\xc9\x7f\x18J\xa5\xea}\xde\x07"p'), chr(0b1100100) + chr(8718 - 8617) + chr(0b110101 + 0o56) + chr(0b1101111) + chr(0b1100100) + chr(0b1000100 + 0o41))(chr(0b11110 + 0o127) + '\164' + '\146' + '\055' + chr(0b101111 + 0o11)) % (zvfcCLYd6Qhi, AQ9ceR9AaoT1)) else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\x1cJ\x96\xe8\x7f\xd4O=#\x93\xc9\xbf\x82\xff\xb0sY\xd4\xa8"\xf0\xb21o\xccc\x8e\x97Qk\xb7\x1e\xf9/\xa6lj\xd6\xd2gR\x05\xec\xf6'), chr(0b10111 + 0o115) + '\145' + '\x63' + chr(496 - 385) + chr(100) + chr(101))('\x75' + chr(0b1100100 + 0o20) + '\x66' + chr(1990 - 1945) + '\070') % (kIMfkyypPTcC,)) else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'+J\xbc\xe9~\x87Ihw\xd0\xc2\xaf\x8a\xee\xf3x\x16\xc8\xe71\xb5\xb9&f\xcc \x97\xd2Sd\xb0P\xfcj\xe9i%\xca\xcbu\x1aQ\xac\xfd:\xceIsl\xd0\xc7\xea\x83\xfe\xe3u'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(8547 - 8436) + '\144' + '\145')(chr(117) + chr(0b111110 + 0o66) + chr(0b1100110) + '\055' + chr(0b111000)))
noahbenson/neuropythy
neuropythy/geometry/mesh.py
load_gifti
def load_gifti(filename, to='auto'): ''' load_gifti(filename) yields the nibabel gifti data structure loaded by nibabel from the given filename. Currently, this load method is not particlarly sophisticated and simply returns this data. The optional argument to may be used to coerce the resulting data to a particular format; the following arguments are understood: * 'auto' currently returns the nibabel data structure. * 'mesh' returns the data as a mesh, assuming that there are two darray elements stored in the gifti file, the first of which must be a coordinate matrix and a triangle topology. * 'coordinates' returns the data as a coordinate matrix. * 'tesselation' returns the data as a tesselation object. * 'raw' returns the entire gifti image object (None will also yield this result). ''' dat = nib.load(filename) to = 'raw' if to is None else to.lower() if to in ['raw', 'image', 'gifti', 'all', 'full']: return dat if to in ['auto', 'automatic']: # is this a mesh gifti? pset = dat.get_arrays_from_intent('pointset') tris = dat.get_arrays_from_intent('triangle') if len(pset) == 1 and len(tris) == 1: (cor, tri) = (pset[0].data, tris[0].data) # okay, try making it: try: return Mesh(tri, cor) except Exception: pass elif len(pset) == 1 and len(tris) == 0: # just a pointset return pset[0].data elif len(tris) == 1 and len(pset) == 0: # Just a topology... return Tesselation(tris[0].data) # Maybe it's a stat? If so, we want to return the data array... # see the nifti1 header for these numbers, but stats are intent 2-24 stats = [v for k in range(2,25) for v in dat.get_arrays_from_intent(k)] if len(stats) == 1: return np.squeeze(stats[0].data) # most other possibilities are also basic arrays, so if there's only one of them, we can # just yield that array if len(dat.darrays) == 1: return np.squeeze(dat.darrays[0].data) # We don't know what it is; return the whole thing: return dat elif to in ['coords', 'coordinates', 'xyz']: cor = dat.darrays[0].data if pimms.is_matrix(cor, np.inexact): return cor else: raise ValueError('give gifti file did not contain coordinates') elif to in ['tess', 'tesselation', 'triangles', 'tri', 'triangulation']: cor = dat.darrays[0].data if pimms.is_matrix(cor, 'int'): return Tesselation(cor) else: raise ValueError('give gifti file did not contain tesselation') elif to in ['mesh']: if len(dat.darrays) == 2: (cor, tri) = dat.darrays else: (cor, _, tri) = dat.darrays cor = cor.data tri = tri.data # possible that these were given in the wrong order: if pimms.is_matrix(tri, np.inexact) and pimms.is_matrix(cor, 'int'): (cor,tri) = (tri,cor) # okay, try making it: return Mesh(tri, cor) else: raise ValueError('option "to" given to load_gift could not be understood')
python
def load_gifti(filename, to='auto'): ''' load_gifti(filename) yields the nibabel gifti data structure loaded by nibabel from the given filename. Currently, this load method is not particlarly sophisticated and simply returns this data. The optional argument to may be used to coerce the resulting data to a particular format; the following arguments are understood: * 'auto' currently returns the nibabel data structure. * 'mesh' returns the data as a mesh, assuming that there are two darray elements stored in the gifti file, the first of which must be a coordinate matrix and a triangle topology. * 'coordinates' returns the data as a coordinate matrix. * 'tesselation' returns the data as a tesselation object. * 'raw' returns the entire gifti image object (None will also yield this result). ''' dat = nib.load(filename) to = 'raw' if to is None else to.lower() if to in ['raw', 'image', 'gifti', 'all', 'full']: return dat if to in ['auto', 'automatic']: # is this a mesh gifti? pset = dat.get_arrays_from_intent('pointset') tris = dat.get_arrays_from_intent('triangle') if len(pset) == 1 and len(tris) == 1: (cor, tri) = (pset[0].data, tris[0].data) # okay, try making it: try: return Mesh(tri, cor) except Exception: pass elif len(pset) == 1 and len(tris) == 0: # just a pointset return pset[0].data elif len(tris) == 1 and len(pset) == 0: # Just a topology... return Tesselation(tris[0].data) # Maybe it's a stat? If so, we want to return the data array... # see the nifti1 header for these numbers, but stats are intent 2-24 stats = [v for k in range(2,25) for v in dat.get_arrays_from_intent(k)] if len(stats) == 1: return np.squeeze(stats[0].data) # most other possibilities are also basic arrays, so if there's only one of them, we can # just yield that array if len(dat.darrays) == 1: return np.squeeze(dat.darrays[0].data) # We don't know what it is; return the whole thing: return dat elif to in ['coords', 'coordinates', 'xyz']: cor = dat.darrays[0].data if pimms.is_matrix(cor, np.inexact): return cor else: raise ValueError('give gifti file did not contain coordinates') elif to in ['tess', 'tesselation', 'triangles', 'tri', 'triangulation']: cor = dat.darrays[0].data if pimms.is_matrix(cor, 'int'): return Tesselation(cor) else: raise ValueError('give gifti file did not contain tesselation') elif to in ['mesh']: if len(dat.darrays) == 2: (cor, tri) = dat.darrays else: (cor, _, tri) = dat.darrays cor = cor.data tri = tri.data # possible that these were given in the wrong order: if pimms.is_matrix(tri, np.inexact) and pimms.is_matrix(cor, 'int'): (cor,tri) = (tri,cor) # okay, try making it: return Mesh(tri, cor) else: raise ValueError('option "to" given to load_gift could not be understood')
[ "def", "load_gifti", "(", "filename", ",", "to", "=", "'auto'", ")", ":", "dat", "=", "nib", ".", "load", "(", "filename", ")", "to", "=", "'raw'", "if", "to", "is", "None", "else", "to", ".", "lower", "(", ")", "if", "to", "in", "[", "'raw'", ...
load_gifti(filename) yields the nibabel gifti data structure loaded by nibabel from the given filename. Currently, this load method is not particlarly sophisticated and simply returns this data. The optional argument to may be used to coerce the resulting data to a particular format; the following arguments are understood: * 'auto' currently returns the nibabel data structure. * 'mesh' returns the data as a mesh, assuming that there are two darray elements stored in the gifti file, the first of which must be a coordinate matrix and a triangle topology. * 'coordinates' returns the data as a coordinate matrix. * 'tesselation' returns the data as a tesselation object. * 'raw' returns the entire gifti image object (None will also yield this result).
[ "load_gifti", "(", "filename", ")", "yields", "the", "nibabel", "gifti", "data", "structure", "loaded", "by", "nibabel", "from", "the", "given", "filename", ".", "Currently", "this", "load", "method", "is", "not", "particlarly", "sophisticated", "and", "simply",...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/geometry/mesh.py#L4224-L4285
train
Load a gifti file into a new object.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aW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,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(2664 - 2553) + chr(0b110011) + '\x31' + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + chr(4097 - 3986) + chr(52) + chr(0b10010 + 0o41), 21022 - 21014), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + chr(0b101011 + 0o10) + chr(0b110001 + 0o2), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b10111 + 0o130) + chr(49) + chr(0b100111 + 0o15), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1001110 + 0o41) + chr(55) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(730 - 682) + '\x6f' + '\x35' + chr(2887 - 2832), 49501 - 49493), nzTpIcepk0o8('\060' + '\157' + chr(784 - 734) + chr(1322 - 1270), 0b1000), nzTpIcepk0o8(chr(1090 - 1042) + chr(111) + chr(0b11111 + 0o24) + '\x33' + '\066', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49) + '\x36' + chr(2139 - 2089), 1885 - 1877), nzTpIcepk0o8(chr(2166 - 2118) + chr(0b1101111) + chr(50) + '\063' + chr(145 - 94), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + chr(0b100100 + 0o20) + chr(55), 0b1000), nzTpIcepk0o8('\x30' + chr(1047 - 936) + chr(0b10000 + 0o41) + '\x34' + '\x36', 0b1000), nzTpIcepk0o8('\060' + chr(0b101011 + 0o104) + '\061' + '\065' + chr(0b10101 + 0o42), 0o10), nzTpIcepk0o8(chr(48) + chr(2239 - 2128) + chr(0b10111 + 0o32) + '\066', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(50) + '\x33' + chr(0b110111), 42372 - 42364), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b1101111) + '\062' + '\060' + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(111) + '\065', ord("\x08")), nzTpIcepk0o8(chr(0b1011 + 0o45) + '\x6f' + '\x31' + '\066' + chr(0b110010 + 0o1), 0o10), nzTpIcepk0o8('\060' + chr(10981 - 10870) + chr(0b110001) + chr(48) + chr(51), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + chr(1323 - 1272) + '\067', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\061' + chr(0b110110) + chr(0b100010 + 0o17), 0b1000), nzTpIcepk0o8('\x30' + chr(1053 - 942) + '\061' + chr(54) + '\x30', 19779 - 19771), nzTpIcepk0o8('\x30' + chr(111) + '\064' + chr(2207 - 2158), 0b1000), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(5371 - 5260) + chr(0b110011) + '\x30' + chr(0b110010), 49813 - 49805), nzTpIcepk0o8('\060' + '\157' + chr(0b10101 + 0o34) + chr(2638 - 2586) + chr(54), 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b1000 + 0o51) + chr(1862 - 1807) + chr(54), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + '\061' + '\x32', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + chr(0b110001) + '\066', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110101) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b100100 + 0o113) + chr(0b101 + 0o55) + chr(0b100001 + 0o23) + '\062', 3744 - 3736), nzTpIcepk0o8(chr(48) + chr(0b1000101 + 0o52) + '\062' + chr(0b110011) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b1101111) + chr(0b110111) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(48) + chr(5190 - 5079) + '\x31' + '\062' + '\063', 0b1000), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(6948 - 6837) + chr(51) + chr(0b10111 + 0o37) + '\065', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b10100 + 0o43) + chr(0b110101), 3643 - 3635), nzTpIcepk0o8('\060' + '\157' + chr(0b110010 + 0o1) + '\060' + chr(0b110010), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + '\x33' + '\066', 8), nzTpIcepk0o8(chr(1130 - 1082) + '\157' + '\062' + '\x35' + '\065', 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\067' + chr(0b10010 + 0o37), ord("\x08")), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(111) + chr(2174 - 2123) + chr(50) + '\063', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(11652 - 11541) + '\065' + chr(0b100111 + 0o11), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xe6'), '\x64' + '\145' + chr(0b1001110 + 0o25) + chr(6130 - 6019) + chr(0b1100100) + chr(0b100100 + 0o101))('\165' + '\164' + chr(0b1100110) + '\x2d' + chr(2072 - 2016)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def JFl0gn3DBcLe(FxZHtXEolYsL, XH6QLZDN5K8C=roI3spqORKae(ES5oEprVxulp(b'\xa9V\xefc'), '\144' + chr(7180 - 7079) + '\x63' + chr(0b1101111) + '\144' + '\x65')('\165' + chr(116) + '\x66' + chr(45) + '\x38')): LMcCiF4czwpp = MoLuvA7elgUz.ZERsdc7c1d8E(FxZHtXEolYsL) XH6QLZDN5K8C = roI3spqORKae(ES5oEprVxulp(b'\xbaB\xec'), chr(100) + chr(0b10000 + 0o125) + chr(0b101110 + 0o65) + chr(0b1101111) + chr(100) + chr(8425 - 8324))(chr(0b1110101) + '\164' + chr(102) + chr(0b101101) + chr(56)) if XH6QLZDN5K8C is None else XH6QLZDN5K8C.Xn8ENWMZdIRt() if XH6QLZDN5K8C in [roI3spqORKae(ES5oEprVxulp(b'\xbaB\xec'), chr(0b1010011 + 0o21) + chr(101) + chr(1385 - 1286) + chr(11518 - 11407) + chr(0b1001010 + 0o32) + '\x65')('\x75' + chr(0b1110100) + chr(7480 - 7378) + chr(0b1100 + 0o41) + chr(2192 - 2136)), roI3spqORKae(ES5oEprVxulp(b'\xa1N\xfak]'), '\144' + chr(8749 - 8648) + chr(0b1100011) + chr(111) + '\144' + chr(0b1100101))(chr(4703 - 4586) + '\x74' + chr(0b1100110) + chr(0b11110 + 0o17) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xafJ\xfdxQ'), '\x64' + chr(7227 - 7126) + chr(0b111101 + 0o46) + chr(0b10011 + 0o134) + chr(0b1100100) + chr(0b1100101))('\165' + '\x74' + chr(102) + chr(1848 - 1803) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xa9O\xf7'), chr(0b1100100) + '\x65' + '\x63' + '\x6f' + chr(0b1100100) + '\x65')('\165' + chr(116) + chr(10081 - 9979) + chr(0b101101) + chr(0b100011 + 0o25)), roI3spqORKae(ES5oEprVxulp(b'\xaeV\xf7`'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(10441 - 10330) + chr(0b1111 + 0o125) + '\x65')(chr(6499 - 6382) + chr(0b1110100) + chr(102) + chr(1335 - 1290) + chr(2226 - 2170))]: return LMcCiF4czwpp if XH6QLZDN5K8C in [roI3spqORKae(ES5oEprVxulp(b'\xa9V\xefc'), chr(0b1011101 + 0o7) + '\145' + chr(2586 - 2487) + chr(0b1101111 + 0o0) + chr(534 - 434) + chr(0b1100101))(chr(0b1110101) + chr(0b11010 + 0o132) + '\x66' + chr(45) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\xa9V\xefcUN`\xb7\x11'), chr(100) + chr(0b1100101) + chr(0b1000 + 0o133) + chr(490 - 379) + chr(573 - 473) + '\x65')(chr(0b1000101 + 0o60) + chr(0b111110 + 0o66) + '\x66' + '\055' + chr(1429 - 1373))]: r_RYfjeHwsG1 = LMcCiF4czwpp.get_arrays_from_intent(roI3spqORKae(ES5oEprVxulp(b'\xb8L\xf2bL\\q\xaa'), '\x64' + chr(5082 - 4981) + '\x63' + chr(0b1101111) + '\144' + chr(0b1100101))('\165' + chr(551 - 435) + '\146' + chr(0b10011 + 0o32) + '\x38')) tOY2yTBdm8nn = LMcCiF4czwpp.get_arrays_from_intent(roI3spqORKae(ES5oEprVxulp(b'\xbcQ\xf2mVHx\xbb'), '\144' + chr(4970 - 4869) + '\143' + '\x6f' + chr(100) + chr(5976 - 5875))('\165' + chr(5773 - 5657) + chr(0b1100101 + 0o1) + chr(0b101 + 0o50) + chr(682 - 626))) if ftfygxgFas5X(r_RYfjeHwsG1) == nzTpIcepk0o8(chr(0b110000) + chr(11294 - 11183) + chr(0b110001), 7524 - 7516) and ftfygxgFas5X(tOY2yTBdm8nn) == nzTpIcepk0o8('\x30' + chr(0b110110 + 0o71) + chr(0b110001), 8): (cK0spuY7c9sR, oRQG7sQgHvpU) = (r_RYfjeHwsG1[nzTpIcepk0o8('\060' + '\157' + chr(0b101110 + 0o2), ord("\x08"))].FfKOThdpoDTb, tOY2yTBdm8nn[nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b10111 + 0o130) + chr(0b10010 + 0o36), 8)].FfKOThdpoDTb) try: return LpwtToBs49Dr(oRQG7sQgHvpU, cK0spuY7c9sR) except zfo2Sgkz3IVJ: pass elif ftfygxgFas5X(r_RYfjeHwsG1) == nzTpIcepk0o8('\060' + chr(0b1101111) + '\061', 8) and ftfygxgFas5X(tOY2yTBdm8nn) == nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x30', 8): return roI3spqORKae(r_RYfjeHwsG1[nzTpIcepk0o8(chr(0b1010 + 0o46) + '\157' + '\x30', 8)], roI3spqORKae(ES5oEprVxulp(b'\x8eE\xd0ClGp\xae\x1d\xdf\xb3\x04'), '\x64' + '\x65' + chr(0b1001000 + 0o33) + chr(0b1101111) + chr(0b1100100) + chr(101))('\x75' + chr(0b1101001 + 0o13) + '\x66' + chr(0b101101) + chr(2998 - 2942))) elif ftfygxgFas5X(tOY2yTBdm8nn) == nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b1101111) + chr(0b110001), 8) and ftfygxgFas5X(r_RYfjeHwsG1) == nzTpIcepk0o8('\060' + '\x6f' + chr(0b110000), 8): return acxZZg4k02zC(roI3spqORKae(tOY2yTBdm8nn[nzTpIcepk0o8(chr(787 - 739) + chr(732 - 621) + chr(2247 - 2199), 8)], roI3spqORKae(ES5oEprVxulp(b'\x8eE\xd0ClGp\xae\x1d\xdf\xb3\x04'), chr(0b1100100) + chr(0b1100101) + '\143' + '\157' + chr(3394 - 3294) + chr(101))(chr(0b111010 + 0o73) + chr(116) + chr(102) + chr(0b1100 + 0o41) + '\070'))) lhLZcWIiifT1 = [r7AA1pbLjb44 for B6UAF1zReOyJ in bbT2xIe5pzk7(nzTpIcepk0o8(chr(0b110000) + chr(0b1011100 + 0o23) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(152 - 104) + chr(0b1101111) + chr(51) + chr(0b110001), 3394 - 3386)) for r7AA1pbLjb44 in LMcCiF4czwpp.get_arrays_from_intent(B6UAF1zReOyJ)] if ftfygxgFas5X(lhLZcWIiifT1) == nzTpIcepk0o8('\x30' + chr(0b1101100 + 0o3) + '\x31', 8): return roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xbbR\xeei]Uq'), '\x64' + '\145' + chr(99) + '\157' + '\x64' + '\145')(chr(117) + chr(1112 - 996) + '\x66' + chr(0b10 + 0o53) + chr(0b10101 + 0o43)))(roI3spqORKae(lhLZcWIiifT1[nzTpIcepk0o8('\x30' + chr(0b10101 + 0o132) + chr(1859 - 1811), 8)], roI3spqORKae(ES5oEprVxulp(b'\x8eE\xd0ClGp\xae\x1d\xdf\xb3\x04'), '\144' + chr(0b10100 + 0o121) + chr(9185 - 9086) + '\x6f' + chr(4124 - 4024) + chr(101))('\165' + chr(12474 - 12358) + chr(102) + chr(0b101101) + '\x38'))) if ftfygxgFas5X(roI3spqORKae(LMcCiF4czwpp, roI3spqORKae(ES5oEprVxulp(b'\xacB\xe9~YVg'), '\144' + chr(0b1111 + 0o126) + '\143' + '\157' + chr(1718 - 1618) + '\145')(chr(8975 - 8858) + chr(8325 - 8209) + chr(0b1100110) + chr(1988 - 1943) + '\x38'))) == nzTpIcepk0o8(chr(1011 - 963) + chr(0b10111 + 0o130) + '\x31', 8): return roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xbbR\xeei]Uq'), chr(639 - 539) + chr(101) + chr(99) + chr(0b1011011 + 0o24) + chr(0b100010 + 0o102) + chr(0b1100101))(chr(117) + chr(9787 - 9671) + chr(102) + chr(0b10000 + 0o35) + '\x38'))(roI3spqORKae(LMcCiF4czwpp.darrays[nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x30', 8)], roI3spqORKae(ES5oEprVxulp(b'\x8eE\xd0ClGp\xae\x1d\xdf\xb3\x04'), chr(0b111110 + 0o46) + chr(0b1010101 + 0o20) + '\143' + chr(0b1100111 + 0o10) + chr(8898 - 8798) + chr(7543 - 7442))('\x75' + chr(0b11101 + 0o127) + '\146' + chr(0b10011 + 0o32) + '\070'))) return LMcCiF4czwpp elif XH6QLZDN5K8C in [roI3spqORKae(ES5oEprVxulp(b'\xabL\xf4~\\\\'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(0b11111 + 0o120) + chr(100) + chr(0b1001101 + 0o30))(chr(117) + chr(0b1110100) + chr(0b101010 + 0o74) + '\x2d' + chr(931 - 875)), roI3spqORKae(ES5oEprVxulp(b'\xabL\xf4~\\Fz\xbf\x06\xfe\x94'), chr(6984 - 6884) + chr(0b101111 + 0o66) + '\143' + chr(111) + chr(100) + chr(101))(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(708 - 663) + chr(2645 - 2589)), roI3spqORKae(ES5oEprVxulp(b'\xb0Z\xe1'), '\x64' + chr(0b111000 + 0o55) + chr(99) + chr(0b1101111) + '\144' + chr(0b1100101))('\165' + chr(0b1110100) + chr(2370 - 2268) + chr(0b101011 + 0o2) + '\x38')]: cK0spuY7c9sR = LMcCiF4czwpp.darrays[nzTpIcepk0o8(chr(0b110000) + chr(111) + '\060', 8)].FfKOThdpoDTb if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xa1P\xc4aY[f\xb7\n'), chr(0b1011111 + 0o5) + chr(101) + chr(0b1100011) + '\x6f' + chr(8726 - 8626) + '\x65')('\165' + '\164' + chr(0b1001010 + 0o34) + chr(45) + chr(56)))(cK0spuY7c9sR, roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xa1M\xfetYL`'), chr(845 - 745) + chr(5361 - 5260) + chr(99) + chr(0b1011110 + 0o21) + '\144' + '\x65')(chr(0b1001 + 0o154) + chr(0b10 + 0o162) + chr(0b11011 + 0o113) + chr(0b101101) + chr(0b111000)))): return cK0spuY7c9sR else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b"\xafJ\xedi\x18H}\xb8\x06\xf2\xc7\x00\x06b\xfa\xa3a\x1a'\xff\x1f\x1fU\xe2\x05\x11\xe4\xfaH\xcb\xf6\x1f0\x9aR\xb0\xba\xc4W\xb2\xbcF\xe8"), chr(0b1010010 + 0o22) + '\x65' + chr(0b1100011) + '\x6f' + chr(100) + chr(0b1100101))(chr(9771 - 9654) + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + chr(0b111000))) elif XH6QLZDN5K8C in [roI3spqORKae(ES5oEprVxulp(b'\xbcF\xe8\x7f'), chr(0b1100 + 0o130) + '\145' + chr(99) + chr(0b101 + 0o152) + '\x64' + chr(101))(chr(8333 - 8216) + '\164' + '\146' + chr(0b1101 + 0o40) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\xbcF\xe8\x7f]Cu\xaa\x1b\xf4\x89'), '\144' + chr(0b1111 + 0o126) + chr(99) + chr(5900 - 5789) + '\x64' + '\145')(chr(0b1011110 + 0o27) + '\x74' + chr(102) + chr(221 - 176) + '\070'), roI3spqORKae(ES5oEprVxulp(b'\xbcQ\xf2mVHx\xbb\x01'), chr(3725 - 3625) + chr(0b1100101) + chr(0b0 + 0o143) + '\x6f' + '\144' + chr(0b111001 + 0o54))(chr(2560 - 2443) + chr(0b1110100) + chr(9526 - 9424) + '\055' + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xbcQ\xf2'), '\144' + '\x65' + '\143' + '\x6f' + chr(0b101100 + 0o70) + chr(0b1100101))(chr(117) + '\x74' + '\146' + chr(0b11 + 0o52) + chr(0b110001 + 0o7)), roI3spqORKae(ES5oEprVxulp(b'\xbcQ\xf2mVHa\xb2\x13\xef\x8e\t\x01'), '\x64' + '\145' + chr(0b1100011) + chr(111) + '\144' + chr(0b11100 + 0o111))('\x75' + chr(0b1110100) + '\x66' + chr(1244 - 1199) + chr(0b111000))]: cK0spuY7c9sR = LMcCiF4czwpp.darrays[nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\060', 8)].FfKOThdpoDTb if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xa1P\xc4aY[f\xb7\n'), '\x64' + '\x65' + chr(0b1100011) + '\157' + chr(0b1100100) + chr(101))(chr(117) + '\164' + chr(0b111 + 0o137) + chr(45) + '\x38'))(cK0spuY7c9sR, roI3spqORKae(ES5oEprVxulp(b'\xa1M\xef'), chr(100) + chr(0b110 + 0o137) + '\x63' + chr(7521 - 7410) + chr(6680 - 6580) + '\145')('\x75' + '\x74' + '\146' + '\055' + '\070')): return acxZZg4k02zC(cK0spuY7c9sR) else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b"\xafJ\xedi\x18H}\xb8\x06\xf2\xc7\x00\x06b\xfa\xa3a\x1a'\xff\x1f\x1fU\xe2\x05\x11\xe4\xfaH\xcb\xf6\x1f'\x90N\xb1\xbb\xc1X\xa7\xa1L\xf5"), '\144' + chr(0b110001 + 0o64) + chr(4677 - 4578) + chr(0b1000010 + 0o55) + chr(0b1100100) + '\x65')('\x75' + '\x74' + '\x66' + '\055' + chr(1211 - 1155))) elif XH6QLZDN5K8C in [roI3spqORKae(ES5oEprVxulp(b'\xa5F\xe8d'), '\144' + chr(0b1100101) + chr(8612 - 8513) + chr(0b1101111) + chr(8541 - 8441) + '\145')('\165' + chr(8198 - 8082) + chr(102) + '\055' + '\x38')]: if ftfygxgFas5X(roI3spqORKae(LMcCiF4czwpp, roI3spqORKae(ES5oEprVxulp(b'\xacB\xe9~YVg'), chr(100) + '\145' + chr(99) + chr(0b1011110 + 0o21) + chr(100) + chr(101))(chr(117) + chr(116) + chr(0b1100110) + '\055' + chr(0b1101 + 0o53)))) == nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010), 8): (cK0spuY7c9sR, oRQG7sQgHvpU) = LMcCiF4czwpp.darrays else: (cK0spuY7c9sR, zIqcgNgQ9U6F, oRQG7sQgHvpU) = LMcCiF4czwpp.darrays cK0spuY7c9sR = cK0spuY7c9sR.FfKOThdpoDTb oRQG7sQgHvpU = oRQG7sQgHvpU.FfKOThdpoDTb if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xa1P\xc4aY[f\xb7\n'), '\144' + chr(101) + chr(0b1000001 + 0o42) + '\x6f' + '\x64' + chr(0b111111 + 0o46))(chr(0b1110101) + chr(0b1010101 + 0o37) + '\146' + chr(1108 - 1063) + chr(0b10 + 0o66)))(oRQG7sQgHvpU, roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xa1M\xfetYL`'), chr(0b1100100) + chr(0b1100101) + chr(0b111010 + 0o51) + chr(0b1011101 + 0o22) + '\x64' + '\145')('\165' + '\x74' + chr(1206 - 1104) + chr(0b101101) + chr(1398 - 1342)))) and roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xa1P\xc4aY[f\xb7\n'), '\x64' + chr(7140 - 7039) + chr(0b1100011) + '\x6f' + chr(0b1100100) + '\145')(chr(0b1101000 + 0o15) + chr(0b1110100) + chr(0b1010 + 0o134) + chr(1741 - 1696) + '\070'))(cK0spuY7c9sR, roI3spqORKae(ES5oEprVxulp(b'\xa1M\xef'), '\144' + '\145' + chr(2967 - 2868) + '\x6f' + chr(0b11010 + 0o112) + '\145')('\x75' + '\x74' + chr(0b1100110) + '\055' + '\x38')): (cK0spuY7c9sR, oRQG7sQgHvpU) = (oRQG7sQgHvpU, cK0spuY7c9sR) return LpwtToBs49Dr(oRQG7sQgHvpU, cK0spuY7c9sR) else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xa7S\xefeWA4\xfc\x06\xf4\xc5F\x08g\xe9\xe6kS7\xb0Q\x1cN\xa3\x02!\xed\xe7O\xd6\xb8\\<\x80Q\xa6\xfe\xc3V\xa7\xe8A\xfe,MAp\xbb\x00\xe8\x93\t\x00j'), chr(0b1100100) + chr(6553 - 6452) + chr(99) + '\157' + chr(100) + chr(0b1100101))(chr(0b1001100 + 0o51) + chr(11373 - 11257) + chr(2821 - 2719) + chr(45) + chr(0b111000 + 0o0)))
noahbenson/neuropythy
neuropythy/vision/retinotopy.py
empirical_retinotopy_data
def empirical_retinotopy_data(hemi, retino_type): ''' empirical_retinotopy_data(hemi, t) yields a numpy array of data for the given cortex object hemi and retinotopy type t; it does this by looking at the properties in hemi and picking out any combination that is commonly used to denote empirical retinotopy data. These common names are stored in _empirical_retintopy_names, in order of preference, which may be modified. The argument t should be one of 'polar_angle', 'eccentricity', 'weight'. ''' dat = _empirical_retinotopy_names[retino_type.lower()] hdat = {s.lower(): s for s in six.iterkeys(hemi.properties)} return next((hemi.prop(hdat[s.lower()]) for s in dat if s.lower() in hdat), None)
python
def empirical_retinotopy_data(hemi, retino_type): ''' empirical_retinotopy_data(hemi, t) yields a numpy array of data for the given cortex object hemi and retinotopy type t; it does this by looking at the properties in hemi and picking out any combination that is commonly used to denote empirical retinotopy data. These common names are stored in _empirical_retintopy_names, in order of preference, which may be modified. The argument t should be one of 'polar_angle', 'eccentricity', 'weight'. ''' dat = _empirical_retinotopy_names[retino_type.lower()] hdat = {s.lower(): s for s in six.iterkeys(hemi.properties)} return next((hemi.prop(hdat[s.lower()]) for s in dat if s.lower() in hdat), None)
[ "def", "empirical_retinotopy_data", "(", "hemi", ",", "retino_type", ")", ":", "dat", "=", "_empirical_retinotopy_names", "[", "retino_type", ".", "lower", "(", ")", "]", "hdat", "=", "{", "s", ".", "lower", "(", ")", ":", "s", "for", "s", "in", "six", ...
empirical_retinotopy_data(hemi, t) yields a numpy array of data for the given cortex object hemi and retinotopy type t; it does this by looking at the properties in hemi and picking out any combination that is commonly used to denote empirical retinotopy data. These common names are stored in _empirical_retintopy_names, in order of preference, which may be modified. The argument t should be one of 'polar_angle', 'eccentricity', 'weight'.
[ "empirical_retinotopy_data", "(", "hemi", "t", ")", "yields", "a", "numpy", "array", "of", "data", "for", "the", "given", "cortex", "object", "hemi", "and", "retinotopy", "type", "t", ";", "it", "does", "this", "by", "looking", "at", "the", "properties", "...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/vision/retinotopy.py#L41-L51
train
This function returns a numpy array of data for the given cortex object hemi and retinotopy type t.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxRO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N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(470 - 422) + chr(12227 - 12116) + chr(51) + '\x31' + '\062', 27242 - 27234), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + '\063' + chr(0b1101 + 0o52), 5278 - 5270), nzTpIcepk0o8('\x30' + chr(5877 - 5766) + chr(52), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b11 + 0o60) + chr(0b110111) + chr(0b110001), 56444 - 56436), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + chr(54) + chr(1664 - 1616), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(8834 - 8723) + chr(0b110001) + chr(0b10101 + 0o36) + chr(0b100011 + 0o16), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b111 + 0o54) + '\x36', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(11561 - 11450) + chr(0b1111 + 0o42) + '\067' + '\x33', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110110) + chr(51), 0o10), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b1101111) + chr(0b110010) + chr(52) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(11164 - 11053) + chr(0b11101 + 0o26) + chr(0b110110) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x32' + chr(50) + '\062', 0b1000), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b0 + 0o157) + chr(0b110001) + chr(1769 - 1718), 0o10), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(111) + chr(0b10110 + 0o34) + chr(0b110001) + chr(48), 0o10), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(0b1101111) + chr(54) + '\x30', 19977 - 19969), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + chr(0b1010 + 0o47) + '\067', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + chr(55) + chr(50), 48022 - 48014), nzTpIcepk0o8('\060' + chr(0b10001 + 0o136) + '\x33' + '\x30' + '\065', 36162 - 36154), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\067' + chr(48), 43476 - 43468), nzTpIcepk0o8(chr(2064 - 2016) + '\157' + chr(0b110001) + chr(0b101 + 0o56) + chr(54), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1000100 + 0o53) + chr(0b110011) + '\x30' + chr(48), 0b1000), nzTpIcepk0o8(chr(54 - 6) + chr(0b1001011 + 0o44) + chr(51) + chr(54) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(0b101001 + 0o12) + '\067', 12407 - 12399), nzTpIcepk0o8(chr(0b100000 + 0o20) + '\157' + chr(50) + chr(0b110011) + chr(0b110110), 2536 - 2528), nzTpIcepk0o8('\x30' + chr(0b1101001 + 0o6) + '\x34' + '\x36', 14739 - 14731), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010) + '\065' + '\060', 34934 - 34926), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + chr(630 - 581) + '\065', 61289 - 61281), nzTpIcepk0o8(chr(968 - 920) + '\x6f' + chr(0b110011) + chr(52) + '\x31', 0b1000), nzTpIcepk0o8(chr(1458 - 1410) + '\157' + chr(0b110011) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101100 + 0o3) + chr(0b110011) + chr(54) + '\x34', 634 - 626), nzTpIcepk0o8(chr(382 - 334) + '\157' + '\x32' + chr(50) + '\x32', 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + chr(0b110010) + '\x34', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1000110 + 0o51) + chr(0b110011) + chr(0b10100 + 0o35) + chr(50), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31' + chr(0b101101 + 0o10) + chr(0b1101 + 0o52), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101100 + 0o3) + chr(50) + chr(50) + chr(0b111 + 0o55), 4481 - 4473), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(0b1101111) + chr(49) + chr(100 - 46) + '\067', 25700 - 25692), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + chr(0b110100) + chr(48), 37690 - 37682), nzTpIcepk0o8(chr(0b110000) + chr(0b1000100 + 0o53) + chr(51) + chr(1984 - 1930), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + '\063' + chr(0b11101 + 0o25), ord("\x08")), nzTpIcepk0o8('\x30' + chr(7752 - 7641) + chr(50) + chr(1199 - 1149) + '\x36', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(7838 - 7727) + chr(2122 - 2069) + '\060', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xe4'), chr(0b1100100) + '\145' + chr(2346 - 2247) + chr(7533 - 7422) + chr(0b101011 + 0o71) + '\145')(chr(0b1110101) + chr(116) + chr(0b100010 + 0o104) + '\055' + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def MNh7KhMdqzOw(nRSX3HCpSIw0, EoAKDwG4tkbe): LMcCiF4czwpp = lS4HFSHnn6Vz[EoAKDwG4tkbe.Xn8ENWMZdIRt()] QyJxzNjhjmLG = {PmE5_h409JAA.Xn8ENWMZdIRt(): PmE5_h409JAA for PmE5_h409JAA in YVS_F7_wWn_o.iterkeys(nRSX3HCpSIw0.UtZvTnutzMHg)} return ltB3XhPy2rYf((roI3spqORKae(nRSX3HCpSIw0, roI3spqORKae(ES5oEprVxulp(b'\xba\xedk\x89'), '\x64' + chr(4416 - 4315) + chr(2903 - 2804) + chr(9285 - 9174) + '\x64' + chr(101))(chr(12211 - 12094) + '\164' + chr(1864 - 1762) + '\x2d' + chr(897 - 841)))(QyJxzNjhjmLG[roI3spqORKae(PmE5_h409JAA, roI3spqORKae(ES5oEprVxulp(b'\x92\xf1<\xbc\xfe\x0eS!W\xe8\xa3\xe6'), chr(9205 - 9105) + chr(0b1110 + 0o127) + '\143' + '\x6f' + chr(0b1001110 + 0o26) + chr(101))(chr(117) + chr(0b1011000 + 0o34) + '\x66' + chr(545 - 500) + '\070'))()]) for PmE5_h409JAA in LMcCiF4czwpp if roI3spqORKae(PmE5_h409JAA, roI3spqORKae(ES5oEprVxulp(b'\x92\xf1<\xbc\xfe\x0eS!W\xe8\xa3\xe6'), chr(0b100110 + 0o76) + chr(0b1011101 + 0o10) + chr(99) + chr(2088 - 1977) + '\x64' + chr(101))('\x75' + '\164' + '\x66' + chr(45) + chr(1587 - 1531)))() in QyJxzNjhjmLG), None)
noahbenson/neuropythy
neuropythy/vision/retinotopy.py
predicted_retinotopy_data
def predicted_retinotopy_data(hemi, retino_type): ''' predicted_retinotopy_data(hemi, t) yields a numpy array of data for the given cortex object hemi and retinotopy type t; it does this by looking at the properties in hemi and picking out any combination that is commonly used to denote empirical retinotopy data. These common names are stored in _predicted_retintopy_names, in order of preference, which may be modified. The argument t should be one of 'polar_angle', 'eccentricity', 'visual_area'. ''' dat = _predicted_retinotopy_names[retino_type.lower()] hdat = {s.lower(): s for s in six.iterkeys(hemi.properties)} return next((hemi.prop(hdat[s]) for s in dat if s.lower() in hdat), None)
python
def predicted_retinotopy_data(hemi, retino_type): ''' predicted_retinotopy_data(hemi, t) yields a numpy array of data for the given cortex object hemi and retinotopy type t; it does this by looking at the properties in hemi and picking out any combination that is commonly used to denote empirical retinotopy data. These common names are stored in _predicted_retintopy_names, in order of preference, which may be modified. The argument t should be one of 'polar_angle', 'eccentricity', 'visual_area'. ''' dat = _predicted_retinotopy_names[retino_type.lower()] hdat = {s.lower(): s for s in six.iterkeys(hemi.properties)} return next((hemi.prop(hdat[s]) for s in dat if s.lower() in hdat), None)
[ "def", "predicted_retinotopy_data", "(", "hemi", ",", "retino_type", ")", ":", "dat", "=", "_predicted_retinotopy_names", "[", "retino_type", ".", "lower", "(", ")", "]", "hdat", "=", "{", "s", ".", "lower", "(", ")", ":", "s", "for", "s", "in", "six", ...
predicted_retinotopy_data(hemi, t) yields a numpy array of data for the given cortex object hemi and retinotopy type t; it does this by looking at the properties in hemi and picking out any combination that is commonly used to denote empirical retinotopy data. These common names are stored in _predicted_retintopy_names, in order of preference, which may be modified. The argument t should be one of 'polar_angle', 'eccentricity', 'visual_area'.
[ "predicted_retinotopy_data", "(", "hemi", "t", ")", "yields", "a", "numpy", "array", "of", "data", "for", "the", "given", "cortex", "object", "hemi", "and", "retinotopy", "type", "t", ";", "it", "does", "this", "by", "looking", "at", "the", "properties", "...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/vision/retinotopy.py#L61-L71
train
This function returns the predicted retinotopy data for the given cortex object hemi and retinotopy type t.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,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DT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010) + chr(1085 - 1033) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(12134 - 12023) + '\062' + '\x35' + '\062', 28954 - 28946), nzTpIcepk0o8('\060' + chr(4222 - 4111) + chr(1538 - 1489) + chr(51), 0b1000), nzTpIcepk0o8(chr(0b1 + 0o57) + '\157' + chr(0b110010) + '\061' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(1363 - 1315) + chr(0b1011001 + 0o26) + chr(2788 - 2734) + chr(0b10100 + 0o37), 8028 - 8020), nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + chr(1226 - 1175) + chr(1154 - 1106), 25350 - 25342), nzTpIcepk0o8(chr(48) + chr(6362 - 6251) + chr(1998 - 1947) + '\066' + chr(0b1001 + 0o54), 0o10), nzTpIcepk0o8('\060' + chr(5771 - 5660) + chr(50) + chr(0b110111) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(1245 - 1197) + chr(3091 - 2980) + chr(0b110000 + 0o3) + '\x37' + '\x33', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010 + 0o1) + chr(1296 - 1244) + chr(0b11001 + 0o33), 0b1000), nzTpIcepk0o8('\x30' + chr(5435 - 5324) + chr(728 - 678) + chr(49) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b100111 + 0o11) + '\157' + '\062' + chr(55) + '\x32', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11010 + 0o27) + '\061' + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(54) + '\062', 36554 - 36546), nzTpIcepk0o8(chr(48) + '\157' + '\066' + chr(1608 - 1554), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(2140 - 2091) + chr(48) + '\062', 0b1000), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(0b100101 + 0o112) + chr(49) + chr(0b1110 + 0o43), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1000100 + 0o53) + chr(0b110 + 0o53) + '\x30' + '\x31', 0b1000), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(1924 - 1813) + chr(1318 - 1269) + '\063' + chr(0b100 + 0o55), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(51) + chr(0b110100) + chr(685 - 630), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b11100 + 0o31) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + '\065' + chr(0b110000), 39321 - 39313), nzTpIcepk0o8(chr(48) + chr(8474 - 8363) + '\062' + chr(0b100001 + 0o24) + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b110100 + 0o73) + '\061' + chr(0b110001) + chr(0b11100 + 0o25), 8), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(7755 - 7644) + chr(0b11110 + 0o25) + '\x36', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(466 - 416) + chr(50) + '\x34', 0o10), nzTpIcepk0o8(chr(48) + chr(7796 - 7685) + chr(49) + chr(0b100001 + 0o24) + chr(0b100010 + 0o24), 11040 - 11032), nzTpIcepk0o8('\x30' + chr(7268 - 7157) + chr(0b110010) + chr(2633 - 2578), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010) + chr(991 - 939) + '\x33', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\x33' + chr(52) + chr(0b1011 + 0o54), 8), nzTpIcepk0o8(chr(92 - 44) + chr(0b1101111) + '\x33' + chr(217 - 166) + '\x36', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1078 - 1026) + chr(0b10011 + 0o43), 30966 - 30958), nzTpIcepk0o8(chr(48) + chr(4556 - 4445) + chr(1365 - 1316) + chr(119 - 64) + chr(0b101010 + 0o15), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(53) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(287 - 239) + '\x6f' + '\x32' + chr(2383 - 2334) + chr(0b10010 + 0o43), 16137 - 16129), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(55) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(2620 - 2509) + '\x33' + chr(0b110100) + chr(0b110100), 8), nzTpIcepk0o8(chr(464 - 416) + '\x6f' + chr(0b110110) + '\060', 0o10), nzTpIcepk0o8(chr(293 - 245) + chr(111) + chr(0b110001) + '\x35' + chr(51), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(51) + chr(548 - 494), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110101) + '\x30', 63939 - 63931)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x8f'), chr(100) + chr(0b1001110 + 0o27) + '\x63' + chr(111) + '\144' + chr(101))(chr(0b1110101) + chr(0b1011000 + 0o34) + '\x66' + chr(0b101101) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Ez8NJmt1VMnJ(nRSX3HCpSIw0, EoAKDwG4tkbe): LMcCiF4czwpp = HkvIASNuNoUq[EoAKDwG4tkbe.Xn8ENWMZdIRt()] QyJxzNjhjmLG = {PmE5_h409JAA.Xn8ENWMZdIRt(): PmE5_h409JAA for PmE5_h409JAA in YVS_F7_wWn_o.iterkeys(nRSX3HCpSIw0.UtZvTnutzMHg)} return ltB3XhPy2rYf((roI3spqORKae(nRSX3HCpSIw0, roI3spqORKae(ES5oEprVxulp(b'\xd1\xd8d\xfa'), chr(0b1100100) + '\x65' + '\x63' + chr(0b1101111) + '\x64' + chr(101))(chr(177 - 60) + chr(116) + chr(102) + chr(0b101101) + '\070'))(QyJxzNjhjmLG[PmE5_h409JAA]) for PmE5_h409JAA in LMcCiF4czwpp if roI3spqORKae(PmE5_h409JAA, roI3spqORKae(ES5oEprVxulp(b'\xf9\xc43\xcf}\xcf\xb8\xe2\x9f\xad\xdc\xce'), chr(0b100010 + 0o102) + '\x65' + chr(0b101000 + 0o73) + '\x6f' + '\144' + chr(0b1010011 + 0o22))('\165' + chr(116) + chr(0b1100110) + '\055' + chr(0b110 + 0o62)))() in QyJxzNjhjmLG), None)
noahbenson/neuropythy
neuropythy/vision/retinotopy.py
basic_retinotopy_data
def basic_retinotopy_data(hemi, retino_type): ''' basic_retinotopy_data(hemi, t) yields a numpy array of data for the given cortex object hemi and retinotopy type t; it does this by looking at the properties in hemi and picking out any combination that is commonly used to denote empirical retinotopy data. These common names are stored in _predicted_retintopy_names, in order of preference, which may be modified. The argument t should be one of 'polar_angle', 'eccentricity', 'visual_area', or 'weight'. Unlike the related functions empirical_retinotopy_data and predicted_retinotopy_data, this function calls both of these (predicted first then empirical) in the case that it does not find a valid property. ''' dat = _retinotopy_names[retino_type.lower()] val = next((hemi.prop(s) for s in six.iterkeys(hemi.properties) if s.lower() in dat), None) if val is None and retino_type.lower() != 'weight': val = predicted_retinotopy_data(hemi, retino_type) if val is None and retino_type.lower() != 'visual_area': val = empirical_retinotopy_data(hemi, retino_type) return val
python
def basic_retinotopy_data(hemi, retino_type): ''' basic_retinotopy_data(hemi, t) yields a numpy array of data for the given cortex object hemi and retinotopy type t; it does this by looking at the properties in hemi and picking out any combination that is commonly used to denote empirical retinotopy data. These common names are stored in _predicted_retintopy_names, in order of preference, which may be modified. The argument t should be one of 'polar_angle', 'eccentricity', 'visual_area', or 'weight'. Unlike the related functions empirical_retinotopy_data and predicted_retinotopy_data, this function calls both of these (predicted first then empirical) in the case that it does not find a valid property. ''' dat = _retinotopy_names[retino_type.lower()] val = next((hemi.prop(s) for s in six.iterkeys(hemi.properties) if s.lower() in dat), None) if val is None and retino_type.lower() != 'weight': val = predicted_retinotopy_data(hemi, retino_type) if val is None and retino_type.lower() != 'visual_area': val = empirical_retinotopy_data(hemi, retino_type) return val
[ "def", "basic_retinotopy_data", "(", "hemi", ",", "retino_type", ")", ":", "dat", "=", "_retinotopy_names", "[", "retino_type", ".", "lower", "(", ")", "]", "val", "=", "next", "(", "(", "hemi", ".", "prop", "(", "s", ")", "for", "s", "in", "six", "....
basic_retinotopy_data(hemi, t) yields a numpy array of data for the given cortex object hemi and retinotopy type t; it does this by looking at the properties in hemi and picking out any combination that is commonly used to denote empirical retinotopy data. These common names are stored in _predicted_retintopy_names, in order of preference, which may be modified. The argument t should be one of 'polar_angle', 'eccentricity', 'visual_area', or 'weight'. Unlike the related functions empirical_retinotopy_data and predicted_retinotopy_data, this function calls both of these (predicted first then empirical) in the case that it does not find a valid property.
[ "basic_retinotopy_data", "(", "hemi", "t", ")", "yields", "a", "numpy", "array", "of", "data", "for", "the", "given", "cortex", "object", "hemi", "and", "retinotopy", "type", "t", ";", "it", "does", "this", "by", "looking", "at", "the", "properties", "in",...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/vision/retinotopy.py#L79-L96
train
basic_retinotopy_data yields a numpy array of data for the given cortex object hemi and retinotopy type t.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alq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6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + '\x31', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + '\060' + chr(0b101101 + 0o12), ord("\x08")), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(111) + '\062' + chr(0b110101) + chr(2336 - 2281), 3173 - 3165), nzTpIcepk0o8('\x30' + chr(8633 - 8522) + '\062' + '\062' + chr(93 - 39), ord("\x08")), nzTpIcepk0o8(chr(602 - 554) + chr(8709 - 8598) + chr(578 - 525) + chr(0b100111 + 0o17), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(1771 - 1720) + '\062' + chr(0b110011), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b100101 + 0o14) + '\062' + chr(49), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + '\x32' + chr(51), 0b1000), nzTpIcepk0o8('\x30' + chr(0b110110 + 0o71) + '\x33' + chr(49) + '\x34', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b1101 + 0o50) + '\066', 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\060', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + chr(311 - 263) + chr(472 - 422), 0b1000), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\157' + chr(49) + chr(0b110100) + '\060', 11722 - 11714), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + '\x31' + chr(0b101100 + 0o4), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b101 + 0o56) + '\x37', 0o10), nzTpIcepk0o8(chr(2275 - 2227) + '\157' + chr(0b110010) + '\067' + '\x30', 0o10), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b1101111) + chr(0b110011) + chr(2082 - 2033) + chr(0b110000), 8), nzTpIcepk0o8('\x30' + '\157' + '\062' + '\x35' + chr(0b110110), 40975 - 40967), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(111) + '\x32' + chr(0b11010 + 0o30), 0b1000), nzTpIcepk0o8(chr(1508 - 1460) + '\x6f' + chr(1421 - 1370) + chr(0b1110 + 0o46) + chr(55), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b101000 + 0o107) + chr(52) + chr(0b110111), 46 - 38), nzTpIcepk0o8('\060' + '\157' + '\067' + chr(0b1110 + 0o43), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1000001 + 0o56) + '\x31' + '\060' + '\x36', 53191 - 53183), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + chr(1203 - 1150) + '\060', 32555 - 32547), nzTpIcepk0o8('\060' + chr(5629 - 5518) + chr(0b111 + 0o52) + chr(0b110010) + '\x33', 0o10), nzTpIcepk0o8(chr(0b101101 + 0o3) + '\x6f' + chr(68 - 19) + '\061' + chr(0b110100), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b1000 + 0o51) + '\x33' + chr(0b110010), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(1092 - 1043) + chr(0b110011), 0o10), nzTpIcepk0o8('\060' + chr(2558 - 2447) + chr(0b110011) + chr(0b110011) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(1913 - 1865) + '\157' + chr(50) + chr(53) + chr(0b110000 + 0o1), 25139 - 25131), nzTpIcepk0o8(chr(2155 - 2107) + chr(0b1101111) + chr(0b10010 + 0o41) + '\x32' + chr(0b1101 + 0o50), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011) + chr(140 - 86), 0b1000), nzTpIcepk0o8('\060' + chr(0b11100 + 0o123) + chr(0b10011 + 0o41) + '\061', 57279 - 57271), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2452 - 2400) + chr(341 - 288), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(55) + '\x36', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100000 + 0o23) + '\063' + '\x31', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(2214 - 2163) + chr(49) + chr(50), 0o10), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(111) + '\x32' + chr(0b100 + 0o56) + '\065', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1011001 + 0o26) + chr(0b110111), 47248 - 47240), nzTpIcepk0o8('\060' + chr(10550 - 10439) + chr(0b110011) + chr(2509 - 2455) + '\065', 63309 - 63301)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b101010 + 0o6) + '\157' + chr(80 - 27) + chr(0b110000), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'7'), chr(0b1100100) + chr(0b1001 + 0o134) + '\x63' + chr(0b1010110 + 0o31) + '\x64' + '\145')(chr(0b1100101 + 0o20) + '\x74' + chr(0b1100110) + chr(539 - 494) + chr(0b110110 + 0o2)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def zudtGvCXkKlI(nRSX3HCpSIw0, EoAKDwG4tkbe): LMcCiF4czwpp = ziMINxpKEgOC[EoAKDwG4tkbe.Xn8ENWMZdIRt()] pXwvT17vr09s = ltB3XhPy2rYf((nRSX3HCpSIw0.prop(PmE5_h409JAA) for PmE5_h409JAA in YVS_F7_wWn_o.iterkeys(nRSX3HCpSIw0.UtZvTnutzMHg) if PmE5_h409JAA.Xn8ENWMZdIRt() in LMcCiF4czwpp), None) if pXwvT17vr09s is None and roI3spqORKae(EoAKDwG4tkbe, roI3spqORKae(ES5oEprVxulp(b'A)\x97\xd3`\x84\x1c\xc9\xa8gR\xb6'), '\144' + '\145' + chr(0b1100011) + '\x6f' + chr(0b1001101 + 0o27) + chr(0b1100101))('\x75' + '\164' + '\146' + chr(45) + chr(0b10101 + 0o43)))() != roI3spqORKae(ES5oEprVxulp(b'n"\xc6\xf1F\xa7'), chr(0b101100 + 0o70) + chr(4373 - 4272) + chr(0b1100011) + chr(1998 - 1887) + chr(0b1100100) + chr(6354 - 6253))('\165' + '\x74' + '\x66' + chr(45) + '\x38'): pXwvT17vr09s = Ez8NJmt1VMnJ(nRSX3HCpSIw0, EoAKDwG4tkbe) if pXwvT17vr09s is None and roI3spqORKae(EoAKDwG4tkbe, roI3spqORKae(ES5oEprVxulp(b'A)\x97\xd3`\x84\x1c\xc9\xa8gR\xb6'), chr(100) + chr(10098 - 9997) + chr(99) + chr(0b1101111) + '\144' + chr(0b1100101))('\x75' + chr(0b1110011 + 0o1) + chr(102) + '\055' + '\x38'))() != roI3spqORKae(ES5oEprVxulp(b'o.\xdc\xe3O\xbf\x0e\xf2\xbeKa'), '\x64' + '\145' + chr(0b1100011) + '\x6f' + '\144' + chr(101))(chr(117) + chr(10012 - 9896) + chr(6660 - 6558) + chr(411 - 366) + '\070'): pXwvT17vr09s = MNh7KhMdqzOw(nRSX3HCpSIw0, EoAKDwG4tkbe) return pXwvT17vr09s
noahbenson/neuropythy
neuropythy/vision/retinotopy.py
extract_retinotopy_argument
def extract_retinotopy_argument(obj, retino_type, arg, default='any'): ''' extract_retinotopy_argument(o, retino_type, argument) yields retinotopy data of the given retinotopy type (e.g., 'polar_angle', 'eccentricity', 'variance_explained', 'visual_area', 'weight') from the given hemisphere or cortical mesh object o, according to the given argument. If the argument is a string, then it is considered a property name and that is returned regardless of its value. If the argument is an iterable, then it is returned. If the argument is None, then retinotopy will automatically be extracted, if found, by calling the retinotopy_data function. The option default (which, by default, is 'any') specifies which function should be used to extract retinotopy in the case that the argument is None. The value 'any' indicates that the function retinotopy_data should be used, while the values 'empirical' and 'predicted' specify that the empirical_retinotopy_data and predicted_retinotopy_data functions should be used, respectively. ''' if pimms.is_str(arg): values = obj.prop(arg) elif hasattr(arg, '__iter__'): values = arg elif arg is not None: raise ValueError('cannot interpret retinotopy arg: %s' % arg) elif default == 'predicted': values = predicted_retinotopy_data(obj, retino_type) elif default == 'empirical': values = empirical_retinotopy_data(obj, retino_type) elif default == 'any': values = basic_retinotopy_data(obj, retino_type) else: raise ValueError('bad default retinotopy: %s' % default) if values is None: raise RuntimeError('No %s retinotopy data found given argument: %s' % (retino_type, arg)) n = obj.vertex_count values = np.asarray(values) if len(values) != n: found = False # could be that we were given a mesh data-field for a map try: values = values[obj.labels] except Exception: values = None if values is None: raise RuntimeError('%s data: length %s should be %s' % (retino_type, len(values), n)) return values
python
def extract_retinotopy_argument(obj, retino_type, arg, default='any'): ''' extract_retinotopy_argument(o, retino_type, argument) yields retinotopy data of the given retinotopy type (e.g., 'polar_angle', 'eccentricity', 'variance_explained', 'visual_area', 'weight') from the given hemisphere or cortical mesh object o, according to the given argument. If the argument is a string, then it is considered a property name and that is returned regardless of its value. If the argument is an iterable, then it is returned. If the argument is None, then retinotopy will automatically be extracted, if found, by calling the retinotopy_data function. The option default (which, by default, is 'any') specifies which function should be used to extract retinotopy in the case that the argument is None. The value 'any' indicates that the function retinotopy_data should be used, while the values 'empirical' and 'predicted' specify that the empirical_retinotopy_data and predicted_retinotopy_data functions should be used, respectively. ''' if pimms.is_str(arg): values = obj.prop(arg) elif hasattr(arg, '__iter__'): values = arg elif arg is not None: raise ValueError('cannot interpret retinotopy arg: %s' % arg) elif default == 'predicted': values = predicted_retinotopy_data(obj, retino_type) elif default == 'empirical': values = empirical_retinotopy_data(obj, retino_type) elif default == 'any': values = basic_retinotopy_data(obj, retino_type) else: raise ValueError('bad default retinotopy: %s' % default) if values is None: raise RuntimeError('No %s retinotopy data found given argument: %s' % (retino_type, arg)) n = obj.vertex_count values = np.asarray(values) if len(values) != n: found = False # could be that we were given a mesh data-field for a map try: values = values[obj.labels] except Exception: values = None if values is None: raise RuntimeError('%s data: length %s should be %s' % (retino_type, len(values), n)) return values
[ "def", "extract_retinotopy_argument", "(", "obj", ",", "retino_type", ",", "arg", ",", "default", "=", "'any'", ")", ":", "if", "pimms", ".", "is_str", "(", "arg", ")", ":", "values", "=", "obj", ".", "prop", "(", "arg", ")", "elif", "hasattr", "(", ...
extract_retinotopy_argument(o, retino_type, argument) yields retinotopy data of the given retinotopy type (e.g., 'polar_angle', 'eccentricity', 'variance_explained', 'visual_area', 'weight') from the given hemisphere or cortical mesh object o, according to the given argument. If the argument is a string, then it is considered a property name and that is returned regardless of its value. If the argument is an iterable, then it is returned. If the argument is None, then retinotopy will automatically be extracted, if found, by calling the retinotopy_data function. The option default (which, by default, is 'any') specifies which function should be used to extract retinotopy in the case that the argument is None. The value 'any' indicates that the function retinotopy_data should be used, while the values 'empirical' and 'predicted' specify that the empirical_retinotopy_data and predicted_retinotopy_data functions should be used, respectively.
[ "extract_retinotopy_argument", "(", "o", "retino_type", "argument", ")", "yields", "retinotopy", "data", "of", "the", "given", "retinotopy", "type", "(", "e", ".", "g", ".", "polar_angle", "eccentricity", "variance_explained", "visual_area", "weight", ")", "from", ...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/vision/retinotopy.py#L98-L131
train
Extracts the retinotopy data of the given retinotopy type from the given hemisphere or cortical mesh object o according to the given argument.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,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TbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + '\157' + '\x37' + chr(0b0 + 0o63), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1100011 + 0o14) + '\x32' + '\x34' + chr(1185 - 1137), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + '\x30' + chr(51), 0o10), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(0b1000100 + 0o53) + '\x32' + chr(2568 - 2514) + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b1110 + 0o141) + '\x32' + chr(0b110101) + chr(49), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(1596 - 1485) + '\x31' + chr(2300 - 2250) + chr(968 - 913), 0b1000), nzTpIcepk0o8('\060' + chr(12190 - 12079) + '\061' + chr(476 - 426) + chr(0b100001 + 0o25), 0o10), nzTpIcepk0o8(chr(693 - 645) + chr(111) + chr(0b110001) + '\066' + chr(54), 0b1000), nzTpIcepk0o8('\x30' + chr(3833 - 3722) + chr(50) + chr(0b101011 + 0o6) + chr(0b10000 + 0o41), 0o10), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(0b1101111) + '\x32' + '\x37' + '\x37', 14096 - 14088), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + chr(53), 40820 - 40812), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + chr(51) + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(55) + chr(0b101001 + 0o14), 0o10), nzTpIcepk0o8('\060' + chr(11587 - 11476) + chr(0b110010) + chr(359 - 309) + '\065', 53205 - 53197), nzTpIcepk0o8(chr(48) + chr(5322 - 5211) + '\063' + chr(51) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1627 - 1578) + chr(0b11010 + 0o26) + chr(53), 21495 - 21487), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\157' + chr(1462 - 1411) + chr(0b110011) + '\x34', 33239 - 33231), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(0b1101111) + '\x32' + chr(0b100010 + 0o21) + chr(55), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(51), 36038 - 36030), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(0b1010101 + 0o32) + chr(0b110010) + chr(54) + chr(0b111 + 0o54), 0o10), nzTpIcepk0o8(chr(48) + chr(0b111 + 0o150) + chr(0b110010) + '\x30' + '\x37', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b1 + 0o61) + chr(0b11111 + 0o22) + chr(739 - 690), 8), nzTpIcepk0o8('\060' + chr(4780 - 4669) + chr(571 - 521) + '\x32' + chr(0b0 + 0o64), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110100) + chr(0b10011 + 0o36), ord("\x08")), nzTpIcepk0o8(chr(1216 - 1168) + chr(0b1101111) + chr(51) + chr(0b110000) + chr(931 - 882), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1001100 + 0o43) + chr(500 - 449) + chr(2423 - 2373) + chr(0b11 + 0o55), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(49) + chr(0b110011) + '\x30', 20214 - 20206), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b1101111) + '\067' + '\063', 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(898 - 847) + chr(856 - 802) + chr(53), 6818 - 6810), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b100 + 0o62) + '\x31', 0o10), nzTpIcepk0o8(chr(48) + chr(4764 - 4653) + chr(51) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(49) + chr(48) + chr(752 - 698), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\061' + '\061' + chr(55), 9464 - 9456), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(5592 - 5481) + chr(50) + chr(0b110110) + chr(0b110011), 8), nzTpIcepk0o8(chr(48) + chr(0b1010 + 0o145) + '\x33' + chr(0b110100) + '\x37', 0o10), nzTpIcepk0o8('\x30' + chr(1106 - 995) + chr(0b110001) + '\063' + chr(49), 0o10), nzTpIcepk0o8('\x30' + chr(10157 - 10046) + '\x31' + '\065', 8), nzTpIcepk0o8(chr(2097 - 2049) + '\157' + '\x31' + chr(0b110110), 37695 - 37687), nzTpIcepk0o8(chr(0b110000) + chr(0b100010 + 0o115) + '\062' + chr(0b110011) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(59 - 11) + chr(0b1010000 + 0o37) + '\063' + chr(60 - 5) + chr(0b11110 + 0o22), 10064 - 10056)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2377 - 2324) + '\x30', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x15'), '\x64' + '\x65' + '\143' + '\x6f' + chr(5855 - 5755) + chr(0b1100101))(chr(0b1110101) + chr(116) + '\146' + chr(580 - 535) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Wsfg_Pu9yzqA(kIMfkyypPTcC, EoAKDwG4tkbe, S6EI_gyMl2nC, WmRBchRTeaDt=roI3spqORKae(ES5oEprVxulp(b'Z\xce:'), '\144' + '\x65' + '\x63' + '\157' + '\x64' + '\x65')(chr(0b1110101) + chr(0b1110100) + chr(10225 - 10123) + chr(45) + chr(56))): if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'R\xd3\x1c\xc1\xdd%'), chr(9835 - 9735) + chr(0b1100101) + chr(0b1100011) + chr(9463 - 9352) + chr(0b1010011 + 0o21) + chr(0b1100101))(chr(0b1101100 + 0o11) + '\164' + '\146' + chr(0b100010 + 0o13) + '\x38'))(S6EI_gyMl2nC): CsodZJH6x9Tx = kIMfkyypPTcC.prop(S6EI_gyMl2nC) elif dRKdVnHPFq7C(S6EI_gyMl2nC, roI3spqORKae(ES5oEprVxulp(b'd\xff*\xc6\xcc%\t)'), '\144' + '\x65' + chr(99) + chr(111) + chr(100) + chr(0b101100 + 0o71))('\x75' + chr(116) + chr(0b1100101 + 0o1) + chr(400 - 355) + chr(0b11110 + 0o32))): CsodZJH6x9Tx = S6EI_gyMl2nC elif S6EI_gyMl2nC is not None: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'X\xc1-\xdc\xc6#v\x1f\xe7\xcbh\xa9\r\xe7\xbf1\xfc\xedf\xc7\xee\xe7\xfbU\xae\xa0!\x1b\x94C}|o\x96\x94'), chr(0b1100100) + '\145' + '\x63' + '\x6f' + chr(0b100001 + 0o103) + chr(2397 - 2296))(chr(5842 - 5725) + chr(0b1110100) + '\x66' + '\x2d' + chr(56)) % S6EI_gyMl2nC) elif WmRBchRTeaDt == roI3spqORKae(ES5oEprVxulp(b'K\xd2&\xd6\xc04"\x13\xed'), chr(100) + chr(0b1100101) + '\x63' + '\x6f' + chr(8982 - 8882) + chr(8049 - 7948))(chr(0b1110100 + 0o1) + chr(5141 - 5025) + chr(0b1100110) + '\x2d' + chr(0b111000)): CsodZJH6x9Tx = Ez8NJmt1VMnJ(kIMfkyypPTcC, EoAKDwG4tkbe) elif WmRBchRTeaDt == roI3spqORKae(ES5oEprVxulp(b'^\xcd3\xdb\xdb>5\x17\xe5'), chr(274 - 174) + '\145' + '\x63' + chr(6667 - 6556) + '\144' + chr(101))(chr(961 - 844) + '\x74' + chr(818 - 716) + chr(45) + chr(0b111000)): CsodZJH6x9Tx = MNh7KhMdqzOw(kIMfkyypPTcC, EoAKDwG4tkbe) elif WmRBchRTeaDt == roI3spqORKae(ES5oEprVxulp(b'Z\xce:'), chr(0b1100100) + '\145' + chr(99) + '\157' + chr(7038 - 6938) + chr(180 - 79))('\x75' + '\164' + chr(102) + chr(45) + '\x38'): CsodZJH6x9Tx = zudtGvCXkKlI(kIMfkyypPTcC, EoAKDwG4tkbe) else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b"Y\xc1'\x92\xcd20\x17\xfc\xd3y\xfb\x0f\xf0\xae,\xb2\xf0w\xdc\xf7\xf0\xae\x01\xe4\xa3"), chr(0b1011010 + 0o12) + '\x65' + chr(99) + chr(0b1101111) + chr(4051 - 3951) + chr(0b1100101))(chr(0b111111 + 0o66) + chr(9631 - 9515) + chr(102) + '\x2d' + chr(56)) % WmRBchRTeaDt) if CsodZJH6x9Tx is None: raise _1qUu0gKi9gH(roI3spqORKae(ES5oEprVxulp(b'u\xcfc\x97\xdaw$\x13\xfd\xd6c\xb4\t\xfa\xaa<\xfc\xfbb\xc7\xe6\xa9\xf2N\xb4\xbe<\x1b\x92Xl#!\x93\x86+j{\xf1\x9dU\xd4y\x92\x8c$'), chr(0b1100100) + chr(0b1000010 + 0o43) + chr(0b1100011) + chr(6679 - 6568) + '\x64' + chr(101))(chr(117) + chr(0b1110100) + '\x66' + '\055' + chr(0b100 + 0o64)) % (EoAKDwG4tkbe, S6EI_gyMl2nC)) NoZxuO7wjArS = kIMfkyypPTcC.vertex_count CsodZJH6x9Tx = nDF4gVNx0u9Q.asarray(CsodZJH6x9Tx) if ftfygxgFas5X(CsodZJH6x9Tx) != NoZxuO7wjArS: yGnyZM4lBnhJ = nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(758 - 710), 27446 - 27438) try: CsodZJH6x9Tx = CsodZJH6x9Tx[kIMfkyypPTcC.Ar0km3TBAurm] except zfo2Sgkz3IVJ: CsodZJH6x9Tx = None if CsodZJH6x9Tx is None: raise _1qUu0gKi9gH(roI3spqORKae(ES5oEprVxulp(b'\x1e\xd3c\xd6\xc8#7L\xa9\xd3h\xb5\x1a\xe1\xb2e\xf9\xec#\xc0\xef\xe6\xe1M\xa5\xf0:^\xd5\x14i'), chr(0b10 + 0o142) + '\x65' + chr(99) + '\157' + chr(0b1 + 0o143) + chr(4478 - 4377))('\x75' + chr(0b100001 + 0o123) + chr(0b100110 + 0o100) + chr(234 - 189) + chr(0b111000)) % (EoAKDwG4tkbe, ftfygxgFas5X(CsodZJH6x9Tx), NoZxuO7wjArS)) return CsodZJH6x9Tx
noahbenson/neuropythy
neuropythy/vision/retinotopy.py
as_retinotopy
def as_retinotopy(data, output_style='visual', units=Ellipsis, prefix=None, suffix=None): ''' as_retinotopy(data) converts the given data, if possible, into a 2-tuple, (polar_angle, eccen), both in degrees, with 0 degrees of polar angle corresponding to the upper vertical meridian and negative values corresponding to the left visual hemifield. as_retinotopy(data, output_style) yields the given retinotopy data in the given output_style; as_retinotopy(data) is equivalent to as_retinotopy(data, 'visual'). This function is intended as a general conversion routine between various sources of retinotopy data. All lookups are done in a case insensitive manner. Data may be specified in any of the following ways: * A cortical mesh containing recognized properties (such as 'polar_angle' and 'eccentricity' or 'latitude' and 'longitude'. * A dict with recognized fields. * A tuple of (polar_angle, eccentricity) (assumed to be in 'visual' style). * A numpy vector of complex numbers (assumed in 'complex' style). * An n x 2 or 2 x n matrix whose rows/columns are (polar_angle, eccentricity) values (assumed in 'visual' style). The following output_styles are accepted: * 'visual': polar-axis: upper vertical meridian positive-direction: clockwise fields: ['polar_angle' (degrees), 'eccentricity' (degrees)] * 'spherical': polar-axis: right horizontal meridian positive-direction: counter-clockwise fields: ['theta' (radians), 'rho' (radians)] * 'standard': polar-axis: right horizontal meridian positive-direction: counter-clockwise fields: ['angle' (radians), 'eccentricity' (degrees)] * 'cartesian': axes: x/y correspond to RHM/UVM positive-direction: left/up fields: ('x' (degrees), 'y' (degrees)) * 'geographical': axes: x/y correspond to RHM/UVM positive-direction: left/up fields: ('longitude' (degrees), 'latitude' (degrees)) * 'complex': axes: x/y correspond to RHM/UVM positive-direction: left/up fields: longitude (degrees) + I*latitude (degrees) * 'complex-rad': axes: x/y correspond to RHM/UVM positive-direction: left/up fields: longitude (radians) + I*latitude (radians) * 'visual-rad': polar-axis: upper vertical meridian positive-direction: clockwise fields: ['angle' (radians), 'eccentricity' (radians)] The following options may be given: * units (Ellipsis) specifies the unit that should be assumed (degrees or radians); if Ellipsis is given, then auto-detect the unit if possible. This may be a map whose keys are 'polar_angle' and 'eccentricity' (or the equivalent titles in data) and whose keys are the individual units. * prefix (None) specifies a prefix that is required for any keys or property names. * suffix (None) specifies a suffix that is required for any keys or property names. ''' # simple sanity check: output_style = output_style.lower() if output_style not in _retinotopy_style_fns: raise ValueError('Unrecognized output style: %s' % output_style) # First step: get the retinotopy into a format we can deal with easily if is_tuple(data) and len(data) == 2: data = {'polar_angle': data[0], 'eccentricity': data[1]} if isinstance(data, list): data = np.asarray(data) if pimms.is_nparray(data): if pimms.is_vector(data, np.complexfloating): data = {'complex': data} else: if data.shape[0] != 2: data = data.T data = {'polar_angle': data[0], 'eccentricity': data[1]} # We now assume that data is a dict type; or is a mesh; # figure out the data we have and make it into theta/rho if isinstance(data, geo.VertexSet): pnames = {k.lower():k for k in six.iterkeys(data.properties)} mem_dat = lambda k: k in pnames get_dat = lambda k: data.prop(pnames[k]) else: def _make_lambda(data,k): return lambda:data[k] data = pimms.lazy_map({k.lower():_make_lambda(data,k) for k in six.iterkeys(data)}) mem_dat = lambda k: k in data get_dat = lambda k: data[k] # Check in a particular order: suffix = '' if suffix is None else suffix.lower() prefix = '' if prefix is None else prefix.lower() (angle_key, eccen_key, x_key, y_key, z_key) = [ next((k for k in aliases if mem_dat(prefix + k + suffix)), None) for aliases in [['polar_angle', 'polar angle', 'angle', 'ang', 'polang', 'theta'], ['eccentricity', 'eccen', 'ecc', 'rho'], ['x', 'longitude', 'lon'], ['y', 'latitude', 'lat'], ['z', 'complex', 'complex-rad', 'coordinate']]] rad2deg = 180.0 / np.pi deg2rad = np.pi / 180.0 (hpi, dpi) = (np.pi / 2.0, np.pi * 2.0) if angle_key and eccen_key: akey = prefix + angle_key + suffix ekey = prefix + eccen_key + suffix theta = np.asarray(get_dat(akey)) rho = np.asarray(get_dat(ekey)) theta = theta * (deg2rad if _default_polar_angle_units[angle_key] == 'deg' else 1) rho = rho * (rad2deg if _default_eccentricity_units[eccen_key] == 'rad' else 1) if _default_polar_angle_axis[angle_key] == 'UVM': theta = theta - hpi if _default_polar_angle_dir[angle_key] == 'cw': theta = -theta ok = np.where(np.isfinite(theta))[0] theta[ok[theta[ok] < -np.pi]] += dpi theta[ok[theta[ok] > np.pi]] -= dpi elif x_key and y_key: (x,y) = [np.asarray(get_dat(prefix + k + suffix)) for k in [x_key, y_key]] if _default_x_units[x_key] == 'rad': x *= rad2deg if _default_y_units[y_key] == 'rad': y *= rad2deg theta = np.arctan2(y, x) rho = np.sqrt(x*x + y*y) elif z_key: z = get_dat(prefix + z_key + suffix) theta = np.angle(z) rho = np.abs(z) if _default_z_units[z_key] == 'rad': rho *= rad2deg else: raise ValueError('could not identify a valid retinotopic representation in data') # Now, we just have to convert to the requested output style f = _retinotopy_style_fns[output_style] return f(theta, rho)
python
def as_retinotopy(data, output_style='visual', units=Ellipsis, prefix=None, suffix=None): ''' as_retinotopy(data) converts the given data, if possible, into a 2-tuple, (polar_angle, eccen), both in degrees, with 0 degrees of polar angle corresponding to the upper vertical meridian and negative values corresponding to the left visual hemifield. as_retinotopy(data, output_style) yields the given retinotopy data in the given output_style; as_retinotopy(data) is equivalent to as_retinotopy(data, 'visual'). This function is intended as a general conversion routine between various sources of retinotopy data. All lookups are done in a case insensitive manner. Data may be specified in any of the following ways: * A cortical mesh containing recognized properties (such as 'polar_angle' and 'eccentricity' or 'latitude' and 'longitude'. * A dict with recognized fields. * A tuple of (polar_angle, eccentricity) (assumed to be in 'visual' style). * A numpy vector of complex numbers (assumed in 'complex' style). * An n x 2 or 2 x n matrix whose rows/columns are (polar_angle, eccentricity) values (assumed in 'visual' style). The following output_styles are accepted: * 'visual': polar-axis: upper vertical meridian positive-direction: clockwise fields: ['polar_angle' (degrees), 'eccentricity' (degrees)] * 'spherical': polar-axis: right horizontal meridian positive-direction: counter-clockwise fields: ['theta' (radians), 'rho' (radians)] * 'standard': polar-axis: right horizontal meridian positive-direction: counter-clockwise fields: ['angle' (radians), 'eccentricity' (degrees)] * 'cartesian': axes: x/y correspond to RHM/UVM positive-direction: left/up fields: ('x' (degrees), 'y' (degrees)) * 'geographical': axes: x/y correspond to RHM/UVM positive-direction: left/up fields: ('longitude' (degrees), 'latitude' (degrees)) * 'complex': axes: x/y correspond to RHM/UVM positive-direction: left/up fields: longitude (degrees) + I*latitude (degrees) * 'complex-rad': axes: x/y correspond to RHM/UVM positive-direction: left/up fields: longitude (radians) + I*latitude (radians) * 'visual-rad': polar-axis: upper vertical meridian positive-direction: clockwise fields: ['angle' (radians), 'eccentricity' (radians)] The following options may be given: * units (Ellipsis) specifies the unit that should be assumed (degrees or radians); if Ellipsis is given, then auto-detect the unit if possible. This may be a map whose keys are 'polar_angle' and 'eccentricity' (or the equivalent titles in data) and whose keys are the individual units. * prefix (None) specifies a prefix that is required for any keys or property names. * suffix (None) specifies a suffix that is required for any keys or property names. ''' # simple sanity check: output_style = output_style.lower() if output_style not in _retinotopy_style_fns: raise ValueError('Unrecognized output style: %s' % output_style) # First step: get the retinotopy into a format we can deal with easily if is_tuple(data) and len(data) == 2: data = {'polar_angle': data[0], 'eccentricity': data[1]} if isinstance(data, list): data = np.asarray(data) if pimms.is_nparray(data): if pimms.is_vector(data, np.complexfloating): data = {'complex': data} else: if data.shape[0] != 2: data = data.T data = {'polar_angle': data[0], 'eccentricity': data[1]} # We now assume that data is a dict type; or is a mesh; # figure out the data we have and make it into theta/rho if isinstance(data, geo.VertexSet): pnames = {k.lower():k for k in six.iterkeys(data.properties)} mem_dat = lambda k: k in pnames get_dat = lambda k: data.prop(pnames[k]) else: def _make_lambda(data,k): return lambda:data[k] data = pimms.lazy_map({k.lower():_make_lambda(data,k) for k in six.iterkeys(data)}) mem_dat = lambda k: k in data get_dat = lambda k: data[k] # Check in a particular order: suffix = '' if suffix is None else suffix.lower() prefix = '' if prefix is None else prefix.lower() (angle_key, eccen_key, x_key, y_key, z_key) = [ next((k for k in aliases if mem_dat(prefix + k + suffix)), None) for aliases in [['polar_angle', 'polar angle', 'angle', 'ang', 'polang', 'theta'], ['eccentricity', 'eccen', 'ecc', 'rho'], ['x', 'longitude', 'lon'], ['y', 'latitude', 'lat'], ['z', 'complex', 'complex-rad', 'coordinate']]] rad2deg = 180.0 / np.pi deg2rad = np.pi / 180.0 (hpi, dpi) = (np.pi / 2.0, np.pi * 2.0) if angle_key and eccen_key: akey = prefix + angle_key + suffix ekey = prefix + eccen_key + suffix theta = np.asarray(get_dat(akey)) rho = np.asarray(get_dat(ekey)) theta = theta * (deg2rad if _default_polar_angle_units[angle_key] == 'deg' else 1) rho = rho * (rad2deg if _default_eccentricity_units[eccen_key] == 'rad' else 1) if _default_polar_angle_axis[angle_key] == 'UVM': theta = theta - hpi if _default_polar_angle_dir[angle_key] == 'cw': theta = -theta ok = np.where(np.isfinite(theta))[0] theta[ok[theta[ok] < -np.pi]] += dpi theta[ok[theta[ok] > np.pi]] -= dpi elif x_key and y_key: (x,y) = [np.asarray(get_dat(prefix + k + suffix)) for k in [x_key, y_key]] if _default_x_units[x_key] == 'rad': x *= rad2deg if _default_y_units[y_key] == 'rad': y *= rad2deg theta = np.arctan2(y, x) rho = np.sqrt(x*x + y*y) elif z_key: z = get_dat(prefix + z_key + suffix) theta = np.angle(z) rho = np.abs(z) if _default_z_units[z_key] == 'rad': rho *= rad2deg else: raise ValueError('could not identify a valid retinotopic representation in data') # Now, we just have to convert to the requested output style f = _retinotopy_style_fns[output_style] return f(theta, rho)
[ "def", "as_retinotopy", "(", "data", ",", "output_style", "=", "'visual'", ",", "units", "=", "Ellipsis", ",", "prefix", "=", "None", ",", "suffix", "=", "None", ")", ":", "# simple sanity check:", "output_style", "=", "output_style", ".", "lower", "(", ")",...
as_retinotopy(data) converts the given data, if possible, into a 2-tuple, (polar_angle, eccen), both in degrees, with 0 degrees of polar angle corresponding to the upper vertical meridian and negative values corresponding to the left visual hemifield. as_retinotopy(data, output_style) yields the given retinotopy data in the given output_style; as_retinotopy(data) is equivalent to as_retinotopy(data, 'visual'). This function is intended as a general conversion routine between various sources of retinotopy data. All lookups are done in a case insensitive manner. Data may be specified in any of the following ways: * A cortical mesh containing recognized properties (such as 'polar_angle' and 'eccentricity' or 'latitude' and 'longitude'. * A dict with recognized fields. * A tuple of (polar_angle, eccentricity) (assumed to be in 'visual' style). * A numpy vector of complex numbers (assumed in 'complex' style). * An n x 2 or 2 x n matrix whose rows/columns are (polar_angle, eccentricity) values (assumed in 'visual' style). The following output_styles are accepted: * 'visual': polar-axis: upper vertical meridian positive-direction: clockwise fields: ['polar_angle' (degrees), 'eccentricity' (degrees)] * 'spherical': polar-axis: right horizontal meridian positive-direction: counter-clockwise fields: ['theta' (radians), 'rho' (radians)] * 'standard': polar-axis: right horizontal meridian positive-direction: counter-clockwise fields: ['angle' (radians), 'eccentricity' (degrees)] * 'cartesian': axes: x/y correspond to RHM/UVM positive-direction: left/up fields: ('x' (degrees), 'y' (degrees)) * 'geographical': axes: x/y correspond to RHM/UVM positive-direction: left/up fields: ('longitude' (degrees), 'latitude' (degrees)) * 'complex': axes: x/y correspond to RHM/UVM positive-direction: left/up fields: longitude (degrees) + I*latitude (degrees) * 'complex-rad': axes: x/y correspond to RHM/UVM positive-direction: left/up fields: longitude (radians) + I*latitude (radians) * 'visual-rad': polar-axis: upper vertical meridian positive-direction: clockwise fields: ['angle' (radians), 'eccentricity' (radians)] The following options may be given: * units (Ellipsis) specifies the unit that should be assumed (degrees or radians); if Ellipsis is given, then auto-detect the unit if possible. This may be a map whose keys are 'polar_angle' and 'eccentricity' (or the equivalent titles in data) and whose keys are the individual units. * prefix (None) specifies a prefix that is required for any keys or property names. * suffix (None) specifies a suffix that is required for any keys or property names.
[ "as_retinotopy", "(", "data", ")", "converts", "the", "given", "data", "if", "possible", "into", "a", "2", "-", "tuple", "(", "polar_angle", "eccen", ")", "both", "in", "degrees", "with", "0", "degrees", "of", "polar", "angle", "corresponding", "to", "the"...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/vision/retinotopy.py#L194-L312
train
This function converts the given data into a cortical mesh and returns the resulting data in the given output_style.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_H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tJqMV,typojWN5Phrq,gufQJgTAhMnI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(111) + '\063' + '\063' + '\x37', ord("\x08")), nzTpIcepk0o8('\060' + chr(1209 - 1098) + chr(2231 - 2180) + '\x32' + chr(0b110111 + 0o0), 0o10), nzTpIcepk0o8('\060' + chr(0b1010001 + 0o36) + chr(2337 - 2288) + chr(2228 - 2175) + '\060', 29836 - 29828), nzTpIcepk0o8(chr(1331 - 1283) + chr(0b101010 + 0o105) + '\062' + '\062' + '\x33', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(1467 - 1418) + chr(52) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(1363 - 1314) + chr(0b110110) + '\060', ord("\x08")), nzTpIcepk0o8('\060' + chr(4431 - 4320) + chr(55) + '\x31', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010 + 0o0) + chr(1522 - 1471) + chr(55), 56279 - 56271), nzTpIcepk0o8(chr(0b110 + 0o52) + '\157' + chr(2379 - 2326) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(2158 - 2110) + chr(111) + chr(0b11100 + 0o25) + chr(0b100111 + 0o14) + '\x32', 0o10), nzTpIcepk0o8('\x30' + chr(0b1010110 + 0o31) + chr(0b1000 + 0o52) + chr(0b110010) + chr(0b101101 + 0o6), 8), nzTpIcepk0o8('\060' + chr(0b1000000 + 0o57) + chr(1908 - 1856), 55237 - 55229), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110011) + chr(0b101101 + 0o7) + chr(2226 - 2175), ord("\x08")), nzTpIcepk0o8(chr(435 - 387) + chr(111) + chr(265 - 210) + '\066', 0b1000), nzTpIcepk0o8(chr(0b11001 + 0o27) + '\157' + '\x36' + chr(49), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b111100 + 0o63) + chr(2357 - 2308) + chr(0b110001) + chr(1726 - 1671), 37290 - 37282), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(754 - 704) + chr(0b11100 + 0o25) + chr(1504 - 1455), ord("\x08")), nzTpIcepk0o8(chr(854 - 806) + chr(10601 - 10490) + '\x32' + chr(1053 - 1004), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(51) + chr(48) + '\063', 11380 - 11372), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(50) + '\067', 8), nzTpIcepk0o8(chr(0b110000) + chr(4620 - 4509) + chr(1376 - 1325) + '\x33' + '\x34', 65033 - 65025), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\x6f' + chr(0b101110 + 0o3) + '\063' + chr(0b110100), 0b1000), nzTpIcepk0o8('\x30' + chr(5378 - 5267) + chr(0b1010 + 0o51) + '\x34' + chr(0b101101 + 0o5), 0b1000), nzTpIcepk0o8(chr(0b101010 + 0o6) + '\x6f' + chr(711 - 657) + '\064', 0b1000), nzTpIcepk0o8(chr(2197 - 2149) + chr(3863 - 3752) + chr(0b110011) + chr(0b110101) + '\x34', 0o10), nzTpIcepk0o8(chr(1736 - 1688) + chr(111) + '\062' + chr(50) + chr(0b1101 + 0o51), 38479 - 38471), nzTpIcepk0o8(chr(2063 - 2015) + '\157' + chr(0b10000 + 0o45) + '\x31', 0b1000), nzTpIcepk0o8(chr(968 - 920) + chr(0b1010011 + 0o34) + chr(49) + '\x31' + chr(0b101110 + 0o2), ord("\x08")), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(111) + chr(1108 - 1059) + chr(0b101111 + 0o2) + chr(0b110101), 38253 - 38245), nzTpIcepk0o8(chr(0b101101 + 0o3) + '\157' + '\062' + chr(54) + chr(0b110000), 23873 - 23865), nzTpIcepk0o8('\x30' + '\157' + chr(50) + chr(0b100101 + 0o20), 0o10), nzTpIcepk0o8('\x30' + chr(7369 - 7258) + chr(0b10 + 0o57) + '\065' + '\067', ord("\x08")), nzTpIcepk0o8(chr(285 - 237) + chr(0b1101111) + chr(0b101100 + 0o5) + chr(51) + chr(0b110001), 55505 - 55497), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49) + '\065' + chr(0b1001 + 0o50), ord("\x08")), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b1101111) + chr(52) + '\x30', 0b1000), nzTpIcepk0o8(chr(1594 - 1546) + '\x6f' + chr(0b110011) + chr(49) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + chr(0b100011 + 0o23) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b101110 + 0o2) + '\x6f' + chr(0b101111 + 0o3) + chr(2342 - 2293) + chr(0b110010), 0b1000), nzTpIcepk0o8('\060' + chr(0b1000000 + 0o57) + chr(0b100110 + 0o13) + '\064' + chr(0b110011), 9666 - 9658), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(0b110011 + 0o74) + chr(0b11100 + 0o25) + chr(0b110110) + chr(2439 - 2386), 55129 - 55121)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100110 + 0o17) + chr(1171 - 1123), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xf1'), '\144' + chr(101) + '\x63' + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(117) + '\164' + chr(102) + chr(1155 - 1110) + chr(1855 - 1799)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def q6MpE4pm_hbK(FfKOThdpoDTb, B2CM9GP9jVOC=roI3spqORKae(ES5oEprVxulp(b'\xa9\xbe\x1b\xe6\x01\x1c'), chr(0b1011010 + 0o12) + chr(0b1000001 + 0o44) + chr(8257 - 8158) + chr(443 - 332) + '\144' + chr(0b1100101))(chr(117) + '\164' + '\146' + chr(45) + chr(56)), M4fW_S7vN_Q_=RjQP07DYIdkf, ZJwZgaHE72Po=None, biRCFepsLie5=None): B2CM9GP9jVOC = B2CM9GP9jVOC.Xn8ENWMZdIRt() if B2CM9GP9jVOC not in nrh070ChNawm: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\x8a\xb9\x1a\xf6\x03\x1f^\xf1E \xf6`\xc3QD;\xf9d\xb7\xf7\xaf(\x9bX\x89\xac\tm>'), chr(100) + '\145' + chr(99) + '\157' + '\144' + chr(0b110011 + 0o62))(chr(0b1110101) + chr(7882 - 7766) + '\x66' + chr(1018 - 973) + chr(0b111000)) % B2CM9GP9jVOC) if kBeKB4Df6Zrm(FfKOThdpoDTb) and ftfygxgFas5X(FfKOThdpoDTb) == nzTpIcepk0o8(chr(0b1 + 0o57) + chr(111) + chr(0b110010), 50233 - 50225): FfKOThdpoDTb = {roI3spqORKae(ES5oEprVxulp(b'\xaf\xb8\x04\xf2\x12/X\xf1K6\xf6'), '\x64' + '\x65' + '\x63' + '\157' + '\x64' + chr(0b110100 + 0o61))('\165' + chr(0b1001 + 0o153) + '\146' + '\055' + '\x38'): FfKOThdpoDTb[nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b111101 + 0o62) + chr(48), ord("\x08"))], roI3spqORKae(ES5oEprVxulp(b'\xba\xb4\x0b\xf6\x0e\x04K\xf6O3\xe7}'), chr(6234 - 6134) + chr(0b1100101) + '\143' + chr(8378 - 8267) + chr(0b1011011 + 0o11) + chr(0b1100101))(chr(0b10001 + 0o144) + chr(0b1100010 + 0o22) + '\146' + chr(1842 - 1797) + chr(0b111000)): FfKOThdpoDTb[nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061', ord("\x08"))]} if suIjIS24Zkqw(FfKOThdpoDTb, H4NoA26ON7iG): FfKOThdpoDTb = nDF4gVNx0u9Q.asarray(FfKOThdpoDTb) if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xb6\xa47\xfd\x10\x11K\xedM#'), '\144' + '\x65' + chr(0b1011 + 0o130) + '\157' + chr(0b1100100) + chr(4314 - 4213))('\165' + chr(116) + '\x66' + chr(0b11100 + 0o21) + chr(0b100111 + 0o21)))(FfKOThdpoDTb): if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xb6\xa47\xe5\x05\x13M\xf0^'), chr(0b1100100) + chr(101) + chr(0b1000000 + 0o43) + chr(0b1101111) + '\x64' + '\x65')(chr(0b1110101) + '\164' + chr(0b1000110 + 0o40) + chr(1389 - 1344) + chr(0b100011 + 0o25)))(FfKOThdpoDTb, roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xbc\xb8\x05\xe3\x0c\x15A\xf9@5\xf2p\x8aPV'), '\144' + chr(101) + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(0b101010 + 0o73))(chr(0b1110000 + 0o5) + '\164' + chr(102) + chr(831 - 786) + '\x38'))): FfKOThdpoDTb = {roI3spqORKae(ES5oEprVxulp(b'\xbc\xb8\x05\xe3\x0c\x15A'), chr(100) + chr(0b1100101) + chr(0b1100011) + '\x6f' + chr(8577 - 8477) + chr(0b110111 + 0o56))('\x75' + chr(0b100 + 0o160) + chr(102) + chr(45) + '\x38'): FfKOThdpoDTb} else: if roI3spqORKae(FfKOThdpoDTb, roI3spqORKae(ES5oEprVxulp(b'\xb3\xbf\n\xdePI\x0b\xdej\r\xabb'), chr(0b1100100) + '\145' + chr(0b1001001 + 0o32) + chr(2223 - 2112) + '\x64' + chr(5083 - 4982))(chr(9863 - 9746) + '\x74' + '\x66' + chr(0b11110 + 0o17) + chr(56)))[nzTpIcepk0o8(chr(48) + chr(111) + '\x30', 8)] != nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010), 8): FfKOThdpoDTb = FfKOThdpoDTb.hq6XE4_Nhd6R FfKOThdpoDTb = {roI3spqORKae(ES5oEprVxulp(b'\xaf\xb8\x04\xf2\x12/X\xf1K6\xf6'), chr(100) + '\145' + '\143' + chr(111) + chr(100) + chr(101))(chr(0b1011000 + 0o35) + chr(2967 - 2851) + chr(102) + '\x2d' + chr(303 - 247)): FfKOThdpoDTb[nzTpIcepk0o8(chr(0b110000) + chr(0b1100 + 0o143) + chr(0b110000), 8)], roI3spqORKae(ES5oEprVxulp(b'\xba\xb4\x0b\xf6\x0e\x04K\xf6O3\xe7}'), chr(0b1111 + 0o125) + '\145' + '\143' + chr(0b1101111) + '\144' + chr(3036 - 2935))(chr(117) + chr(8408 - 8292) + chr(102) + chr(0b11011 + 0o22) + chr(0b111000)): FfKOThdpoDTb[nzTpIcepk0o8(chr(366 - 318) + chr(7040 - 6929) + chr(0b110001), 8)]} if suIjIS24Zkqw(FfKOThdpoDTb, roI3spqORKae(GZNMH8A4U3yp, roI3spqORKae(ES5oEprVxulp(b'\x89\xb2\x1a\xe7\x05\x08j\xfaX'), chr(0b1100100) + chr(101) + chr(99) + '\x6f' + chr(100) + chr(0b1000100 + 0o41))('\x75' + chr(116) + '\x66' + chr(0b101101) + chr(1063 - 1007)))): Rifrmox1LJWo = {B6UAF1zReOyJ.Xn8ENWMZdIRt(): B6UAF1zReOyJ for B6UAF1zReOyJ in YVS_F7_wWn_o.iterkeys(FfKOThdpoDTb.UtZvTnutzMHg)} def GYONwzo2LTCP(B6UAF1zReOyJ): return B6UAF1zReOyJ in Rifrmox1LJWo def nmWMfT78MPSW(B6UAF1zReOyJ): return roI3spqORKae(FfKOThdpoDTb, roI3spqORKae(ES5oEprVxulp(b'\xaf\xa5\x07\xe3'), chr(0b1100100) + '\x65' + chr(99) + chr(0b1101111) + chr(0b1100100) + '\145')('\x75' + '\164' + chr(0b1100110) + '\055' + '\070'))(Rifrmox1LJWo[B6UAF1zReOyJ]) else: def csa5oNZ6vbpl(FfKOThdpoDTb, B6UAF1zReOyJ): return lambda : FfKOThdpoDTb[B6UAF1zReOyJ] FfKOThdpoDTb = zAgo8354IlJ7.lazy_map({B6UAF1zReOyJ.Xn8ENWMZdIRt(): csa5oNZ6vbpl(FfKOThdpoDTb, B6UAF1zReOyJ) for B6UAF1zReOyJ in YVS_F7_wWn_o.iterkeys(FfKOThdpoDTb)}) def GYONwzo2LTCP(B6UAF1zReOyJ): return B6UAF1zReOyJ in FfKOThdpoDTb def nmWMfT78MPSW(B6UAF1zReOyJ): return FfKOThdpoDTb[B6UAF1zReOyJ] biRCFepsLie5 = roI3spqORKae(ES5oEprVxulp(b''), '\x64' + chr(0b1100101) + '\x63' + chr(8332 - 8221) + chr(0b11011 + 0o111) + '\145')(chr(4551 - 4434) + '\164' + chr(9498 - 9396) + '\x2d' + '\x38') if biRCFepsLie5 is None else biRCFepsLie5.Xn8ENWMZdIRt() ZJwZgaHE72Po = roI3spqORKae(ES5oEprVxulp(b''), '\144' + chr(101) + chr(0b1100001 + 0o2) + chr(1697 - 1586) + chr(5787 - 5687) + chr(8176 - 8075))(chr(9289 - 9172) + chr(0b0 + 0o164) + '\x66' + chr(1775 - 1730) + '\070') if ZJwZgaHE72Po is None else ZJwZgaHE72Po.Xn8ENWMZdIRt() (Hc4hjXHl9xKU, P7unxEtnxzay, Nm9CumRerZ5t, lzeoM7Q2ghw7, mtffKgk6pPit) = [ltB3XhPy2rYf((B6UAF1zReOyJ for B6UAF1zReOyJ in jEuYqBGFUpyY if GYONwzo2LTCP(ZJwZgaHE72Po + B6UAF1zReOyJ + biRCFepsLie5)), None) for jEuYqBGFUpyY in [[roI3spqORKae(ES5oEprVxulp(b'\xaf\xb8\x04\xf2\x12/X\xf1K6\xf6'), chr(0b100011 + 0o101) + chr(101) + chr(99) + chr(8630 - 8519) + '\x64' + chr(2978 - 2877))('\x75' + chr(0b1110100) + '\146' + chr(0b10110 + 0o27) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xaf\xb8\x04\xf2\x12PX\xf1K6\xf6'), chr(0b1100100) + '\x65' + chr(0b100101 + 0o76) + '\157' + chr(0b1100100) + chr(0b1111 + 0o126))('\x75' + chr(7702 - 7586) + '\146' + '\x2d' + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xbe\xb9\x0f\xff\x05'), chr(0b1100100) + chr(101) + '\143' + chr(0b1101111) + chr(0b1100100) + chr(3657 - 3556))(chr(0b1110101) + chr(0b110001 + 0o103) + chr(0b1100110) + '\055' + chr(0b101111 + 0o11)), roI3spqORKae(ES5oEprVxulp(b'\xbe\xb9\x0f'), '\x64' + chr(0b111001 + 0o54) + chr(0b1100011) + '\x6f' + chr(0b1100100) + chr(101))('\x75' + chr(12619 - 12503) + chr(0b1100110) + '\x2d' + chr(0b101001 + 0o17)), roI3spqORKae(ES5oEprVxulp(b'\xaf\xb8\x04\xf2\x0e\x17'), chr(100) + chr(0b1100101) + chr(0b11100 + 0o107) + chr(12284 - 12173) + chr(0b1100100) + chr(101))(chr(0b10011 + 0o142) + chr(769 - 653) + '\146' + chr(199 - 154) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xab\xbf\r\xe7\x01'), chr(0b1011 + 0o131) + chr(0b1100101) + '\x63' + chr(0b1 + 0o156) + chr(2465 - 2365) + chr(3437 - 3336))('\165' + '\x74' + chr(5248 - 5146) + chr(0b11100 + 0o21) + chr(56))], [roI3spqORKae(ES5oEprVxulp(b'\xba\xb4\x0b\xf6\x0e\x04K\xf6O3\xe7}'), chr(0b1100100) + chr(5316 - 5215) + '\143' + chr(111) + '\x64' + chr(101))('\x75' + '\164' + chr(0b1100110) + chr(0b101101) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xba\xb4\x0b\xf6\x0e'), chr(0b10011 + 0o121) + chr(0b11110 + 0o107) + '\143' + '\157' + '\x64' + chr(101))(chr(8010 - 7893) + '\x74' + chr(9020 - 8918) + chr(631 - 586) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\xba\xb4\x0b'), chr(0b1100011 + 0o1) + chr(0b1100101) + chr(99) + chr(111) + '\x64' + chr(0b1100101))(chr(3722 - 3605) + chr(8395 - 8279) + '\x66' + chr(45) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\xad\xbf\x07'), chr(0b1011111 + 0o5) + '\x65' + chr(99) + '\x6f' + chr(0b1100100) + chr(101))('\165' + chr(0b111001 + 0o73) + chr(0b1100110) + '\055' + chr(0b111000))], [roI3spqORKae(ES5oEprVxulp(b'\xa7'), '\144' + chr(886 - 785) + chr(0b1 + 0o142) + chr(0b1101111) + chr(0b1001100 + 0o30) + '\x65')('\x75' + chr(5056 - 4940) + '\x66' + chr(45) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\xb3\xb8\x06\xf4\t\x04L\xfbI'), chr(0b1100100) + chr(0b1010101 + 0o20) + '\x63' + '\x6f' + chr(0b11011 + 0o111) + chr(388 - 287))(chr(0b11011 + 0o132) + chr(0b1110100) + chr(0b1100110) + chr(45) + chr(547 - 491)), roI3spqORKae(ES5oEprVxulp(b'\xb3\xb8\x06'), '\x64' + chr(0b1010100 + 0o21) + chr(3499 - 3400) + '\x6f' + chr(100) + chr(4682 - 4581))('\165' + chr(6301 - 6185) + chr(4998 - 4896) + '\x2d' + chr(56))], [roI3spqORKae(ES5oEprVxulp(b'\xa6'), chr(0b1000001 + 0o43) + chr(0b1100101) + chr(0b1100011) + chr(3493 - 3382) + '\144' + '\x65')(chr(9858 - 9741) + chr(0b1110100) + '\146' + '\055' + '\070'), roI3spqORKae(ES5oEprVxulp(b'\xb3\xb6\x1c\xfa\x14\x05]\xfa'), chr(100) + '\145' + '\143' + chr(111) + chr(0b1100100) + chr(101))(chr(8181 - 8064) + chr(116) + chr(102) + chr(45) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\xb3\xb6\x1c'), '\144' + '\145' + chr(99) + '\x6f' + chr(0b1100100) + chr(0b1100101))(chr(0b1100001 + 0o24) + chr(116) + chr(413 - 311) + chr(0b101101) + chr(0b111000))], [roI3spqORKae(ES5oEprVxulp(b'\xa5'), chr(2959 - 2859) + chr(9551 - 9450) + chr(6179 - 6080) + chr(667 - 556) + chr(100) + chr(0b1100101))('\165' + chr(3932 - 3816) + '\x66' + chr(1927 - 1882) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\xbc\xb8\x05\xe3\x0c\x15A'), chr(0b1100100) + '\145' + chr(0b1100011) + chr(0b110010 + 0o75) + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(6690 - 6574) + '\146' + chr(1050 - 1005) + chr(1612 - 1556)), roI3spqORKae(ES5oEprVxulp(b'\xbc\xb8\x05\xe3\x0c\x15A\xb2^;\xf7'), chr(0b1100100) + chr(0b1100101) + '\x63' + '\x6f' + chr(0b1100100) + '\x65')('\165' + chr(0b1110100) + '\146' + chr(0b101101) + chr(0b1110 + 0o52)), roI3spqORKae(ES5oEprVxulp(b'\xbc\xb8\x07\xe1\x04\x19W\xfeX?'), '\144' + chr(0b1100101) + '\x63' + '\x6f' + chr(100) + '\x65')(chr(3222 - 3105) + '\x74' + chr(0b1100110) + chr(45) + chr(56))]]] irab15XZSx6z = 180.0 / nDF4gVNx0u9Q.nMrXkRpTQ9Oo PtmnML1QRXcz = nDF4gVNx0u9Q.nMrXkRpTQ9Oo / 180.0 (LEsmNKBD7se0, tBMIUInSaqoo) = (nDF4gVNx0u9Q.nMrXkRpTQ9Oo / 2.0, nDF4gVNx0u9Q.nMrXkRpTQ9Oo * 2.0) if Hc4hjXHl9xKU and P7unxEtnxzay: aKnxAeg1pN6F = ZJwZgaHE72Po + Hc4hjXHl9xKU + biRCFepsLie5 YcIQOwi8zPRe = ZJwZgaHE72Po + P7unxEtnxzay + biRCFepsLie5 ncDYK9LWVfBn = nDF4gVNx0u9Q.asarray(nmWMfT78MPSW(aKnxAeg1pN6F)) z3dq0HzhOM4T = nDF4gVNx0u9Q.asarray(nmWMfT78MPSW(YcIQOwi8zPRe)) ncDYK9LWVfBn = ncDYK9LWVfBn * (PtmnML1QRXcz if xVdLgS7X9rGF[Hc4hjXHl9xKU] == roI3spqORKae(ES5oEprVxulp(b'\xbb\xb2\x0f'), chr(9647 - 9547) + chr(0b1010000 + 0o25) + '\143' + chr(5507 - 5396) + '\144' + chr(101))(chr(0b1101110 + 0o7) + chr(0b1110100) + chr(5563 - 5461) + '\055' + chr(0b100000 + 0o30)) else nzTpIcepk0o8('\060' + chr(10775 - 10664) + chr(2247 - 2198), 8)) z3dq0HzhOM4T = z3dq0HzhOM4T * (irab15XZSx6z if RYffvMJ2xdcG[P7unxEtnxzay] == roI3spqORKae(ES5oEprVxulp(b'\xad\xb6\x0c'), chr(0b1100100) + '\145' + '\143' + chr(0b1101111) + chr(0b11011 + 0o111) + '\x65')(chr(0b101000 + 0o115) + chr(0b1110100) + chr(0b1000100 + 0o42) + '\x2d' + chr(2891 - 2835)) else nzTpIcepk0o8(chr(48) + chr(3051 - 2940) + chr(0b110001), 8)) if uJjwfTsfPhGd[Hc4hjXHl9xKU] == roI3spqORKae(ES5oEprVxulp(b'\x8a\x81%'), chr(2025 - 1925) + '\145' + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(0b1000000 + 0o46) + chr(565 - 520) + chr(0b110111 + 0o1)): ncDYK9LWVfBn = ncDYK9LWVfBn - LEsmNKBD7se0 if qdIVXYVn_AI5[Hc4hjXHl9xKU] == roI3spqORKae(ES5oEprVxulp(b'\xbc\xa0'), chr(0b1011 + 0o131) + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(7033 - 6933) + '\145')(chr(0b1110101) + chr(0b110101 + 0o77) + '\x66' + chr(0b101101) + chr(0b111000)): ncDYK9LWVfBn = -ncDYK9LWVfBn arcyz8y9ckuT = nDF4gVNx0u9Q.xWH4M7K6Qbd3(nDF4gVNx0u9Q.AWxpWpGwxU15(ncDYK9LWVfBn))[nzTpIcepk0o8('\x30' + chr(4551 - 4440) + '\060', 8)] ncDYK9LWVfBn[arcyz8y9ckuT[ncDYK9LWVfBn[arcyz8y9ckuT] < -nDF4gVNx0u9Q.nMrXkRpTQ9Oo]] += tBMIUInSaqoo ncDYK9LWVfBn[arcyz8y9ckuT[ncDYK9LWVfBn[arcyz8y9ckuT] > nDF4gVNx0u9Q.nMrXkRpTQ9Oo]] -= tBMIUInSaqoo elif Nm9CumRerZ5t and lzeoM7Q2ghw7: (bI5jsQ9OkQtj, Fi3yzxctM1zW) = [nDF4gVNx0u9Q.asarray(nmWMfT78MPSW(ZJwZgaHE72Po + B6UAF1zReOyJ + biRCFepsLie5)) for B6UAF1zReOyJ in [Nm9CumRerZ5t, lzeoM7Q2ghw7]] if sgXzzrw3X7H6[Nm9CumRerZ5t] == roI3spqORKae(ES5oEprVxulp(b'\xad\xb6\x0c'), '\144' + '\x65' + chr(0b1001000 + 0o33) + chr(0b1011011 + 0o24) + chr(100) + chr(2686 - 2585))('\165' + '\164' + '\x66' + chr(1385 - 1340) + '\x38'): bI5jsQ9OkQtj *= irab15XZSx6z if YH2xxFsNrfA9[lzeoM7Q2ghw7] == roI3spqORKae(ES5oEprVxulp(b'\xad\xb6\x0c'), chr(100) + '\x65' + '\x63' + chr(111) + chr(0b100000 + 0o104) + chr(101))('\x75' + '\164' + chr(3127 - 3025) + chr(0b101101) + chr(0b1000 + 0o60)): Fi3yzxctM1zW *= irab15XZSx6z ncDYK9LWVfBn = nDF4gVNx0u9Q.arctan2(Fi3yzxctM1zW, bI5jsQ9OkQtj) z3dq0HzhOM4T = nDF4gVNx0u9Q.sqrt(bI5jsQ9OkQtj * bI5jsQ9OkQtj + Fi3yzxctM1zW * Fi3yzxctM1zW) elif mtffKgk6pPit: ZkpORfAzQ9Hw = nmWMfT78MPSW(ZJwZgaHE72Po + mtffKgk6pPit + biRCFepsLie5) ncDYK9LWVfBn = nDF4gVNx0u9Q.angle(ZkpORfAzQ9Hw) z3dq0HzhOM4T = nDF4gVNx0u9Q.zQBGwUT7UU8L(ZkpORfAzQ9Hw) if XYlx27mdZttK[mtffKgk6pPit] == roI3spqORKae(ES5oEprVxulp(b'\xad\xb6\x0c'), chr(4102 - 4002) + chr(0b1001110 + 0o27) + chr(0b1000001 + 0o42) + '\x6f' + '\x64' + chr(526 - 425))('\165' + '\164' + '\146' + '\055' + '\x38'): z3dq0HzhOM4T *= irab15XZSx6z else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xbc\xb8\x1d\xff\x04PW\xf0Xz\xfa`\x86PE&\xefh\xe3\xb6\xfc*\x83X\x85\xf2\t:(\xc4|\x016\x1dO\xbd\x9d\xe9C\x07\xba\xa7\x1a\xf6\x13\x15W\xebM.\xfak\x8d\x1eX!\xa9u\xa2\xa3\xbd'), '\144' + chr(0b10010 + 0o123) + chr(99) + chr(111) + '\144' + chr(0b111100 + 0o51))(chr(10998 - 10881) + chr(0b100 + 0o160) + '\146' + '\x2d' + chr(329 - 273))) _R8IKF5IwAfX = nrh070ChNawm[B2CM9GP9jVOC] return _R8IKF5IwAfX(ncDYK9LWVfBn, z3dq0HzhOM4T)
noahbenson/neuropythy
neuropythy/vision/retinotopy.py
retinotopy_data
def retinotopy_data(m, source='any'): ''' retinotopy_data(m) yields a dict containing a retinotopy dataset with the keys 'polar_angle', 'eccentricity', and any other related fields for the given retinotopy type; for example, 'pRF_size' and 'variance_explained' may be included for measured retinotopy datasets and 'visual_area' may be included for atlas or model datasets. The coordinates are always in the 'visual' retinotopy style, but can be reinterpreted with as_retinotopy. retinotopy_data(m, source) may be used to specify a particular source for the data; this may be either 'empirical', 'model', or 'any'; or it may be a prefix/suffix beginning/ending with an _ character. ''' if pimms.is_map(source): if all(k in source for k in ['polar_angle', 'eccentricity']): return source if geo.is_vset(m): return retinotopy_data(m.properties, source=source) source = source.lower() model_rets = ['predicted', 'model', 'template', 'atlas', 'inferred'] empir_rets = ['empirical', 'measured', 'prf', 'data'] wild = False extra_fields = {'empirical':('radius','variance_explained'), 'model':('radius','visual_area')} check_fields = [] if source in empir_rets: fixes = empir_rets check_fields = extra_fields['empirical'] elif source in model_rets: fixes = model_rets check_fields = extra_fields['model'] elif source in ['any', '*', 'all']: fixes = model_rets + empir_rets check_fields = extra_fields['model'] + extra_fields['empirical'] wild = True elif source in ['none', 'basic']: fixes = [] check_fields = extra_fields['model'] + extra_fields['empirical'] wild = True else: fixes = [] # first, try all the fixes as prefixes then suffixes (z, prefix, suffix) = (None, None, None) if wild: try: z = as_retinotopy(m, 'visual') except Exception: pass for fix in fixes: if z: break try: z = as_retinotopy(m, 'visual', prefix=(fix + '_')) prefix = fix + '_' except Exception: pass for fix in fixes: if z: break try: z = as_retinotopy(m, 'visual', suffix=('_' + fix)) suffix = fix + '_' except Exception: pass # if none of those worked, try with no prefix/suffix if not z: try: pref = source if source.endswith('_') else (source + '_') z = as_retinotopy(m, 'visual', prefix=pref) prefix = pref check_fields = extra_fields['model'] + extra_fields['empirical'] except Exception: raise try: suff = source if source.startswith('_') else ('_' + source) z = as_retinotopy(m, 'visual', suffix=suff) suffix = suff check_fields = extra_fields['model'] + extra_fields['empirical'] except Exception: pass # if still not z... we couldn't figure it out if not z: raise ValueError('Could not find an interpretation for source %s' % source) # okay, we found it; make it into a dict res = {'polar_angle': z[0], 'eccentricity': z[1]} # check for extra fields if relevant pnames = {k.lower():k for k in m} if check_fields else {} for fname in set(check_fields): for (aliases, trfn) in retinotopic_property_aliases.get(fname, []): if trfn is None: trfn = lambda x:x for f in aliases: if prefix: f = prefix + f if suffix: f = f + suffix f = f.lower() if f in pnames: res[fname] = trfn(m[pnames[f]]) trfn = None break if trfn is None: break # That's it return res
python
def retinotopy_data(m, source='any'): ''' retinotopy_data(m) yields a dict containing a retinotopy dataset with the keys 'polar_angle', 'eccentricity', and any other related fields for the given retinotopy type; for example, 'pRF_size' and 'variance_explained' may be included for measured retinotopy datasets and 'visual_area' may be included for atlas or model datasets. The coordinates are always in the 'visual' retinotopy style, but can be reinterpreted with as_retinotopy. retinotopy_data(m, source) may be used to specify a particular source for the data; this may be either 'empirical', 'model', or 'any'; or it may be a prefix/suffix beginning/ending with an _ character. ''' if pimms.is_map(source): if all(k in source for k in ['polar_angle', 'eccentricity']): return source if geo.is_vset(m): return retinotopy_data(m.properties, source=source) source = source.lower() model_rets = ['predicted', 'model', 'template', 'atlas', 'inferred'] empir_rets = ['empirical', 'measured', 'prf', 'data'] wild = False extra_fields = {'empirical':('radius','variance_explained'), 'model':('radius','visual_area')} check_fields = [] if source in empir_rets: fixes = empir_rets check_fields = extra_fields['empirical'] elif source in model_rets: fixes = model_rets check_fields = extra_fields['model'] elif source in ['any', '*', 'all']: fixes = model_rets + empir_rets check_fields = extra_fields['model'] + extra_fields['empirical'] wild = True elif source in ['none', 'basic']: fixes = [] check_fields = extra_fields['model'] + extra_fields['empirical'] wild = True else: fixes = [] # first, try all the fixes as prefixes then suffixes (z, prefix, suffix) = (None, None, None) if wild: try: z = as_retinotopy(m, 'visual') except Exception: pass for fix in fixes: if z: break try: z = as_retinotopy(m, 'visual', prefix=(fix + '_')) prefix = fix + '_' except Exception: pass for fix in fixes: if z: break try: z = as_retinotopy(m, 'visual', suffix=('_' + fix)) suffix = fix + '_' except Exception: pass # if none of those worked, try with no prefix/suffix if not z: try: pref = source if source.endswith('_') else (source + '_') z = as_retinotopy(m, 'visual', prefix=pref) prefix = pref check_fields = extra_fields['model'] + extra_fields['empirical'] except Exception: raise try: suff = source if source.startswith('_') else ('_' + source) z = as_retinotopy(m, 'visual', suffix=suff) suffix = suff check_fields = extra_fields['model'] + extra_fields['empirical'] except Exception: pass # if still not z... we couldn't figure it out if not z: raise ValueError('Could not find an interpretation for source %s' % source) # okay, we found it; make it into a dict res = {'polar_angle': z[0], 'eccentricity': z[1]} # check for extra fields if relevant pnames = {k.lower():k for k in m} if check_fields else {} for fname in set(check_fields): for (aliases, trfn) in retinotopic_property_aliases.get(fname, []): if trfn is None: trfn = lambda x:x for f in aliases: if prefix: f = prefix + f if suffix: f = f + suffix f = f.lower() if f in pnames: res[fname] = trfn(m[pnames[f]]) trfn = None break if trfn is None: break # That's it return res
[ "def", "retinotopy_data", "(", "m", ",", "source", "=", "'any'", ")", ":", "if", "pimms", ".", "is_map", "(", "source", ")", ":", "if", "all", "(", "k", "in", "source", "for", "k", "in", "[", "'polar_angle'", ",", "'eccentricity'", "]", ")", ":", "...
retinotopy_data(m) yields a dict containing a retinotopy dataset with the keys 'polar_angle', 'eccentricity', and any other related fields for the given retinotopy type; for example, 'pRF_size' and 'variance_explained' may be included for measured retinotopy datasets and 'visual_area' may be included for atlas or model datasets. The coordinates are always in the 'visual' retinotopy style, but can be reinterpreted with as_retinotopy. retinotopy_data(m, source) may be used to specify a particular source for the data; this may be either 'empirical', 'model', or 'any'; or it may be a prefix/suffix beginning/ending with an _ character.
[ "retinotopy_data", "(", "m", ")", "yields", "a", "dict", "containing", "a", "retinotopy", "dataset", "with", "the", "keys", "polar_angle", "eccentricity", "and", "any", "other", "related", "fields", "for", "the", "given", "retinotopy", "type", ";", "for", "exa...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/vision/retinotopy.py#L330-L416
train
Returns a dictionary containing the data for the given source.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVy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NyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\062' + chr(0b110111) + chr(50), 54078 - 54070), nzTpIcepk0o8('\060' + chr(0b1101001 + 0o6) + chr(0b100001 + 0o21) + '\x35' + chr(494 - 446), ord("\x08")), nzTpIcepk0o8(chr(267 - 219) + '\157' + chr(0b100001 + 0o21) + '\x37' + '\x34', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(865 - 814) + chr(50) + '\x32', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110101), 27795 - 27787), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b1101111) + chr(2387 - 2336), 0b1000), nzTpIcepk0o8(chr(200 - 152) + chr(0b1101110 + 0o1) + chr(0b100000 + 0o23) + chr(54) + '\065', 0b1000), nzTpIcepk0o8(chr(1578 - 1530) + chr(0b1101111) + chr(221 - 168) + chr(0b100110 + 0o21), 0b1000), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b11100 + 0o123) + chr(0b110011) + chr(330 - 279) + '\065', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(51) + chr(0b110111) + '\060', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(1932 - 1882) + chr(0b110001) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(1142 - 1094) + chr(3054 - 2943) + chr(0b110001) + chr(50), 0o10), nzTpIcepk0o8('\x30' + chr(0b11011 + 0o124) + '\063' + chr(0b110101) + chr(0b110011 + 0o1), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + '\062' + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1951 - 1902) + chr(0b110 + 0o54) + chr(136 - 83), 13130 - 13122), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(2931 - 2820) + '\062' + chr(0b101111 + 0o2) + chr(995 - 945), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + chr(0b1 + 0o57) + chr(1245 - 1196), 44966 - 44958), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + chr(943 - 889) + chr(0b10100 + 0o34), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b1100 + 0o45) + '\x37' + '\x32', 17228 - 17220), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(111) + '\062' + '\061' + chr(0b100001 + 0o17), 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b100000 + 0o21) + chr(0b110101) + chr(0b11 + 0o61), 0b1000), nzTpIcepk0o8('\x30' + chr(11318 - 11207) + chr(0b10011 + 0o40) + chr(1129 - 1076) + chr(0b110100), 8), nzTpIcepk0o8('\060' + '\x6f' + '\061' + chr(0b100001 + 0o20) + chr(50), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1001100 + 0o43) + '\061' + '\x35' + chr(0b101010 + 0o6), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b110101 + 0o72) + '\061' + '\x37' + '\067', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b101110 + 0o3) + chr(1801 - 1749) + chr(0b110100), 3322 - 3314), nzTpIcepk0o8('\060' + chr(111) + '\062' + '\x33' + '\060', 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110011) + chr(0b110010) + chr(0b1101 + 0o51), 0b1000), nzTpIcepk0o8(chr(833 - 785) + '\157' + chr(50) + chr(0b1110 + 0o42) + '\x36', 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b110111) + chr(0b10001 + 0o42), 0o10), nzTpIcepk0o8(chr(0b10 + 0o56) + '\x6f' + '\x36' + '\063', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(50), 29565 - 29557), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + chr(0b110110 + 0o1) + chr(0b110010), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(49) + chr(0b110111) + chr(0b110100 + 0o2), 59179 - 59171), nzTpIcepk0o8(chr(203 - 155) + chr(111) + '\066' + chr(52), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1010111 + 0o30) + '\x31' + chr(0b110110) + '\x34', 30008 - 30000), nzTpIcepk0o8(chr(48) + chr(2995 - 2884) + chr(1391 - 1340) + chr(0b11010 + 0o30) + '\067', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(864 - 814) + chr(52) + chr(0b10111 + 0o35), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(162 - 111) + chr(0b10110 + 0o34) + chr(55), 8), nzTpIcepk0o8('\x30' + chr(10683 - 10572) + chr(51) + chr(2562 - 2511) + chr(54), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(111) + '\x35' + chr(48), 55423 - 55415)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x94'), chr(0b100011 + 0o101) + chr(0b10001 + 0o124) + chr(0b1001110 + 0o25) + '\x6f' + chr(9453 - 9353) + '\145')(chr(117) + chr(0b111000 + 0o74) + chr(0b1100110) + chr(1647 - 1602) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def CTw69XTnIqxx(tF75nqoNENFL, TRsEnjL8YDa6=roI3spqORKae(ES5oEprVxulp(b'\xdb\xc6\xc5'), chr(100) + chr(0b1100101) + chr(99) + '\x6f' + '\x64' + chr(0b1100101))('\165' + chr(0b1110100) + chr(102) + '\x2d' + chr(0b110111 + 0o1))): if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xd3\xdb\xe3\xbfds'), chr(0b1100100) + '\x65' + chr(2255 - 2156) + '\157' + '\x64' + chr(0b1010110 + 0o17))('\165' + chr(0b1110100) + '\146' + '\x2d' + chr(741 - 685)))(TRsEnjL8YDa6): if qX60lO1lgHA5((B6UAF1zReOyJ in TRsEnjL8YDa6 for B6UAF1zReOyJ in [roI3spqORKae(ES5oEprVxulp(b'\xca\xc7\xd0\xb3w\\\x94A\xba\x94\xed'), chr(100) + chr(8112 - 8011) + chr(99) + '\157' + '\x64' + '\145')('\x75' + '\164' + chr(102) + chr(45) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\xdf\xcb\xdf\xb7kw\x87F\xbe\x91\xfcs'), '\144' + chr(101) + chr(0b111100 + 0o47) + chr(0b10101 + 0o132) + chr(100) + chr(589 - 488))(chr(0b1110000 + 0o5) + chr(0b1110100) + chr(0b1100110) + chr(0b100011 + 0o12) + chr(0b1110 + 0o52))])): return TRsEnjL8YDa6 if roI3spqORKae(GZNMH8A4U3yp, roI3spqORKae(ES5oEprVxulp(b'\xd3\xdb\xe3\xa4vf\x81'), chr(0b1100100) + chr(101) + chr(6986 - 6887) + '\157' + '\x64' + '\145')(chr(0b1011110 + 0o27) + chr(116) + chr(0b1100110) + '\x2d' + '\070'))(tF75nqoNENFL): return CTw69XTnIqxx(roI3spqORKae(tF75nqoNENFL, roI3spqORKae(ES5oEprVxulp(b'\xef\xdc\xe6\xa4Qm\x80[\xa7\xb5\xc0m'), chr(100) + chr(101) + '\x63' + chr(0b111111 + 0o60) + '\144' + '\x65')(chr(0b1110101) + chr(11234 - 11118) + chr(3540 - 3438) + '\x2d' + '\070')), source=TRsEnjL8YDa6) TRsEnjL8YDa6 = TRsEnjL8YDa6.Xn8ENWMZdIRt() X35P9BHAdreX = [roI3spqORKae(ES5oEprVxulp(b'\xca\xda\xd9\xb6l`\x81J\xb9'), chr(0b101010 + 0o72) + '\145' + chr(0b111110 + 0o45) + '\x6f' + chr(3963 - 3863) + chr(101))('\165' + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\xd7\xc7\xd8\xb7i'), '\144' + chr(0b111111 + 0o46) + chr(0b1100011) + chr(0b100000 + 0o117) + '\144' + chr(0b1010100 + 0o21))(chr(0b110110 + 0o77) + chr(116) + chr(102) + chr(45) + '\070'), roI3spqORKae(ES5oEprVxulp(b'\xce\xcd\xd1\xa2ib\x81J'), chr(100) + '\145' + chr(4542 - 4443) + chr(0b1101111) + chr(6723 - 6623) + '\x65')(chr(0b10011 + 0o142) + chr(3835 - 3719) + chr(0b1100110) + '\x2d' + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\xdb\xdc\xd0\xb3v'), chr(0b1100100) + '\x65' + chr(0b1001 + 0o132) + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(0b1010100 + 0o41) + '\164' + '\x66' + chr(0b101101) + chr(0b0 + 0o70)), roI3spqORKae(ES5oEprVxulp(b'\xd3\xc6\xda\xb7wq\x90K'), chr(100) + chr(101) + chr(99) + chr(111) + chr(100) + chr(8289 - 8188))('\165' + chr(116) + chr(0b1100110) + '\055' + '\070')] BOp1lkG2ihOI = [roI3spqORKae(ES5oEprVxulp(b'\xdf\xc5\xcc\xbbwj\x96N\xb1'), '\144' + chr(0b10111 + 0o116) + chr(2102 - 2003) + '\x6f' + '\144' + chr(101))('\165' + '\164' + '\146' + '\x2d' + '\070'), roI3spqORKae(ES5oEprVxulp(b'\xd7\xcd\xdd\xa1pq\x90K'), '\x64' + '\145' + '\143' + chr(0b1101111) + '\144' + chr(0b1011101 + 0o10))(chr(731 - 614) + '\x74' + chr(0b111011 + 0o53) + chr(45) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\xca\xda\xda'), chr(0b1100100) + chr(101) + chr(99) + '\x6f' + '\x64' + chr(101))('\x75' + chr(0b1001111 + 0o45) + chr(102) + '\x2d' + chr(574 - 518)), roI3spqORKae(ES5oEprVxulp(b'\xde\xc9\xc8\xb3'), '\x64' + chr(0b1001000 + 0o35) + chr(0b1100011) + chr(0b100100 + 0o113) + '\144' + chr(0b110110 + 0o57))(chr(117) + '\x74' + '\x66' + chr(0b101101) + chr(56))] v0rEqS0IDfa3 = nzTpIcepk0o8(chr(1598 - 1550) + chr(0b1101111) + chr(0b110000), ord("\x08")) W_rVuVdsHzls = {roI3spqORKae(ES5oEprVxulp(b'\xdf\xc5\xcc\xbbwj\x96N\xb1'), chr(8384 - 8284) + chr(470 - 369) + chr(0b110101 + 0o56) + chr(111) + chr(1156 - 1056) + chr(3584 - 3483))('\165' + '\x74' + chr(0b1100110) + '\055' + chr(56)): (roI3spqORKae(ES5oEprVxulp(b'\xc8\xc9\xd8\xbbpp'), chr(0b1010 + 0o132) + chr(9332 - 9231) + '\143' + chr(0b1101111) + chr(0b1100100) + chr(0b1010101 + 0o20))('\165' + chr(0b1 + 0o163) + chr(102) + chr(551 - 506) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xcc\xc9\xce\xbbdm\x96J\x82\x9d\xf0z\x80\xb0<\xe4\xe4\x14'), chr(0b1100100) + chr(0b1010011 + 0o22) + chr(99) + chr(437 - 326) + chr(100) + '\x65')(chr(117) + '\x74' + chr(0b1100110) + chr(0b11001 + 0o24) + chr(56))), roI3spqORKae(ES5oEprVxulp(b'\xd7\xc7\xd8\xb7i'), chr(100) + '\x65' + chr(5522 - 5423) + chr(0b10111 + 0o130) + chr(0b1100100) + chr(101))(chr(0b1110101) + '\x74' + '\x66' + '\055' + chr(0b111000)): (roI3spqORKae(ES5oEprVxulp(b'\xc8\xc9\xd8\xbbpp'), '\x64' + chr(0b1100101) + '\143' + chr(0b1101111) + '\x64' + chr(101))(chr(8978 - 8861) + chr(0b1110100) + chr(0b11111 + 0o107) + '\055' + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xcc\xc1\xcf\xa7do\xaaN\xaf\x9d\xe9'), chr(0b1011101 + 0o7) + chr(0b101 + 0o140) + chr(2200 - 2101) + chr(111) + chr(4878 - 4778) + chr(101))('\165' + chr(0b100011 + 0o121) + '\146' + chr(0b11110 + 0o17) + chr(2493 - 2437)))} KCQVdCVKfN4Z = [] if TRsEnjL8YDa6 in BOp1lkG2ihOI: UHHy9vqdUE_1 = BOp1lkG2ihOI KCQVdCVKfN4Z = W_rVuVdsHzls[roI3spqORKae(ES5oEprVxulp(b'\xdf\xc5\xcc\xbbwj\x96N\xb1'), '\x64' + chr(0b1011101 + 0o10) + chr(0b1100011) + '\x6f' + chr(0b1100100) + chr(101))(chr(12868 - 12751) + '\164' + chr(0b1100110) + '\055' + '\070')] elif TRsEnjL8YDa6 in X35P9BHAdreX: UHHy9vqdUE_1 = X35P9BHAdreX KCQVdCVKfN4Z = W_rVuVdsHzls[roI3spqORKae(ES5oEprVxulp(b'\xd7\xc7\xd8\xb7i'), chr(2416 - 2316) + chr(0b100001 + 0o104) + chr(0b101001 + 0o72) + '\157' + '\x64' + chr(10126 - 10025))(chr(1706 - 1589) + chr(0b1011 + 0o151) + chr(102) + chr(0b11110 + 0o17) + '\x38')] elif TRsEnjL8YDa6 in [roI3spqORKae(ES5oEprVxulp(b'\xdb\xc6\xc5'), chr(1767 - 1667) + chr(0b1100101) + chr(99) + chr(0b1101111) + chr(0b1001101 + 0o27) + chr(0b1010011 + 0o22))(chr(117) + '\164' + chr(102) + '\055' + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\x90'), chr(0b110101 + 0o57) + chr(0b1100101) + chr(99) + chr(0b1010111 + 0o30) + '\144' + chr(0b1100100 + 0o1))(chr(0b1110101) + chr(116) + chr(102) + '\055' + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xdb\xc4\xd0'), chr(0b1100100) + chr(1528 - 1427) + '\x63' + chr(0b100001 + 0o116) + chr(0b110000 + 0o64) + chr(6581 - 6480))('\x75' + '\164' + chr(0b1100110) + '\x2d' + chr(0b111000))]: UHHy9vqdUE_1 = X35P9BHAdreX + BOp1lkG2ihOI KCQVdCVKfN4Z = W_rVuVdsHzls[roI3spqORKae(ES5oEprVxulp(b'\xd7\xc7\xd8\xb7i'), chr(7767 - 7667) + chr(0b1011101 + 0o10) + '\x63' + chr(4394 - 4283) + chr(0b1000001 + 0o43) + '\x65')(chr(3834 - 3717) + chr(0b1110100) + '\x66' + '\x2d' + '\070')] + W_rVuVdsHzls[roI3spqORKae(ES5oEprVxulp(b'\xdf\xc5\xcc\xbbwj\x96N\xb1'), '\144' + '\145' + '\143' + chr(1088 - 977) + chr(0b1100100) + chr(9127 - 9026))(chr(8470 - 8353) + chr(116) + chr(0b1100110) + chr(0b101101) + '\070')] v0rEqS0IDfa3 = nzTpIcepk0o8(chr(0b110000) + '\157' + '\061', 0o10) elif TRsEnjL8YDa6 in [roI3spqORKae(ES5oEprVxulp(b'\xd4\xc7\xd2\xb7'), chr(100) + '\145' + chr(99) + chr(8529 - 8418) + '\x64' + '\145')(chr(11529 - 11412) + chr(0b1110100) + chr(0b100 + 0o142) + '\055' + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xd8\xc9\xcf\xbbf'), chr(1086 - 986) + chr(0b1000010 + 0o43) + chr(0b1100011) + '\157' + '\x64' + chr(4648 - 4547))('\165' + '\x74' + chr(0b101100 + 0o72) + chr(45) + chr(0b110 + 0o62))]: UHHy9vqdUE_1 = [] KCQVdCVKfN4Z = W_rVuVdsHzls[roI3spqORKae(ES5oEprVxulp(b'\xd7\xc7\xd8\xb7i'), '\144' + '\145' + '\x63' + '\157' + chr(100) + chr(0b1100101))(chr(117) + chr(7672 - 7556) + chr(3897 - 3795) + chr(0b101101) + '\070')] + W_rVuVdsHzls[roI3spqORKae(ES5oEprVxulp(b'\xdf\xc5\xcc\xbbwj\x96N\xb1'), '\x64' + '\145' + chr(99) + chr(10161 - 10050) + chr(0b10011 + 0o121) + '\145')(chr(0b1110101) + chr(0b1110100) + chr(3467 - 3365) + chr(1097 - 1052) + chr(0b1 + 0o67))] v0rEqS0IDfa3 = nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b100111 + 0o12), 8) else: UHHy9vqdUE_1 = [] (ZkpORfAzQ9Hw, ZJwZgaHE72Po, biRCFepsLie5) = (None, None, None) if v0rEqS0IDfa3: try: ZkpORfAzQ9Hw = q6MpE4pm_hbK(tF75nqoNENFL, roI3spqORKae(ES5oEprVxulp(b'\xcc\xc1\xcf\xa7do'), chr(0b10 + 0o142) + chr(0b1100101) + chr(0b1100011) + chr(0b110111 + 0o70) + chr(100) + '\145')(chr(0b1110101) + chr(0b1 + 0o163) + '\146' + '\055' + '\x38')) except zfo2Sgkz3IVJ: pass for caoQ1dkAfyIi in UHHy9vqdUE_1: if ZkpORfAzQ9Hw: break try: ZkpORfAzQ9Hw = q6MpE4pm_hbK(tF75nqoNENFL, roI3spqORKae(ES5oEprVxulp(b'\xcc\xc1\xcf\xa7do'), chr(100) + chr(0b1110 + 0o127) + chr(99) + chr(147 - 36) + chr(0b1100100) + chr(0b10000 + 0o125))('\165' + '\164' + chr(0b1100110) + '\x2d' + chr(0b111000)), prefix=caoQ1dkAfyIi + roI3spqORKae(ES5oEprVxulp(b'\xe5'), '\144' + chr(0b1100101) + chr(0b111001 + 0o52) + '\157' + chr(0b1100100) + chr(101))('\x75' + chr(116) + chr(102) + chr(0b101101) + '\x38')) ZJwZgaHE72Po = caoQ1dkAfyIi + roI3spqORKae(ES5oEprVxulp(b'\xe5'), chr(100) + '\145' + '\143' + chr(0b110000 + 0o77) + '\x64' + chr(101))(chr(0b1110101) + '\x74' + chr(102) + chr(220 - 175) + chr(2261 - 2205)) except zfo2Sgkz3IVJ: pass for caoQ1dkAfyIi in UHHy9vqdUE_1: if ZkpORfAzQ9Hw: break try: ZkpORfAzQ9Hw = q6MpE4pm_hbK(tF75nqoNENFL, roI3spqORKae(ES5oEprVxulp(b'\xcc\xc1\xcf\xa7do'), chr(6578 - 6478) + chr(101) + '\143' + chr(9592 - 9481) + chr(100) + '\x65')('\x75' + chr(0b1110100) + chr(8511 - 8409) + chr(0b10000 + 0o35) + '\x38'), suffix=roI3spqORKae(ES5oEprVxulp(b'\xe5'), chr(7105 - 7005) + chr(0b1100101) + chr(99) + chr(0b1101111) + chr(100) + '\x65')('\165' + chr(0b101001 + 0o113) + chr(0b1010010 + 0o24) + chr(0b101101 + 0o0) + '\x38') + caoQ1dkAfyIi) biRCFepsLie5 = caoQ1dkAfyIi + roI3spqORKae(ES5oEprVxulp(b'\xe5'), '\x64' + chr(0b1100101) + '\143' + '\x6f' + chr(1547 - 1447) + chr(0b110111 + 0o56))(chr(0b111000 + 0o75) + chr(0b101001 + 0o113) + '\146' + chr(45) + '\x38') except zfo2Sgkz3IVJ: pass if not ZkpORfAzQ9Hw: try: QkcrcGnQ3BnZ = TRsEnjL8YDa6 if TRsEnjL8YDa6.I9fKICALauJr(roI3spqORKae(ES5oEprVxulp(b'\xe5'), '\144' + chr(8672 - 8571) + '\143' + chr(0b1101111) + '\144' + chr(101))(chr(117) + chr(2249 - 2133) + chr(1986 - 1884) + chr(45) + chr(0b11110 + 0o32))) else TRsEnjL8YDa6 + roI3spqORKae(ES5oEprVxulp(b'\xe5'), chr(5254 - 5154) + '\x65' + chr(99) + chr(111) + chr(0b111110 + 0o46) + chr(3190 - 3089))(chr(5452 - 5335) + chr(0b1110100) + '\146' + '\x2d' + chr(56)) ZkpORfAzQ9Hw = q6MpE4pm_hbK(tF75nqoNENFL, roI3spqORKae(ES5oEprVxulp(b'\xcc\xc1\xcf\xa7do'), '\x64' + chr(0b1100101) + chr(0b111100 + 0o47) + chr(0b100011 + 0o114) + chr(100) + chr(101))('\x75' + chr(9102 - 8986) + chr(0b1100110) + chr(0b10011 + 0o32) + '\x38'), prefix=QkcrcGnQ3BnZ) ZJwZgaHE72Po = QkcrcGnQ3BnZ KCQVdCVKfN4Z = W_rVuVdsHzls[roI3spqORKae(ES5oEprVxulp(b'\xd7\xc7\xd8\xb7i'), '\x64' + chr(0b1000010 + 0o43) + '\x63' + chr(111) + chr(0b1010001 + 0o23) + '\x65')(chr(5421 - 5304) + '\164' + '\146' + chr(592 - 547) + chr(0b111000))] + W_rVuVdsHzls[roI3spqORKae(ES5oEprVxulp(b'\xdf\xc5\xcc\xbbwj\x96N\xb1'), chr(100) + '\145' + chr(99) + chr(0b1101111) + chr(7079 - 6979) + chr(7957 - 7856))(chr(9264 - 9147) + '\x74' + chr(0b11 + 0o143) + '\055' + chr(574 - 518))] except zfo2Sgkz3IVJ: raise try: h2H92xP_GY5d = TRsEnjL8YDa6 if TRsEnjL8YDa6.startswith(roI3spqORKae(ES5oEprVxulp(b'\xe5'), chr(0b1001110 + 0o26) + chr(9637 - 9536) + chr(0b110 + 0o135) + chr(0b110011 + 0o74) + '\x64' + '\x65')(chr(117) + '\x74' + chr(468 - 366) + chr(0b101101) + chr(0b1111 + 0o51))) else roI3spqORKae(ES5oEprVxulp(b'\xe5'), chr(7098 - 6998) + chr(8368 - 8267) + chr(99) + chr(0b1101001 + 0o6) + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(116) + '\146' + chr(45) + chr(56)) + TRsEnjL8YDa6 ZkpORfAzQ9Hw = q6MpE4pm_hbK(tF75nqoNENFL, roI3spqORKae(ES5oEprVxulp(b'\xcc\xc1\xcf\xa7do'), chr(0b1100100) + chr(0b101101 + 0o70) + '\x63' + '\157' + '\144' + chr(0b1001 + 0o134))(chr(0b1010001 + 0o44) + '\x74' + chr(0b1100110) + chr(522 - 477) + chr(2463 - 2407)), suffix=h2H92xP_GY5d) biRCFepsLie5 = h2H92xP_GY5d KCQVdCVKfN4Z = W_rVuVdsHzls[roI3spqORKae(ES5oEprVxulp(b'\xd7\xc7\xd8\xb7i'), chr(4910 - 4810) + chr(8298 - 8197) + chr(0b1100011) + '\157' + chr(0b10101 + 0o117) + chr(0b101001 + 0o74))('\x75' + chr(5996 - 5880) + '\x66' + chr(0b101101) + chr(0b111 + 0o61))] + W_rVuVdsHzls[roI3spqORKae(ES5oEprVxulp(b'\xdf\xc5\xcc\xbbwj\x96N\xb1'), chr(100) + '\145' + chr(0b1100011) + chr(4838 - 4727) + chr(5138 - 5038) + chr(0b101 + 0o140))('\x75' + '\164' + chr(0b1100110) + chr(0b10000 + 0o35) + chr(671 - 615))] except zfo2Sgkz3IVJ: pass if not ZkpORfAzQ9Hw: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xf9\xc7\xc9\xbea#\x9b@\xa9\xd8\xeec\x82\xb5u\xeb\xefP\x13\xe6\x18\x898\x18\r\x01\xec\xb7\xf2R\\l\x9a\x18[\x06\xf7\xd7\xb8\xab\xc8\xcb\xd9\xf2 p'), chr(100) + '\x65' + '\143' + chr(0b1101111) + chr(100) + chr(0b1100101))(chr(0b1110101) + chr(0b110101 + 0o77) + '\146' + '\x2d' + chr(0b11110 + 0o32)) % TRsEnjL8YDa6) _XdQFJpnzJor = {roI3spqORKae(ES5oEprVxulp(b'\xca\xc7\xd0\xb3w\\\x94A\xba\x94\xed'), chr(100) + '\145' + '\x63' + chr(111) + '\144' + chr(1027 - 926))(chr(0b1110101) + chr(116) + chr(0b1100110) + '\x2d' + '\070'): ZkpORfAzQ9Hw[nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110000), 8)], roI3spqORKae(ES5oEprVxulp(b'\xdf\xcb\xdf\xb7kw\x87F\xbe\x91\xfcs'), chr(100) + '\x65' + chr(0b1010001 + 0o22) + '\157' + chr(7675 - 7575) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(0b11101 + 0o20) + chr(0b110000 + 0o10)): ZkpORfAzQ9Hw[nzTpIcepk0o8(chr(2160 - 2112) + chr(0b1101111) + chr(1968 - 1919), 8)]} Rifrmox1LJWo = {B6UAF1zReOyJ.Xn8ENWMZdIRt(): B6UAF1zReOyJ for B6UAF1zReOyJ in tF75nqoNENFL} if KCQVdCVKfN4Z else {} for jXqxEQuu_5DD in Bvi71nNyvlqO(KCQVdCVKfN4Z): for (jEuYqBGFUpyY, DaujcuhQNCBs) in roI3spqORKae(PVdlFExosZs0, roI3spqORKae(ES5oEprVxulp(b'\xfd\xfd\xf7\xb7qv\xc1W\xbc\xbf\xfb@'), chr(100) + chr(101) + chr(99) + '\x6f' + '\144' + chr(0b1100101))('\165' + chr(7226 - 7110) + chr(102) + '\055' + chr(0b11100 + 0o34)))(jXqxEQuu_5DD, []): if DaujcuhQNCBs is None: def DaujcuhQNCBs(bI5jsQ9OkQtj): return bI5jsQ9OkQtj for _R8IKF5IwAfX in jEuYqBGFUpyY: if ZJwZgaHE72Po: _R8IKF5IwAfX = ZJwZgaHE72Po + _R8IKF5IwAfX if biRCFepsLie5: _R8IKF5IwAfX = _R8IKF5IwAfX + biRCFepsLie5 _R8IKF5IwAfX = _R8IKF5IwAfX.Xn8ENWMZdIRt() if _R8IKF5IwAfX in Rifrmox1LJWo: _XdQFJpnzJor[jXqxEQuu_5DD] = DaujcuhQNCBs(tF75nqoNENFL[Rifrmox1LJWo[_R8IKF5IwAfX]]) DaujcuhQNCBs = None break if DaujcuhQNCBs is None: break return _XdQFJpnzJor
noahbenson/neuropythy
neuropythy/vision/retinotopy.py
predict_pRF_radius
def predict_pRF_radius(eccentricity, visual_area='V1', source='Wandell2015'): ''' predict_pRF_radius(eccentricity) yields an estimate of the pRF size for a patch of cortex at the given eccentricity in V1. predict_pRF_radius(eccentricity, area) yields an estimate in the given visual area (may be given by the keyword visual_area). predict_pRF_radius(eccentricity, area, source) uses the given source to estimate the pRF size (may be given by the keyword source). The following visual areas can be specified: * 'V1' (default), 'V2', 'V3' * 'hV4' * 'V3a', 'V3b' * 'VO1', 'VO2' * 'LO1', 'LO2' * 'TO1', 'TO2' The following sources may be given: * 'Wandell2015': Wandell BA, Winawer J (2015) Computational neuroimaging and population receptive fields. Trends Cogn Sci. 19(6):349-57. doi:10.1016/j.tics.2015.03.009. * 'Kay2013: Kay KN, Winawer J, Mezer A, Wandell BA (2013) Compressive spatial summation in human visual cortex. J Neurophysiol. 110(2):481-94. The default source is 'Wandell2015'. ''' visual_area = visual_area.lower() if pimms.is_str(source): source = source.lower() if source not in pRF_data: raise ValueError('Given source (%s) not found in pRF-size database' % source) dat = pRF_data[source] dat = dat[visual_area] else: dat = {'m':source[0], 'b':source[1]} return dat['m']*eccentricity + dat['b']
python
def predict_pRF_radius(eccentricity, visual_area='V1', source='Wandell2015'): ''' predict_pRF_radius(eccentricity) yields an estimate of the pRF size for a patch of cortex at the given eccentricity in V1. predict_pRF_radius(eccentricity, area) yields an estimate in the given visual area (may be given by the keyword visual_area). predict_pRF_radius(eccentricity, area, source) uses the given source to estimate the pRF size (may be given by the keyword source). The following visual areas can be specified: * 'V1' (default), 'V2', 'V3' * 'hV4' * 'V3a', 'V3b' * 'VO1', 'VO2' * 'LO1', 'LO2' * 'TO1', 'TO2' The following sources may be given: * 'Wandell2015': Wandell BA, Winawer J (2015) Computational neuroimaging and population receptive fields. Trends Cogn Sci. 19(6):349-57. doi:10.1016/j.tics.2015.03.009. * 'Kay2013: Kay KN, Winawer J, Mezer A, Wandell BA (2013) Compressive spatial summation in human visual cortex. J Neurophysiol. 110(2):481-94. The default source is 'Wandell2015'. ''' visual_area = visual_area.lower() if pimms.is_str(source): source = source.lower() if source not in pRF_data: raise ValueError('Given source (%s) not found in pRF-size database' % source) dat = pRF_data[source] dat = dat[visual_area] else: dat = {'m':source[0], 'b':source[1]} return dat['m']*eccentricity + dat['b']
[ "def", "predict_pRF_radius", "(", "eccentricity", ",", "visual_area", "=", "'V1'", ",", "source", "=", "'Wandell2015'", ")", ":", "visual_area", "=", "visual_area", ".", "lower", "(", ")", "if", "pimms", ".", "is_str", "(", "source", ")", ":", "source", "=...
predict_pRF_radius(eccentricity) yields an estimate of the pRF size for a patch of cortex at the given eccentricity in V1. predict_pRF_radius(eccentricity, area) yields an estimate in the given visual area (may be given by the keyword visual_area). predict_pRF_radius(eccentricity, area, source) uses the given source to estimate the pRF size (may be given by the keyword source). The following visual areas can be specified: * 'V1' (default), 'V2', 'V3' * 'hV4' * 'V3a', 'V3b' * 'VO1', 'VO2' * 'LO1', 'LO2' * 'TO1', 'TO2' The following sources may be given: * 'Wandell2015': Wandell BA, Winawer J (2015) Computational neuroimaging and population receptive fields. Trends Cogn Sci. 19(6):349-57. doi:10.1016/j.tics.2015.03.009. * 'Kay2013: Kay KN, Winawer J, Mezer A, Wandell BA (2013) Compressive spatial summation in human visual cortex. J Neurophysiol. 110(2):481-94. The default source is 'Wandell2015'.
[ "predict_pRF_radius", "(", "eccentricity", ")", "yields", "an", "estimate", "of", "the", "pRF", "size", "for", "a", "patch", "of", "cortex", "at", "the", "given", "eccentricity", "in", "V1", ".", "predict_pRF_radius", "(", "eccentricity", "area", ")", "yields"...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/vision/retinotopy.py#L431-L465
train
Predict the pRF size for a patch of cortex at the given eccentricity and area.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr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eeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(8916 - 8805) + chr(0b110010) + '\062', 39108 - 39100), nzTpIcepk0o8('\060' + '\157' + '\062' + '\066' + chr(0b101100 + 0o4), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(2306 - 2257) + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110011) + '\x33' + chr(0b101110 + 0o11), ord("\x08")), nzTpIcepk0o8(chr(1959 - 1911) + chr(111) + chr(0b110001) + chr(0b110011) + chr(0b10011 + 0o36), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + chr(116 - 65) + '\064', 0o10), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(0b1101111) + '\061' + chr(2038 - 1989) + '\x32', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + chr(48) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(0b1101111) + '\066' + '\x35', ord("\x08")), nzTpIcepk0o8(chr(1774 - 1726) + chr(10465 - 10354) + '\x32' + '\x33' + chr(0b110100), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(55) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b10111 + 0o31) + '\157' + '\063' + chr(0b10100 + 0o35) + '\x31', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(11051 - 10940) + '\x32' + '\061' + '\x30', ord("\x08")), nzTpIcepk0o8(chr(728 - 680) + '\x6f' + chr(0b110010) + '\x36' + chr(208 - 160), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + chr(498 - 446) + chr(0b1 + 0o66), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + '\x33' + chr(0b10001 + 0o40), 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b100011 + 0o24) + chr(0b110010), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1000 + 0o147) + '\x33' + chr(663 - 609) + '\066', 0o10), nzTpIcepk0o8(chr(375 - 327) + chr(0b10011 + 0o134) + '\066' + chr(2455 - 2400), 42328 - 42320), nzTpIcepk0o8('\x30' + chr(383 - 272) + '\x33' + chr(0b110100) + '\x36', 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x37' + chr(0b100 + 0o61), 0o10), nzTpIcepk0o8(chr(1496 - 1448) + chr(0b1101111) + chr(1203 - 1154) + chr(2390 - 2335) + chr(0b11101 + 0o30), 61961 - 61953), nzTpIcepk0o8('\x30' + chr(0b101000 + 0o107) + chr(0b110001 + 0o5) + chr(1021 - 970), 27709 - 27701), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\157' + chr(51) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(11676 - 11565) + chr(0b1011 + 0o47) + chr(0b110010) + '\064', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + chr(49) + chr(0b10111 + 0o35), 55627 - 55619), nzTpIcepk0o8('\060' + chr(6744 - 6633) + chr(0b10110 + 0o35) + chr(0b110101) + '\060', 1274 - 1266), nzTpIcepk0o8(chr(1481 - 1433) + chr(5241 - 5130) + '\x32' + chr(0b11 + 0o61) + chr(0b110100 + 0o3), 8), nzTpIcepk0o8(chr(48) + '\157' + chr(1167 - 1117) + '\x31' + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\157' + chr(0b110001) + chr(0b1011 + 0o46), 8), nzTpIcepk0o8(chr(1463 - 1415) + '\x6f' + chr(2061 - 2009) + chr(1621 - 1573), 24390 - 24382), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + chr(0b110101) + chr(0b101001 + 0o7), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b100100 + 0o17) + '\064' + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\060' + chr(3734 - 3623) + chr(0b110001) + chr(50) + '\062', 0o10), nzTpIcepk0o8('\060' + '\157' + '\062' + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(9836 - 9725) + '\062' + chr(0b110101) + '\x36', 0b1000), nzTpIcepk0o8(chr(1212 - 1164) + '\157' + chr(51) + chr(1086 - 1033) + chr(55), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(54) + chr(0b110011), 8), nzTpIcepk0o8(chr(1204 - 1156) + chr(0b1100 + 0o143) + '\x31' + '\x33' + '\x30', 60392 - 60384), nzTpIcepk0o8(chr(0b110000) + chr(963 - 852) + chr(1622 - 1572) + '\x34' + chr(50), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b10110 + 0o32) + '\157' + chr(2392 - 2339) + chr(48), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'<'), '\x64' + chr(0b1011110 + 0o7) + chr(99) + chr(6004 - 5893) + chr(172 - 72) + chr(4260 - 4159))(chr(0b1110101) + chr(0b1110100) + chr(3790 - 3688) + '\x2d' + chr(3011 - 2955)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def AH_IuH1RaXuz(J0cNllQBMug7, sGYgOtU0jgXU=roI3spqORKae(ES5oEprVxulp(b'D\x81'), '\144' + '\x65' + '\143' + chr(0b1101111) + chr(861 - 761) + chr(2188 - 2087))(chr(0b1110101) + '\164' + chr(102) + chr(45) + chr(1463 - 1407)), TRsEnjL8YDa6=roI3spqORKae(ES5oEprVxulp(b'E\xd1g\xbb<\xf0&r\x05\xad\r'), chr(0b1001010 + 0o32) + chr(813 - 712) + chr(0b1100011) + '\157' + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + '\146' + chr(701 - 656) + chr(2300 - 2244))): sGYgOtU0jgXU = sGYgOtU0jgXU.Xn8ENWMZdIRt() if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'{\xc3V\xac-\xee'), chr(100) + chr(0b110101 + 0o60) + chr(0b1011000 + 0o13) + '\157' + chr(0b100010 + 0o102) + '\x65')('\x75' + '\164' + chr(102) + chr(45) + chr(56)))(TRsEnjL8YDa6): TRsEnjL8YDa6 = TRsEnjL8YDa6.Xn8ENWMZdIRt() if TRsEnjL8YDa6 not in dWGWf0M8hZnq: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'U\xd9\x7f\xba7\xbc9/@\xee[\xac\xa8\x98\x82*\x13\xd6Y\x89I]Ur\xe1\xa2\x8c\x87\xe6g\x00\x98\xb6\x14>\xdd\x86I=\x82v\xd1}\xbe;\xfd9%'), '\x64' + chr(8331 - 8230) + chr(7151 - 7052) + chr(0b1100111 + 0o10) + chr(0b1100100) + chr(0b1100101))(chr(117) + chr(12588 - 12472) + '\146' + '\x2d' + chr(0b100001 + 0o27)) % TRsEnjL8YDa6) LMcCiF4czwpp = dWGWf0M8hZnq[TRsEnjL8YDa6] LMcCiF4czwpp = LMcCiF4czwpp[sGYgOtU0jgXU] else: LMcCiF4czwpp = {roI3spqORKae(ES5oEprVxulp(b'\x7f'), chr(2003 - 1903) + chr(101) + chr(4117 - 4018) + '\157' + chr(344 - 244) + '\x65')('\x75' + '\164' + chr(0b1001101 + 0o31) + '\x2d' + chr(0b101100 + 0o14)): TRsEnjL8YDa6[nzTpIcepk0o8(chr(0b11100 + 0o24) + '\x6f' + '\x30', 0b1000)], roI3spqORKae(ES5oEprVxulp(b'p'), chr(0b1100100) + '\x65' + '\143' + '\157' + chr(0b110 + 0o136) + chr(101))('\x75' + chr(0b1110100) + '\146' + '\x2d' + chr(2808 - 2752)): TRsEnjL8YDa6[nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(88 - 39), 0o10)]} return LMcCiF4czwpp[roI3spqORKae(ES5oEprVxulp(b'\x7f'), '\144' + chr(0b1010011 + 0o22) + chr(99) + chr(0b1101111) + '\x64' + chr(8938 - 8837))('\165' + '\x74' + chr(102) + chr(0b1001 + 0o44) + '\070')] * J0cNllQBMug7 + LMcCiF4czwpp[roI3spqORKae(ES5oEprVxulp(b'p'), chr(0b1100100) + '\145' + '\143' + '\x6f' + chr(5788 - 5688) + '\x65')('\x75' + chr(0b1110100) + chr(102) + '\055' + '\070')]
noahbenson/neuropythy
neuropythy/vision/retinotopy.py
fit_pRF_radius
def fit_pRF_radius(ctx, retinotopy=Ellipsis, mask=None, weight=Ellipsis, slope_only=False): ''' fit_pRF_radius(ctx) fits a line, m*eccen + b, to the pRF radius and yields the tuple (m, b). The following options may be given: * retinotopy (default: Ellipsis) specifies the prefix for the retinotopy (passed to retinotopy_data() to find the retinotopic dataset). * mask (default: None) specifies the mask over which to perform the calculation. This is passed to the to_mask() function. In the case that mask is a set or frozenset, then it is treated as a conjunction (intersection) of masks. * weight (default: None) specifies that a weight should be used; if this is True or Ellipsis, will use the variance_explained if it is part of the retinotopy dataset; if this is False or None, uses no weight; otherwise, this must be a weight property or property name. * slope_only (default: False) may be set to True to instead fit radius = m*eccen and return only m. ''' rdat = retinotopy_data(ctx, retinotopy) if 'radius' not in rdat: raise ValueError('No pRF radius found in dataset %s' % retinotopy) rad = rdat['radius'] (ang,ecc) = as_retinotopy(rdat, 'visual') if isinstance(mask, (set, frozenset)): mask = reduce(np.intersect1d, [ctx.mask(m, indices=True) for m in mask]) else: mask = ctx.mask(mask, indices=True) # get a weight if provided: if weight in [False, None]: wgt = np.ones(rad.shape) elif weight in [True, Ellipsis]: if 'variance_explained' in rdat: wgt = rdat['variance_explained'] else: wgt = np.ones(rad.shape) else: wgt = ctx.property(weight) # get the relevant eccen and radius values (ecc,rad,wgt) = [x[mask] for x in (ecc,rad,wgt)] # fit a line... if slope_only: ecc = np.reshape(ecc * wgt, (len(ecc), 1)) rad = np.reshape(rad * wgt, (len(rad), 1)) return np.linalg.lstsq(ecc, rad)[0] else: return tuple(np.polyfit(ecc, rad, 1, w=wgt))
python
def fit_pRF_radius(ctx, retinotopy=Ellipsis, mask=None, weight=Ellipsis, slope_only=False): ''' fit_pRF_radius(ctx) fits a line, m*eccen + b, to the pRF radius and yields the tuple (m, b). The following options may be given: * retinotopy (default: Ellipsis) specifies the prefix for the retinotopy (passed to retinotopy_data() to find the retinotopic dataset). * mask (default: None) specifies the mask over which to perform the calculation. This is passed to the to_mask() function. In the case that mask is a set or frozenset, then it is treated as a conjunction (intersection) of masks. * weight (default: None) specifies that a weight should be used; if this is True or Ellipsis, will use the variance_explained if it is part of the retinotopy dataset; if this is False or None, uses no weight; otherwise, this must be a weight property or property name. * slope_only (default: False) may be set to True to instead fit radius = m*eccen and return only m. ''' rdat = retinotopy_data(ctx, retinotopy) if 'radius' not in rdat: raise ValueError('No pRF radius found in dataset %s' % retinotopy) rad = rdat['radius'] (ang,ecc) = as_retinotopy(rdat, 'visual') if isinstance(mask, (set, frozenset)): mask = reduce(np.intersect1d, [ctx.mask(m, indices=True) for m in mask]) else: mask = ctx.mask(mask, indices=True) # get a weight if provided: if weight in [False, None]: wgt = np.ones(rad.shape) elif weight in [True, Ellipsis]: if 'variance_explained' in rdat: wgt = rdat['variance_explained'] else: wgt = np.ones(rad.shape) else: wgt = ctx.property(weight) # get the relevant eccen and radius values (ecc,rad,wgt) = [x[mask] for x in (ecc,rad,wgt)] # fit a line... if slope_only: ecc = np.reshape(ecc * wgt, (len(ecc), 1)) rad = np.reshape(rad * wgt, (len(rad), 1)) return np.linalg.lstsq(ecc, rad)[0] else: return tuple(np.polyfit(ecc, rad, 1, w=wgt))
[ "def", "fit_pRF_radius", "(", "ctx", ",", "retinotopy", "=", "Ellipsis", ",", "mask", "=", "None", ",", "weight", "=", "Ellipsis", ",", "slope_only", "=", "False", ")", ":", "rdat", "=", "retinotopy_data", "(", "ctx", ",", "retinotopy", ")", "if", "'radi...
fit_pRF_radius(ctx) fits a line, m*eccen + b, to the pRF radius and yields the tuple (m, b). The following options may be given: * retinotopy (default: Ellipsis) specifies the prefix for the retinotopy (passed to retinotopy_data() to find the retinotopic dataset). * mask (default: None) specifies the mask over which to perform the calculation. This is passed to the to_mask() function. In the case that mask is a set or frozenset, then it is treated as a conjunction (intersection) of masks. * weight (default: None) specifies that a weight should be used; if this is True or Ellipsis, will use the variance_explained if it is part of the retinotopy dataset; if this is False or None, uses no weight; otherwise, this must be a weight property or property name. * slope_only (default: False) may be set to True to instead fit radius = m*eccen and return only m.
[ "fit_pRF_radius", "(", "ctx", ")", "fits", "a", "line", "m", "*", "eccen", "+", "b", "to", "the", "pRF", "radius", "and", "yields", "the", "tuple", "(", "m", "b", ")", "." ]
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/vision/retinotopy.py#L467-L504
train
Fits a pRF radius to the pRF radius and yields the pRF radius.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5w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nI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(4093 - 3982) + '\063' + chr(0b110110) + chr(1188 - 1138), 0b1000), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b100101 + 0o112) + '\x33' + chr(1504 - 1453) + '\065', 10199 - 10191), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + '\064', 4036 - 4028), nzTpIcepk0o8('\x30' + chr(8217 - 8106) + '\061' + chr(50) + '\063', 14473 - 14465), nzTpIcepk0o8(chr(547 - 499) + '\157' + chr(0b10111 + 0o33) + chr(0b110100) + '\x34', 0o10), nzTpIcepk0o8(chr(48) + chr(11085 - 10974) + '\x33' + '\060', 0o10), nzTpIcepk0o8(chr(0b11010 + 0o26) + '\x6f' + chr(1165 - 1114) + chr(0b10 + 0o56) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1522 - 1472) + chr(0b110010) + '\x35', 29542 - 29534), nzTpIcepk0o8(chr(2138 - 2090) + chr(6373 - 6262) + '\x32' + '\x33' + '\x30', 0o10), nzTpIcepk0o8(chr(1032 - 984) + chr(10637 - 10526) + '\063' + chr(0b10100 + 0o35) + '\063', 56632 - 56624), nzTpIcepk0o8('\x30' + chr(111) + chr(0b10000 + 0o42) + chr(918 - 863) + '\060', 0o10), nzTpIcepk0o8('\060' + chr(0b1010010 + 0o35) + chr(0b11101 + 0o27) + '\x31', 0o10), nzTpIcepk0o8('\060' + '\157' + '\062' + chr(0b110100) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + chr(53) + chr(365 - 310), 0o10), nzTpIcepk0o8('\x30' + chr(8513 - 8402) + chr(827 - 778) + '\060' + chr(409 - 359), ord("\x08")), nzTpIcepk0o8('\060' + chr(1122 - 1011) + chr(50) + '\064' + chr(55), 8), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\x6f' + '\062' + chr(0b110110) + chr(0b110000), 61504 - 61496), nzTpIcepk0o8(chr(0b110000) + chr(0b10 + 0o155) + '\062' + chr(0b110011) + chr(1388 - 1334), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(53) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1000010 + 0o55) + chr(0b101001 + 0o12) + chr(52), 8), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\157' + chr(0b110001) + chr(49) + '\065', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(7445 - 7334) + '\061' + '\061' + chr(0b110011), 0o10), nzTpIcepk0o8(chr(1560 - 1512) + chr(10705 - 10594) + '\x34' + chr(0b1111 + 0o45), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b11001 + 0o32) + '\065' + chr(0b110001), 31979 - 31971), nzTpIcepk0o8(chr(48) + chr(8827 - 8716) + chr(0b10010 + 0o45) + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b1001 + 0o51) + '\065' + chr(1108 - 1055), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + chr(215 - 165) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(111) + chr(0b110010), 8), nzTpIcepk0o8('\x30' + chr(5254 - 5143) + chr(963 - 914) + chr(0b110101) + chr(0b11101 + 0o25), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(1497 - 1446) + chr(0b110010) + '\062', 0b1000), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(111) + chr(0b110010) + chr(186 - 138) + '\x34', 48971 - 48963), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b11110 + 0o23) + chr(50) + chr(52), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(54) + '\064', 45637 - 45629), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + '\063' + chr(2271 - 2219), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(9905 - 9794) + chr(0b1010 + 0o52) + chr(50), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x33' + '\066', 0b1000), nzTpIcepk0o8(chr(0b100000 + 0o20) + '\157' + chr(0b11 + 0o57) + '\062', 0b1000), nzTpIcepk0o8(chr(0b10110 + 0o32) + '\157' + chr(0b0 + 0o61) + chr(0b101001 + 0o14) + chr(779 - 726), 20043 - 20035), nzTpIcepk0o8(chr(95 - 47) + chr(0b11011 + 0o124) + chr(695 - 644) + chr(0b110100), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1797 - 1749) + chr(0b1011100 + 0o23) + '\065' + chr(48), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xdc'), '\x64' + chr(3748 - 3647) + '\143' + chr(111) + '\x64' + chr(101))(chr(0b10110 + 0o137) + '\x74' + chr(0b1000 + 0o136) + chr(45) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) (jYZAKYxMTtNT,) = (roI3spqORKae(rFFUeiYWzOhx(roI3spqORKae(ES5oEprVxulp(b'\x94\xa8r0\xd0w\xa8\xf9\xeb'), chr(0b111111 + 0o45) + chr(0b1100101) + '\x63' + chr(0b1001010 + 0o45) + chr(0b10111 + 0o115) + chr(0b1100101))('\x75' + '\164' + chr(5664 - 5562) + '\055' + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\x80\xb8x&\xc7}'), '\144' + chr(101) + chr(0b1100011) + chr(0b111111 + 0o60) + chr(100) + '\145')(chr(117) + '\164' + chr(0b1100110) + '\055' + chr(2806 - 2750))), roI3spqORKae(ES5oEprVxulp(b'\x80\xb8x&\xc7}'), '\x64' + chr(0b1100101) + chr(0b1100011) + '\x6f' + chr(8433 - 8333) + chr(0b111001 + 0o54))(chr(0b1000111 + 0o56) + chr(116) + '\146' + '\055' + chr(0b100000 + 0o30))),) def IuP5Evdssf67(PVjcU1K_3aBJ, Ud8JOD1j6kPi=RjQP07DYIdkf, BBM8dxm7YWge=None, iBxKYeMqq_Bt=RjQP07DYIdkf, OOpj4USeUV56=nzTpIcepk0o8('\x30' + chr(111) + chr(0b110000), 0o10)): P1XDPYIBf5hd = CTw69XTnIqxx(PVjcU1K_3aBJ, Ud8JOD1j6kPi) if roI3spqORKae(ES5oEprVxulp(b'\x80\xbcx:\xd1k'), '\x64' + '\x65' + '\x63' + '\x6f' + chr(0b1100100) + chr(0b1001111 + 0o26))('\x75' + chr(116) + '\146' + chr(45) + '\x38') not in P1XDPYIBf5hd: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b"\xbc\xb2<#\xf6^\xe7\xe7\xf9\xaf\xd1T\xd4O$\xc8\xc5\xf0M<$lk@\x88K\xcc\xe2g\x1e\xf2\xa1'"), chr(3062 - 2962) + '\x65' + chr(0b110110 + 0o55) + chr(111) + '\x64' + chr(101))('\165' + '\x74' + chr(0b1100110) + chr(45) + chr(2799 - 2743)) % Ud8JOD1j6kPi) wJpOqKauo9id = P1XDPYIBf5hd[roI3spqORKae(ES5oEprVxulp(b'\x80\xbcx:\xd1k'), '\144' + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(0b1011110 + 0o6) + '\x65')(chr(7047 - 6930) + chr(116) + chr(0b10000 + 0o126) + chr(45) + '\x38')] (Y54gViOryHfr, cRb7OGyXJeT1) = q6MpE4pm_hbK(P1XDPYIBf5hd, roI3spqORKae(ES5oEprVxulp(b'\x84\xb4o&\xc5t'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + '\x6f' + chr(100) + '\145')(chr(11940 - 11823) + chr(116) + chr(8326 - 8224) + chr(45) + '\070')) if suIjIS24Zkqw(BBM8dxm7YWge, (Bvi71nNyvlqO, PNaRkv8AjHWU)): BBM8dxm7YWge = jYZAKYxMTtNT(nDF4gVNx0u9Q.intersect1d, [PVjcU1K_3aBJ.BBM8dxm7YWge(tF75nqoNENFL, indices=nzTpIcepk0o8('\x30' + chr(7983 - 7872) + '\061', 0b1000)) for tF75nqoNENFL in BBM8dxm7YWge]) else: BBM8dxm7YWge = PVjcU1K_3aBJ.BBM8dxm7YWge(BBM8dxm7YWge, indices=nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(2157 - 2046) + '\x31', 8)) if iBxKYeMqq_Bt in [nzTpIcepk0o8(chr(497 - 449) + chr(0b1101111) + chr(0b110000), 8), None]: xmp6v1QmXZwR = nDF4gVNx0u9Q.rYPkZ8_2D0X1(wJpOqKauo9id.lhbM092AFW8f) elif iBxKYeMqq_Bt in [nzTpIcepk0o8('\060' + chr(0b10101 + 0o132) + chr(0b101100 + 0o5), 8), RjQP07DYIdkf]: if roI3spqORKae(ES5oEprVxulp(b'\x84\xbcn:\xc5v\xa4\xf0\xc7\xae\xc0Q\xcb\x0e+\xc9\xd5\xfa'), '\x64' + chr(4263 - 4162) + chr(0b1000110 + 0o35) + '\157' + chr(100) + '\x65')(chr(0b1110101) + chr(0b110000 + 0o104) + '\146' + chr(45) + '\070') in P1XDPYIBf5hd: xmp6v1QmXZwR = P1XDPYIBf5hd[roI3spqORKae(ES5oEprVxulp(b'\x84\xbcn:\xc5v\xa4\xf0\xc7\xae\xc0Q\xcb\x0e+\xc9\xd5\xfa'), chr(1652 - 1552) + chr(3537 - 3436) + chr(99) + chr(0b1001 + 0o146) + chr(100) + chr(101))(chr(0b1110101) + chr(6522 - 6406) + chr(0b100111 + 0o77) + chr(560 - 515) + chr(0b1010 + 0o56))] else: xmp6v1QmXZwR = nDF4gVNx0u9Q.rYPkZ8_2D0X1(wJpOqKauo9id.lhbM092AFW8f) else: xmp6v1QmXZwR = PVjcU1K_3aBJ.property(iBxKYeMqq_Bt) (cRb7OGyXJeT1, wJpOqKauo9id, xmp6v1QmXZwR) = [bI5jsQ9OkQtj[BBM8dxm7YWge] for bI5jsQ9OkQtj in (cRb7OGyXJeT1, wJpOqKauo9id, xmp6v1QmXZwR)] if OOpj4USeUV56: cRb7OGyXJeT1 = nDF4gVNx0u9Q.reshape(cRb7OGyXJeT1 * xmp6v1QmXZwR, (ftfygxgFas5X(cRb7OGyXJeT1), nzTpIcepk0o8(chr(1595 - 1547) + chr(111) + '\061', 8))) wJpOqKauo9id = nDF4gVNx0u9Q.reshape(wJpOqKauo9id * xmp6v1QmXZwR, (ftfygxgFas5X(wJpOqKauo9id), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001), 8))) return roI3spqORKae(nDF4gVNx0u9Q.linalg, roI3spqORKae(ES5oEprVxulp(b'\x9e\xaeh \xd5'), chr(100) + chr(0b1100101 + 0o0) + '\x63' + chr(111) + chr(0b1100100) + '\145')('\165' + '\x74' + chr(0b1100110) + chr(0b1100 + 0o41) + chr(56)))(cRb7OGyXJeT1, wJpOqKauo9id)[nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b101 + 0o152) + chr(0b101000 + 0o10), 8)] else: return nfNqtJL5aRaY(roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\x82\xb2p*\xc2q\xb3'), chr(0b110101 + 0o57) + '\145' + chr(4528 - 4429) + chr(111) + '\x64' + chr(0b1001 + 0o134))(chr(0b1110101) + chr(3224 - 3108) + chr(0b110100 + 0o62) + chr(711 - 666) + chr(0b10111 + 0o41)))(cRb7OGyXJeT1, wJpOqKauo9id, nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2286 - 2237), 8), w=xmp6v1QmXZwR))
noahbenson/neuropythy
neuropythy/vision/retinotopy.py
retinotopic_field_sign
def retinotopic_field_sign(m, element='vertices', retinotopy=Ellipsis, invert_field=False): ''' retinotopic_field_sign(mesh) yields a property array of the field sign of every vertex in the mesh m; this value may not be exactly 1 (same as VF) or -1 (mirror-image) but some value in-between; this is because the field sign is calculated exactly (1, 0, or -1) for each triangle in the mesh then is average onto the vertices. To get only the triangle field signs, use retinotopic_field_sign(m, 'triangles'). The following options are accepted: * element ('vertices') may be 'vertices' to specify that the vertex signs should be returned or 'triangles' (or 'faces') to specify that the triangle field signs should be returned. * retinotopy (Ellipsis) specifies the retinotopic dataset to be used. If se to 'empirical' or 'predicted', the retinotopy data is auto-detected from the given categories; if set to Ellipsis, a property pair like 'polar_angle' and 'eccentricity' or 'lat' and 'lon' are searched for using the as_retinotopy function; otherwise, this may be a retinotopy dataset recognizable by as_retinotopy. * invert_field (False) specifies that the inverse of the field sign should be returned. ''' tsign = _retinotopic_field_sign_triangles(m, retinotopy) t = m.tess if isinstance(m, geo.Mesh) or isinstance(m, geo.Topology) else m if invert_field: tsign = -tsign element = element.lower() if element == 'triangles' or element == 'faces': return tsign vfs = t.vertex_faces vfs = np.asarray([np.mean(tsign[list(ii)]) if len(ii) > 0 else 0 for ii in vfs]) return vfs
python
def retinotopic_field_sign(m, element='vertices', retinotopy=Ellipsis, invert_field=False): ''' retinotopic_field_sign(mesh) yields a property array of the field sign of every vertex in the mesh m; this value may not be exactly 1 (same as VF) or -1 (mirror-image) but some value in-between; this is because the field sign is calculated exactly (1, 0, or -1) for each triangle in the mesh then is average onto the vertices. To get only the triangle field signs, use retinotopic_field_sign(m, 'triangles'). The following options are accepted: * element ('vertices') may be 'vertices' to specify that the vertex signs should be returned or 'triangles' (or 'faces') to specify that the triangle field signs should be returned. * retinotopy (Ellipsis) specifies the retinotopic dataset to be used. If se to 'empirical' or 'predicted', the retinotopy data is auto-detected from the given categories; if set to Ellipsis, a property pair like 'polar_angle' and 'eccentricity' or 'lat' and 'lon' are searched for using the as_retinotopy function; otherwise, this may be a retinotopy dataset recognizable by as_retinotopy. * invert_field (False) specifies that the inverse of the field sign should be returned. ''' tsign = _retinotopic_field_sign_triangles(m, retinotopy) t = m.tess if isinstance(m, geo.Mesh) or isinstance(m, geo.Topology) else m if invert_field: tsign = -tsign element = element.lower() if element == 'triangles' or element == 'faces': return tsign vfs = t.vertex_faces vfs = np.asarray([np.mean(tsign[list(ii)]) if len(ii) > 0 else 0 for ii in vfs]) return vfs
[ "def", "retinotopic_field_sign", "(", "m", ",", "element", "=", "'vertices'", ",", "retinotopy", "=", "Ellipsis", ",", "invert_field", "=", "False", ")", ":", "tsign", "=", "_retinotopic_field_sign_triangles", "(", "m", ",", "retinotopy", ")", "t", "=", "m", ...
retinotopic_field_sign(mesh) yields a property array of the field sign of every vertex in the mesh m; this value may not be exactly 1 (same as VF) or -1 (mirror-image) but some value in-between; this is because the field sign is calculated exactly (1, 0, or -1) for each triangle in the mesh then is average onto the vertices. To get only the triangle field signs, use retinotopic_field_sign(m, 'triangles'). The following options are accepted: * element ('vertices') may be 'vertices' to specify that the vertex signs should be returned or 'triangles' (or 'faces') to specify that the triangle field signs should be returned. * retinotopy (Ellipsis) specifies the retinotopic dataset to be used. If se to 'empirical' or 'predicted', the retinotopy data is auto-detected from the given categories; if set to Ellipsis, a property pair like 'polar_angle' and 'eccentricity' or 'lat' and 'lon' are searched for using the as_retinotopy function; otherwise, this may be a retinotopy dataset recognizable by as_retinotopy. * invert_field (False) specifies that the inverse of the field sign should be returned.
[ "retinotopic_field_sign", "(", "mesh", ")", "yields", "a", "property", "array", "of", "the", "field", "sign", "of", "every", "vertex", "in", "the", "mesh", "m", ";", "this", "value", "may", "not", "be", "exactly", "1", "(", "same", "as", "VF", ")", "or...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/vision/retinotopy.py#L524-L549
train
Return the field sign of every vertex in the given mesh.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4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1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + '\x6f' + chr(0b110101) + '\066', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + chr(724 - 670), 0o10), nzTpIcepk0o8('\x30' + chr(7504 - 7393) + chr(51) + chr(55) + chr(0b100110 + 0o12), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b1110 + 0o43) + chr(0b110111) + '\062', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b11 + 0o60) + '\067', 10503 - 10495), nzTpIcepk0o8('\x30' + chr(9224 - 9113) + chr(1594 - 1543) + chr(49) + chr(0b100000 + 0o22), ord("\x08")), nzTpIcepk0o8(chr(250 - 202) + chr(0b1011 + 0o144) + chr(0b110001) + chr(2420 - 2365) + chr(52), 37788 - 37780), nzTpIcepk0o8(chr(0b10 + 0o56) + '\x6f' + chr(51) + chr(0b110101) + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(51) + chr(0b110011) + chr(169 - 117), 0b1000), nzTpIcepk0o8('\060' + chr(1101 - 990) + '\061' + '\060' + chr(0b110001), 0o10), nzTpIcepk0o8('\060' + chr(230 - 119) + chr(1027 - 976) + '\x34' + chr(941 - 890), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + chr(1161 - 1107) + '\x34', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + chr(1119 - 1066) + '\067', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(9827 - 9716) + chr(49) + chr(48) + chr(1806 - 1756), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\064' + chr(52), ord("\x08")), nzTpIcepk0o8(chr(165 - 117) + chr(111) + chr(353 - 304) + chr(0b10111 + 0o40) + chr(0b11100 + 0o26), 8), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\x6f' + chr(0b1010 + 0o47) + chr(446 - 393) + chr(830 - 777), 16766 - 16758), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + chr(2281 - 2229) + '\x33', 0b1000), nzTpIcepk0o8(chr(0b100001 + 0o17) + '\x6f' + chr(0b110011) + '\060' + chr(714 - 663), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b11101 + 0o24) + '\x31' + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b10101 + 0o36) + chr(0b110011) + '\x36', 33507 - 33499), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b10111 + 0o34) + chr(50) + '\060', 24812 - 24804), nzTpIcepk0o8('\060' + chr(805 - 694) + chr(49) + chr(0b110110) + '\x35', 0b1000), nzTpIcepk0o8('\060' + chr(5504 - 5393) + chr(51) + chr(0b11100 + 0o27) + '\x33', 48487 - 48479), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110011) + chr(2133 - 2082) + chr(0b110001), 0o10), nzTpIcepk0o8('\060' + chr(2581 - 2470) + '\061' + '\064' + chr(358 - 303), 0o10), nzTpIcepk0o8('\x30' + chr(0b110100 + 0o73) + chr(1981 - 1932) + chr(1214 - 1161), 17682 - 17674), nzTpIcepk0o8('\x30' + chr(0b100010 + 0o115) + chr(52) + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + chr(0b11010 + 0o26) + '\066', ord("\x08")), nzTpIcepk0o8(chr(756 - 708) + chr(0b1101111) + chr(0b10010 + 0o40), 0b1000), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\157' + chr(0b101011 + 0o7) + chr(53) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(6054 - 5943) + chr(55) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1001 + 0o51) + chr(49) + chr(0b1011 + 0o53), 0b1000), nzTpIcepk0o8(chr(0b101000 + 0o10) + '\x6f' + chr(0b110010) + chr(49) + chr(2504 - 2451), 914 - 906), nzTpIcepk0o8('\x30' + chr(1024 - 913) + '\063' + chr(50) + chr(0b11 + 0o63), ord("\x08")), nzTpIcepk0o8(chr(864 - 816) + chr(0b1011110 + 0o21) + '\x32' + chr(0b110110) + chr(51), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + '\x37' + chr(54), 0o10), nzTpIcepk0o8(chr(48) + chr(11070 - 10959) + '\x32' + chr(0b110001) + chr(49), 0o10), nzTpIcepk0o8(chr(644 - 596) + chr(111) + chr(2280 - 2228) + '\061', 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062' + '\060' + '\x32', 35579 - 35571)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\065' + chr(48), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x00'), '\x64' + chr(9863 - 9762) + chr(0b1100011) + chr(0b1101111) + chr(7335 - 7235) + chr(101))(chr(6478 - 6361) + chr(116) + chr(102) + '\x2d' + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def ZdeQl1tOT8b8(tF75nqoNENFL, pXRQUD7VR93J=roI3spqORKae(ES5oEprVxulp(b'Xk\x8a\x0ev\xa9\x19\x9f'), chr(2674 - 2574) + chr(1644 - 1543) + chr(0b111110 + 0o45) + chr(0b1010101 + 0o32) + '\x64' + chr(0b110101 + 0o60))(chr(0b1011111 + 0o26) + chr(116) + chr(102) + chr(45) + '\070'), Ud8JOD1j6kPi=RjQP07DYIdkf, s8rSLgTMDNSC=nzTpIcepk0o8(chr(292 - 244) + chr(0b1010 + 0o145) + chr(0b100100 + 0o14), 0b1000)): ZVFOukm2rgun = OkVN32x9RdTc(tF75nqoNENFL, Ud8JOD1j6kPi) h3Vc_4wxEbgd = tF75nqoNENFL.tess if suIjIS24Zkqw(tF75nqoNENFL, GZNMH8A4U3yp.Mesh) or suIjIS24Zkqw(tF75nqoNENFL, GZNMH8A4U3yp.Topology) else tF75nqoNENFL if s8rSLgTMDNSC: ZVFOukm2rgun = -ZVFOukm2rgun pXRQUD7VR93J = pXRQUD7VR93J.Xn8ENWMZdIRt() if pXRQUD7VR93J == roI3spqORKae(ES5oEprVxulp(b'Z|\x91\x1bq\xad\x10\x89\xaf'), '\144' + chr(0b1100 + 0o131) + chr(99) + '\157' + chr(0b1010100 + 0o20) + '\145')(chr(5082 - 4965) + chr(0b111 + 0o155) + chr(0b1100110) + chr(45) + chr(1127 - 1071)) or pXRQUD7VR93J == roI3spqORKae(ES5oEprVxulp(b'Ho\x9b\x1fl'), '\144' + chr(2083 - 1982) + '\143' + chr(111) + '\144' + '\145')(chr(2989 - 2872) + chr(8277 - 8161) + chr(6902 - 6800) + '\x2d' + '\x38'): return ZVFOukm2rgun j49unYhdCxjc = h3Vc_4wxEbgd.vertex_faces j49unYhdCxjc = nDF4gVNx0u9Q.asarray([nDF4gVNx0u9Q.JE1frtxECu3x(ZVFOukm2rgun[H4NoA26ON7iG(p8Ou2emaDF7Z)]) if ftfygxgFas5X(p8Ou2emaDF7Z) > nzTpIcepk0o8('\060' + '\x6f' + chr(0b0 + 0o60), 8) else nzTpIcepk0o8('\060' + '\x6f' + chr(1977 - 1929), 8) for p8Ou2emaDF7Z in j49unYhdCxjc]) return j49unYhdCxjc
noahbenson/neuropythy
neuropythy/vision/retinotopy.py
retinotopy_model
def retinotopy_model(name='benson17', hemi=None, radius=np.pi/2.5, sphere_radius=100.0, search_paths=None, update=False): ''' retinotopy_model() yields a standard retinotopy model of V1, V2, and V3 as well as other areas (depending on the options). The model itself is represented as a RegisteredRetinotopyModel object, which may internally store a set of meshes with values at the vertices that define the polar angle and eccentricity, or as another object (such as with the SchiraModel). The mesh models are loaded from files in the neuropythy lib directory. Because the model's class is RegisteredRetinotopyModel, so the details of the model's 2D projection onto the cortical surface are included in the model. The following options may be given: * name (default: 'benson17') indicates the name of the model to load; the Benson17 model is included with the neuropythy library along with various others. If name is a filename, this file is loaded (must be a valid fmm or fmm.gz file). Currently, models that are included with neuropythy are: Benson17, Benson17-uncorrected, Schira10, and Benson14 (which is identical to Schira10, as Schira10 was used by Benson14). * hemi (default: None) specifies that the model should go with a particular hemisphere, either 'lh' or 'rh'. Generally, model files are names lh.<model>.fmm.gz or rh.<model>.fmm.gz, but models intended for the fsaverage_sym don't necessarily get a prefix. Note that you can leave this as none and just specify that the model name is 'lh.model' instead. * radius, sphere_radius (defaults: pi/2.5 and 100.0, respectively) specify the radius of the projection (on the surface of the sphere) and the radius of the sphere (100 is the radius for Freesurfer spheres). See neuropythy.registration.load_fmm_model for mode details. * search_paths (default: None) specifies directories in which to look for fmm model files. No matter what is included in these files, the neuropythy library's folders are searched last. ''' origname = name tup = (name,hemi,radius,sphere_radius) if tup in retinotopy_model.cache: return retinotopy_model.cache[tup] if os.path.isfile(name): fname = name name = None elif name.lower() in ['schira', 'schira10', 'schira2010', 'benson14', 'benson2014']: tmp = get_default_schira_model() retinotopy_model.cache[tup] = tmp return tmp else: name = name if hemi is None else ('%s.%s' % (hemi.lower(), name)) if len(name) > 4 and name[-4:] == '.fmm': fname = name name = name[:-4] elif len(name) > 7 and name[-7:] == '.fmm.gz': fname = name name = name[:-7] else: fname = name + '.fmm' # Find it in the search paths... spaths = ([] if search_paths is None else search_paths) + _retinotopy_model_paths fname = next( (os.path.join(path, nm0) for path in spaths for nm0 in os.listdir(path) for nm in [nm0[:-4] if len(nm0) > 4 and nm0[-4:] == '.fmm' else \ nm0[:-7] if len(nm0) > 7 and nm0[-7:] == '.fmm.gz' else \ None] if nm is not None and nm == name), None) if fname is None: raise ValueError('Cannot find an FFM file with the name %s' % origname) # Okay, load the model... mdl = load_fmm_model(fname).persist() retinotopy_model.cache[tup] = mdl return mdl
python
def retinotopy_model(name='benson17', hemi=None, radius=np.pi/2.5, sphere_radius=100.0, search_paths=None, update=False): ''' retinotopy_model() yields a standard retinotopy model of V1, V2, and V3 as well as other areas (depending on the options). The model itself is represented as a RegisteredRetinotopyModel object, which may internally store a set of meshes with values at the vertices that define the polar angle and eccentricity, or as another object (such as with the SchiraModel). The mesh models are loaded from files in the neuropythy lib directory. Because the model's class is RegisteredRetinotopyModel, so the details of the model's 2D projection onto the cortical surface are included in the model. The following options may be given: * name (default: 'benson17') indicates the name of the model to load; the Benson17 model is included with the neuropythy library along with various others. If name is a filename, this file is loaded (must be a valid fmm or fmm.gz file). Currently, models that are included with neuropythy are: Benson17, Benson17-uncorrected, Schira10, and Benson14 (which is identical to Schira10, as Schira10 was used by Benson14). * hemi (default: None) specifies that the model should go with a particular hemisphere, either 'lh' or 'rh'. Generally, model files are names lh.<model>.fmm.gz or rh.<model>.fmm.gz, but models intended for the fsaverage_sym don't necessarily get a prefix. Note that you can leave this as none and just specify that the model name is 'lh.model' instead. * radius, sphere_radius (defaults: pi/2.5 and 100.0, respectively) specify the radius of the projection (on the surface of the sphere) and the radius of the sphere (100 is the radius for Freesurfer spheres). See neuropythy.registration.load_fmm_model for mode details. * search_paths (default: None) specifies directories in which to look for fmm model files. No matter what is included in these files, the neuropythy library's folders are searched last. ''' origname = name tup = (name,hemi,radius,sphere_radius) if tup in retinotopy_model.cache: return retinotopy_model.cache[tup] if os.path.isfile(name): fname = name name = None elif name.lower() in ['schira', 'schira10', 'schira2010', 'benson14', 'benson2014']: tmp = get_default_schira_model() retinotopy_model.cache[tup] = tmp return tmp else: name = name if hemi is None else ('%s.%s' % (hemi.lower(), name)) if len(name) > 4 and name[-4:] == '.fmm': fname = name name = name[:-4] elif len(name) > 7 and name[-7:] == '.fmm.gz': fname = name name = name[:-7] else: fname = name + '.fmm' # Find it in the search paths... spaths = ([] if search_paths is None else search_paths) + _retinotopy_model_paths fname = next( (os.path.join(path, nm0) for path in spaths for nm0 in os.listdir(path) for nm in [nm0[:-4] if len(nm0) > 4 and nm0[-4:] == '.fmm' else \ nm0[:-7] if len(nm0) > 7 and nm0[-7:] == '.fmm.gz' else \ None] if nm is not None and nm == name), None) if fname is None: raise ValueError('Cannot find an FFM file with the name %s' % origname) # Okay, load the model... mdl = load_fmm_model(fname).persist() retinotopy_model.cache[tup] = mdl return mdl
[ "def", "retinotopy_model", "(", "name", "=", "'benson17'", ",", "hemi", "=", "None", ",", "radius", "=", "np", ".", "pi", "/", "2.5", ",", "sphere_radius", "=", "100.0", ",", "search_paths", "=", "None", ",", "update", "=", "False", ")", ":", "origname...
retinotopy_model() yields a standard retinotopy model of V1, V2, and V3 as well as other areas (depending on the options). The model itself is represented as a RegisteredRetinotopyModel object, which may internally store a set of meshes with values at the vertices that define the polar angle and eccentricity, or as another object (such as with the SchiraModel). The mesh models are loaded from files in the neuropythy lib directory. Because the model's class is RegisteredRetinotopyModel, so the details of the model's 2D projection onto the cortical surface are included in the model. The following options may be given: * name (default: 'benson17') indicates the name of the model to load; the Benson17 model is included with the neuropythy library along with various others. If name is a filename, this file is loaded (must be a valid fmm or fmm.gz file). Currently, models that are included with neuropythy are: Benson17, Benson17-uncorrected, Schira10, and Benson14 (which is identical to Schira10, as Schira10 was used by Benson14). * hemi (default: None) specifies that the model should go with a particular hemisphere, either 'lh' or 'rh'. Generally, model files are names lh.<model>.fmm.gz or rh.<model>.fmm.gz, but models intended for the fsaverage_sym don't necessarily get a prefix. Note that you can leave this as none and just specify that the model name is 'lh.model' instead. * radius, sphere_radius (defaults: pi/2.5 and 100.0, respectively) specify the radius of the projection (on the surface of the sphere) and the radius of the sphere (100 is the radius for Freesurfer spheres). See neuropythy.registration.load_fmm_model for mode details. * search_paths (default: None) specifies directories in which to look for fmm model files. No matter what is included in these files, the neuropythy library's folders are searched last.
[ "retinotopy_model", "()", "yields", "a", "standard", "retinotopy", "model", "of", "V1", "V2", "and", "V3", "as", "well", "as", "other", "areas", "(", "depending", "on", "the", "options", ")", ".", "The", "model", "itself", "is", "represented", "as", "a", ...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/vision/retinotopy.py#L578-L642
train
Returns a standard retinotopy model of the current system of the available model types.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf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0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2273 - 2223) + chr(1140 - 1086) + chr(0b11111 + 0o26), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + '\063' + '\060', 0o10), nzTpIcepk0o8(chr(0b110000 + 0o0) + '\157' + chr(0b110011) + '\x35' + chr(0b110011 + 0o2), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110010) + chr(52) + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b11101 + 0o23) + '\157' + '\061' + chr(349 - 301) + chr(200 - 150), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b1011 + 0o46) + chr(55) + chr(1696 - 1641), 1191 - 1183), nzTpIcepk0o8(chr(0b10100 + 0o34) + '\157' + '\063' + chr(1948 - 1899) + chr(590 - 537), 3222 - 3214), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + '\x31' + chr(0b10 + 0o57), 30368 - 30360), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101111 + 0o4) + '\x35' + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + '\x31' + '\060', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + '\067' + chr(50), 51975 - 51967), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(0b110001) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(1782 - 1734) + chr(111) + chr(539 - 489) + chr(53) + '\067', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1011111 + 0o20) + chr(51) + '\067' + chr(49), 7593 - 7585), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1100 + 0o46) + '\064' + '\065', 0b1000), nzTpIcepk0o8(chr(1632 - 1584) + '\157' + chr(54) + chr(0b110011 + 0o1), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b11000 + 0o31) + '\065' + '\x36', 0o10), nzTpIcepk0o8(chr(2246 - 2198) + '\x6f' + chr(601 - 551) + chr(0b100 + 0o63) + chr(0b101100 + 0o6), 8), nzTpIcepk0o8(chr(48) + chr(0b1001010 + 0o45) + chr(0b11100 + 0o25) + chr(0b101110 + 0o7) + chr(0b110100), 1312 - 1304), nzTpIcepk0o8('\060' + '\157' + chr(915 - 864) + chr(0b11000 + 0o37) + chr(0b110010), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(53) + '\066', 0b1000), nzTpIcepk0o8(chr(2086 - 2038) + '\x6f' + chr(1423 - 1373) + chr(52) + chr(1023 - 969), 8), nzTpIcepk0o8('\x30' + chr(5282 - 5171) + chr(779 - 730) + '\x34' + chr(2752 - 2699), ord("\x08")), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(111) + chr(0b110100) + chr(0b1100 + 0o44), 30469 - 30461), nzTpIcepk0o8(chr(2223 - 2175) + chr(4346 - 4235) + chr(0b110011) + chr(1339 - 1288) + '\065', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b10010 + 0o37) + chr(0b10010 + 0o42) + '\x37', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b10111 + 0o33) + chr(1525 - 1475) + chr(51), 26178 - 26170), nzTpIcepk0o8(chr(1465 - 1417) + chr(0b1101101 + 0o2) + chr(51) + '\x37' + chr(0b1100 + 0o50), 63639 - 63631), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(11004 - 10893) + chr(1165 - 1113) + '\x31', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010) + chr(51) + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\060' + chr(12055 - 11944) + '\x32' + '\062' + '\x34', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1071 - 1020) + chr(1424 - 1375) + chr(0b100110 + 0o13), 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(690 - 639) + chr(0b0 + 0o60) + chr(52), 0o10), nzTpIcepk0o8(chr(713 - 665) + chr(12026 - 11915) + '\062', ord("\x08")), nzTpIcepk0o8(chr(382 - 334) + '\x6f' + chr(0b1101 + 0o45) + chr(53) + chr(53), 0o10), nzTpIcepk0o8('\x30' + chr(435 - 324) + '\063' + chr(52) + chr(0b1001 + 0o47), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + chr(0b110000) + chr(52), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(0b1011 + 0o54) + '\x35', 0o10), nzTpIcepk0o8(chr(0b10100 + 0o34) + '\157' + chr(0b110011) + '\x36', 23189 - 23181), nzTpIcepk0o8(chr(0b110000) + chr(3671 - 3560) + chr(0b10010 + 0o37) + '\060' + chr(49), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1444 - 1396) + chr(111) + chr(53) + chr(0b110000), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x9b'), chr(9655 - 9555) + chr(0b1100101) + '\x63' + chr(7564 - 7453) + chr(0b1001 + 0o133) + '\145')('\165' + '\164' + chr(0b1011001 + 0o15) + chr(737 - 692) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def e_0pGsIB40a0(SLVB2BPA_mIe=roI3spqORKae(ES5oEprVxulp(b'\xd7\xfd\x83\xd5-\x11\xfc\xfe'), chr(2063 - 1963) + chr(0b1100011 + 0o2) + chr(8132 - 8033) + '\157' + chr(100) + chr(101))('\x75' + chr(0b110 + 0o156) + '\146' + '\x2d' + chr(867 - 811)), nRSX3HCpSIw0=None, qGhcQMWNyIbI=roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xdb\xd5\x9f\xfe)-\xbd\x9d\xba\xb1\xf5#'), chr(0b1010 + 0o132) + '\145' + chr(0b1011110 + 0o5) + '\x6f' + '\144' + '\145')(chr(0b1110101) + chr(11583 - 11467) + chr(8002 - 7900) + '\055' + '\070')) / 2.5, JUC_POnxcDNU=100.0, yQl6OBjKB5Cn=None, J_k2IYB1ceqn=nzTpIcepk0o8(chr(48) + chr(405 - 294) + chr(0b110000), ord("\x08"))): qKxUcWBmA2p4 = SLVB2BPA_mIe WRQDInte8Ztr = (SLVB2BPA_mIe, nRSX3HCpSIw0, qGhcQMWNyIbI, JUC_POnxcDNU) if WRQDInte8Ztr in roI3spqORKae(e_0pGsIB40a0, roI3spqORKae(ES5oEprVxulp(b'\xc5\xf6\xbc\x9e)9\x99\x8a\xbf\xf2\x83}'), chr(1278 - 1178) + chr(0b100001 + 0o104) + chr(0b11100 + 0o107) + chr(1328 - 1217) + '\x64' + chr(9504 - 9403))('\165' + chr(116) + '\x66' + chr(376 - 331) + chr(0b111000))): return roI3spqORKae(e_0pGsIB40a0, roI3spqORKae(ES5oEprVxulp(b'\xc5\xf6\xbc\x9e)9\x99\x8a\xbf\xf2\x83}'), chr(718 - 618) + '\145' + chr(0b1100011) + chr(8460 - 8349) + chr(100) + chr(101))('\165' + chr(0b100111 + 0o115) + chr(0b1100110) + '\x2d' + '\070'))[WRQDInte8Ztr] if roI3spqORKae(aHUqKstZLeS6.path, roI3spqORKae(ES5oEprVxulp(b'\xdc\xeb\x8b\xcf.\x1a'), chr(4094 - 3994) + chr(5243 - 5142) + chr(99) + chr(3377 - 3266) + '\x64' + chr(5237 - 5136))('\165' + chr(2166 - 2050) + chr(0b1100010 + 0o4) + '\x2d' + '\x38'))(SLVB2BPA_mIe): jXqxEQuu_5DD = SLVB2BPA_mIe SLVB2BPA_mIe = None elif roI3spqORKae(SLVB2BPA_mIe, roI3spqORKae(ES5oEprVxulp(b'\xed\xf6\xd5\xe3\x0c(\x80\x93\x8f\xc1\xe88'), chr(8987 - 8887) + '\145' + chr(8038 - 7939) + '\x6f' + chr(3821 - 3721) + chr(0b1100101))(chr(2521 - 2404) + chr(0b1110100) + chr(102) + chr(0b1000 + 0o45) + '\070'))() in [roI3spqORKae(ES5oEprVxulp(b'\xc6\xfb\x85\xcf0\x1e'), chr(100) + '\145' + chr(99) + '\x6f' + chr(100) + '\145')(chr(117) + chr(116) + chr(102) + chr(1204 - 1159) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\xc6\xfb\x85\xcf0\x1e\xfc\xf9'), chr(0b1100100) + chr(101) + chr(6618 - 6519) + chr(2027 - 1916) + '\144' + chr(0b1100101))(chr(0b1110101) + chr(116) + chr(102) + '\055' + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\xc6\xfb\x85\xcf0\x1e\xff\xf9\xda\xb8'), chr(0b110111 + 0o55) + chr(0b1100101) + chr(99) + '\157' + chr(100) + chr(0b11010 + 0o113))(chr(0b1000010 + 0o63) + chr(0b1000001 + 0o63) + '\x66' + '\x2d' + '\070'), roI3spqORKae(ES5oEprVxulp(b'\xd7\xfd\x83\xd5-\x11\xfc\xfd'), chr(100) + '\145' + '\x63' + '\x6f' + '\144' + chr(8576 - 8475))(chr(9399 - 9282) + '\x74' + '\146' + '\055' + chr(0b10000 + 0o50)), roI3spqORKae(ES5oEprVxulp(b'\xd7\xfd\x83\xd5-\x11\xff\xf9\xda\xbc'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(0b111000 + 0o67) + chr(0b101101 + 0o67) + chr(0b100101 + 0o100))(chr(7610 - 7493) + '\164' + chr(102) + chr(45) + chr(0b111000))]: PT32xG247TS3 = RUmQrfnbv19_() e_0pGsIB40a0.pnQ8kFTCTz91[WRQDInte8Ztr] = PT32xG247TS3 return PT32xG247TS3 else: SLVB2BPA_mIe = SLVB2BPA_mIe if nRSX3HCpSIw0 is None else roI3spqORKae(ES5oEprVxulp(b'\x90\xeb\xc3\x831'), chr(0b1100100) + chr(101) + chr(0b1100011) + chr(0b1000101 + 0o52) + chr(0b1100100) + chr(101))('\x75' + chr(986 - 870) + '\x66' + chr(1439 - 1394) + chr(2156 - 2100)) % (nRSX3HCpSIw0.Xn8ENWMZdIRt(), SLVB2BPA_mIe) if ftfygxgFas5X(SLVB2BPA_mIe) > nzTpIcepk0o8('\060' + '\x6f' + '\x34', 0o10) and SLVB2BPA_mIe[-nzTpIcepk0o8('\060' + chr(0b1000010 + 0o55) + '\x34', 8):] == roI3spqORKae(ES5oEprVxulp(b'\x9b\xfe\x80\xcb'), chr(0b111011 + 0o51) + chr(0b1100101) + chr(0b1100011) + chr(111) + '\144' + chr(101))(chr(0b1110011 + 0o2) + chr(0b1001111 + 0o45) + '\x66' + chr(277 - 232) + '\x38'): jXqxEQuu_5DD = SLVB2BPA_mIe SLVB2BPA_mIe = SLVB2BPA_mIe[:-nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(113 - 2) + '\064', 8)] elif ftfygxgFas5X(SLVB2BPA_mIe) > nzTpIcepk0o8('\060' + '\x6f' + '\067', ord("\x08")) and SLVB2BPA_mIe[-nzTpIcepk0o8('\x30' + '\x6f' + chr(55), 8):] == roI3spqORKae(ES5oEprVxulp(b'\x9b\xfe\x80\xcbl\x18\xb7'), '\x64' + chr(101) + '\x63' + '\157' + chr(0b110110 + 0o56) + chr(0b1100101))('\165' + chr(12498 - 12382) + chr(0b1100110) + '\055' + chr(56)): jXqxEQuu_5DD = SLVB2BPA_mIe SLVB2BPA_mIe = SLVB2BPA_mIe[:-nzTpIcepk0o8(chr(953 - 905) + '\157' + '\067', 8)] else: jXqxEQuu_5DD = SLVB2BPA_mIe + roI3spqORKae(ES5oEprVxulp(b'\x9b\xfe\x80\xcb'), '\x64' + chr(0b11000 + 0o115) + chr(99) + chr(0b10001 + 0o136) + '\144' + '\145')('\165' + chr(116) + chr(0b10010 + 0o124) + chr(45) + '\x38') qX_lIlfFG1qh = ([] if yQl6OBjKB5Cn is None else yQl6OBjKB5Cn) + jq4cQItEO0n2 jXqxEQuu_5DD = ltB3XhPy2rYf((aHUqKstZLeS6.path.Y4yM9BcfTCNq(_pSYqrosNb95, NLZSt0wqRyF3) for _pSYqrosNb95 in qX_lIlfFG1qh for NLZSt0wqRyF3 in aHUqKstZLeS6.listdir(_pSYqrosNb95) for p06CG6wGLjN1 in [NLZSt0wqRyF3[:-nzTpIcepk0o8(chr(48) + chr(7671 - 7560) + chr(52), 8)] if ftfygxgFas5X(NLZSt0wqRyF3) > nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(6789 - 6678) + '\x34', 8) and NLZSt0wqRyF3[-nzTpIcepk0o8(chr(0b100 + 0o54) + '\x6f' + chr(1259 - 1207), 8):] == roI3spqORKae(ES5oEprVxulp(b'\x9b\xfe\x80\xcb'), chr(0b1100100) + '\x65' + chr(4634 - 4535) + chr(0b110000 + 0o77) + '\144' + '\x65')(chr(8121 - 8004) + '\164' + '\146' + chr(45) + chr(56)) else NLZSt0wqRyF3[:-nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(55), 8)] if ftfygxgFas5X(NLZSt0wqRyF3) > nzTpIcepk0o8(chr(48) + chr(0b110001 + 0o76) + '\x37', 8) and NLZSt0wqRyF3[-nzTpIcepk0o8('\x30' + chr(0b1101011 + 0o4) + chr(0b111 + 0o60), 8):] == roI3spqORKae(ES5oEprVxulp(b'\x9b\xfe\x80\xcbl\x18\xb7'), '\x64' + chr(101) + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(101))('\165' + chr(12796 - 12680) + chr(102) + chr(0b101101) + chr(0b111000 + 0o0)) else None] if p06CG6wGLjN1 is not None and p06CG6wGLjN1 == SLVB2BPA_mIe), None) if jXqxEQuu_5DD is None: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xf6\xf9\x83\xc8-\x0b\xed\xaf\x82\xe6\xdel\xce\x97\x85r(\xf7L\x9cG\xca\x00\x00\xaa\x0e\xe7\x94\x01\xee\xfc\xac\xe4l\xcc\x8d\xe1];2'), '\x64' + chr(3729 - 3628) + chr(99) + chr(0b1101111) + chr(100) + '\x65')('\165' + chr(116) + chr(6427 - 6325) + chr(0b100101 + 0o10) + chr(839 - 783)) % qKxUcWBmA2p4) AyfNy9MUxk6F = KVc9Dz2V6Q0Y(jXqxEQuu_5DD).persist() e_0pGsIB40a0.pnQ8kFTCTz91[WRQDInte8Ztr] = AyfNy9MUxk6F return AyfNy9MUxk6F
noahbenson/neuropythy
neuropythy/vision/retinotopy.py
occipital_flatmap
def occipital_flatmap(cortex, radius=None): ''' occipital_flatmap(cortex) yields a flattened mesh of the occipital cortex of the given cortex object. Note that if the cortex is not registrered to fsaverage, this will fail. The option radius may be given to specify the fraction of the cortical sphere (in radians) to include in the map. ''' mdl = retinotopy_model('benson17', hemi=cortex.chirality) mp = mdl.map_projection if radius is not None: mp = mp.copy(radius=radius) return mp(cortex)
python
def occipital_flatmap(cortex, radius=None): ''' occipital_flatmap(cortex) yields a flattened mesh of the occipital cortex of the given cortex object. Note that if the cortex is not registrered to fsaverage, this will fail. The option radius may be given to specify the fraction of the cortical sphere (in radians) to include in the map. ''' mdl = retinotopy_model('benson17', hemi=cortex.chirality) mp = mdl.map_projection if radius is not None: mp = mp.copy(radius=radius) return mp(cortex)
[ "def", "occipital_flatmap", "(", "cortex", ",", "radius", "=", "None", ")", ":", "mdl", "=", "retinotopy_model", "(", "'benson17'", ",", "hemi", "=", "cortex", ".", "chirality", ")", "mp", "=", "mdl", ".", "map_projection", "if", "radius", "is", "not", "...
occipital_flatmap(cortex) yields a flattened mesh of the occipital cortex of the given cortex object. Note that if the cortex is not registrered to fsaverage, this will fail. The option radius may be given to specify the fraction of the cortical sphere (in radians) to include in the map.
[ "occipital_flatmap", "(", "cortex", ")", "yields", "a", "flattened", "mesh", "of", "the", "occipital", "cortex", "of", "the", "given", "cortex", "object", ".", "Note", "that", "if", "the", "cortex", "is", "not", "registrered", "to", "fsaverage", "this", "wil...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/vision/retinotopy.py#L645-L658
train
Returns a flattened mesh of the occipital cortex of the given cortex object.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9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0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(2043 - 1995) + chr(11928 - 11817) + chr(0b100011 + 0o16) + '\067' + chr(2379 - 2329), ord("\x08")), nzTpIcepk0o8(chr(402 - 354) + '\x6f' + chr(0b11101 + 0o24) + '\061' + '\x35', 0o10), nzTpIcepk0o8('\060' + '\157' + chr(326 - 276) + chr(0b100110 + 0o20) + chr(49), 0o10), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(280 - 169) + chr(0b110001) + chr(0b101101 + 0o3), 0b1000), nzTpIcepk0o8(chr(2188 - 2140) + chr(0b1011011 + 0o24) + chr(0b1 + 0o62) + chr(48), ord("\x08")), nzTpIcepk0o8('\060' + chr(9228 - 9117) + chr(0b101000 + 0o11) + '\x30' + '\x37', 27328 - 27320), nzTpIcepk0o8('\x30' + '\x6f' + chr(53) + '\x34', 0o10), nzTpIcepk0o8(chr(48) + chr(10183 - 10072) + chr(1072 - 1022) + chr(48) + chr(0b0 + 0o66), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(49) + chr(0b101000 + 0o17) + chr(0b110110), 39099 - 39091), nzTpIcepk0o8(chr(0b1011 + 0o45) + '\x6f' + chr(1153 - 1102) + '\x31' + chr(0b11100 + 0o33), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1001010 + 0o45) + chr(0b1 + 0o61) + chr(51) + chr(1076 - 1028), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001) + chr(2393 - 2344) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b101101 + 0o102) + '\061' + chr(0b110010) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(7403 - 7292) + chr(0b10101 + 0o34) + chr(0b10000 + 0o46), 38809 - 38801), nzTpIcepk0o8(chr(922 - 874) + chr(8568 - 8457) + chr(51) + chr(52) + '\x36', ord("\x08")), nzTpIcepk0o8('\060' + chr(3223 - 3112) + chr(54) + '\060', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062' + chr(0b110011) + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\060' + chr(2497 - 2386) + '\x31' + chr(51) + '\063', 0o10), nzTpIcepk0o8('\060' + chr(2338 - 2227) + chr(0b101 + 0o54) + chr(0b110111) + chr(2855 - 2801), 8), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + chr(53) + chr(54), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + chr(49) + '\065', 8), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(0b1101111) + '\061' + chr(50) + '\060', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(11904 - 11793) + chr(1550 - 1501) + chr(930 - 880) + chr(0b11110 + 0o31), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\061' + '\x37' + '\066', 8), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(0b101111 + 0o100) + chr(0b101000 + 0o13) + '\x31' + chr(0b10101 + 0o37), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + chr(0b101000 + 0o15) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(0b110000) + chr(0b110011), 40407 - 40399), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + chr(0b110101) + chr(55), 47824 - 47816), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x33' + chr(0b110001), 20032 - 20024), nzTpIcepk0o8(chr(0b110000) + chr(0b1011101 + 0o22) + chr(51) + '\x30' + chr(0b110011), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b11011 + 0o124) + chr(0b110001 + 0o2) + '\066' + '\067', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\062' + '\063' + '\064', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11010 + 0o27) + '\065' + chr(1351 - 1297), 8), nzTpIcepk0o8('\x30' + '\157' + chr(1689 - 1638) + chr(0b11010 + 0o33), 0b1000), nzTpIcepk0o8(chr(302 - 254) + chr(0b1101111) + chr(0b110001) + chr(51) + chr(0b110101), 28381 - 28373), nzTpIcepk0o8('\x30' + chr(111) + '\x33' + chr(55), 4675 - 4667), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b111001 + 0o66) + chr(50) + chr(0b100010 + 0o25), 0o10), nzTpIcepk0o8('\x30' + chr(0b1000010 + 0o55) + chr(49) + chr(52) + chr(2155 - 2106), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + chr(52) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + '\060' + chr(55), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\x6f' + chr(0b1 + 0o64) + chr(0b101 + 0o53), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'T'), chr(0b1100100) + '\x65' + '\x63' + '\x6f' + chr(0b1100100) + '\145')(chr(0b11 + 0o162) + chr(0b1110100) + '\146' + chr(792 - 747) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def dUxpP80uXcPX(i_tHHjQwY02v, qGhcQMWNyIbI=None): AyfNy9MUxk6F = e_0pGsIB40a0(roI3spqORKae(ES5oEprVxulp(b'\x18(\xdf{w)\x1d\xb1'), chr(0b111100 + 0o50) + '\145' + chr(99) + chr(6268 - 6157) + chr(0b1100100) + chr(0b1100101))('\x75' + chr(2245 - 2129) + chr(102) + '\x2d' + '\x38'), hemi=i_tHHjQwY02v.chirality) GgXLIV4arziQ = AyfNy9MUxk6F.map_projection if qGhcQMWNyIbI is not None: GgXLIV4arziQ = GgXLIV4arziQ.copy(radius=qGhcQMWNyIbI) return GgXLIV4arziQ(i_tHHjQwY02v)
noahbenson/neuropythy
neuropythy/vision/retinotopy.py
retinotopy_mesh_field
def retinotopy_mesh_field(mesh, mdl, polar_angle=None, eccentricity=None, weight=None, weight_min=0, scale=1, sigma=None, shape=2, suffix=None, max_eccentricity=Ellipsis, max_polar_angle=180, angle_type='both', exclusion_threshold=None): ''' retinotopy_mesh_field(mesh, model) yields a list that can be used with mesh_register as a potential term. This should generally be used in a similar fashion to retinotopy_anchors. Options: * polar_angle (default None) specifies that the given data should be used in place of the 'polar_angle' or 'PRF_polar_angle' property values. The given argument must be numeric and the same length as the the number of vertices in the mesh. If None is given, then the property value of the mesh is used; if a list is given and any element is None, then the weight for that vertex is treated as a zero. If the option is a string, then the property value with the same name isused as the polar_angle data. * eccentricity (default None) specifies that the given data should be used in places of the 'eccentricity' or 'PRF_eccentricity' property values. The eccentricity option is handled virtually identically to the polar_angle option. * weight (default None) specifies that the weight or scale of the data; this is handled generally like the polar_angle and eccentricity options, but may also be 1, indicating that all vertices with polar_angle and eccentricity values defined will be given a weight of 1. If weight is left as None, then the function will check for 'weight', 'variance_explained', 'PRF_variance_explained', and 'retinotopy_weight' values and will use the first found (in that order). If none of these is found, then a value of 1 is assumed. * weight_min (default 0) specifies that the weight must be higher than the given value inn order to be included in the fit; vertices with weights below this value have their weights truncated to 0. * scale (default 1) specifies a constant by which to multiply all weights for all anchors; the value None is interpreted as 1. * shape (default 2.0) specifies the exponent in the harmonic function. * sigma (default None) specifies, if given as a number, the sigma parameter of the Gaussian potential function; if sigma is None, however, the potential function is harmonic. * suffix (default None) specifies any additional arguments that should be appended to the potential function description list that is produced by this function; i.e., the retinotopy_anchors function produces a list, and the contents of suffix, if given and not None, are appended to that list (see mesh_register). * max_eccentricity (default Ellipsis) specifies how the eccentricity portion of the potential field should be normalized. Specifically, in order to ensure that polar angle and eccentricity contribute roughly equally to the potential, this should be approximately the max eccentricity appearing in the data on the mesh. If the argument is the default then the actual max eccentricity will be used. * max_polar_angle (default: 180) is used the same way as the max_eccentricity function, but if Ellipsis is given, the value 180 is always assumed regardless of measured data. * exclusion_threshold (default None) specifies that if the initial norm of a vertex's gradient is greater than exclusion_threshold * std + median (where std and median are calculated over the vertices with non-zero gradients) then its weight is set to 0 and it is not kept as part of the potential field. * angle_type (default: None) specifies that only one type of angle should be included in the mesh; this may be one of 'polar', 'eccen', 'eccentricity', 'angle', or 'polar_angle'. If None, then both polar angle and eccentricity are included. Example: # The retinotopy_anchors function is intended for use with mesh_register, as follows: # Define our Schira Model: model = neuropythy.retinotopy_model() # Make sure our mesh has polar angle, eccentricity, and weight data: mesh.prop('polar_angle', polar_angle_vertex_data); mesh.prop('eccentricity', eccentricity_vertex_data); mesh.prop('weight', variance_explained_vertex_data); # register the mesh using the retinotopy and model: registered_mesh = neuropythy.registration.mesh_register( mesh, ['mesh', retinotopy_mesh_field(mesh, model)], max_step_size=0.05, max_steps=2000) ''' #TODO: given a 3D mesh and a registered model, we should be able to return a 3D version of the # anchors by unprojecting them if pimms.is_str(mdl): mdl = retinotopy_model(mdl) if not isinstance(mdl, RetinotopyMeshModel): if isinstance(mdl, RegisteredRetinotopyModel): mdl = mdl.model if not isinstance(mdl, RetinotopyMeshModel): raise RuntimeError('given model is not a RetinotopyMeshModel instance!') if not hasattr(mdl, 'data') or 'polar_angle' not in mdl.data or 'eccentricity' not in mdl.data: raise ValueError('Retinotopy model does not have polar angle and eccentricity data') if not isinstance(mesh, CorticalMesh): raise RuntimeError('given mesh is not a CorticalMesh object!') n = mesh.vertex_count X = mesh.coordinates.T if weight_min is None: weight_min = 0 # make sure we have our polar angle/eccen/weight values: # (weight is odd because it might be a single number, so handle that first) (polar_angle, eccentricity, weight) = [ extract_retinotopy_argument(mesh, name, arg, default='empirical') for (name, arg) in [ ('polar_angle', polar_angle), ('eccentricity', eccentricity), ('weight', [weight for i in range(n)] \ if isinstance(weight, Number) or np.issubdtype(type(weight), np.float) \ else weight)]] # Make sure they contain no None/invalid values (polar_angle, eccentricity, weight) = _retinotopy_vectors_to_float( polar_angle, eccentricity, weight, weight_min=weight_min) if np.sum(weight > 0) == 0: raise ValueError('No positive weights found') idcs = [i for (i,w) in enumerate(weight) if w > 0] # Okay, let's get the model data ready mdl_1s = np.ones(mdl.forward.coordinates.shape[0]) mdl_coords = np.dot(mdl.transform, np.vstack((mdl.forward.coordinates.T, mdl_1s)))[:2].T mdl_faces = mdl.forward.triangles mdl_data = np.asarray([mdl.data['polar_angle'], mdl.data['eccentricity']]) # Get just the relevant weights and the scale wgts = weight[idcs] * (1 if scale is None else scale) # and the relevant polar angle/eccen data msh_data = np.asarray([polar_angle, eccentricity])[:,idcs] # format shape correctly shape = np.full((len(idcs)), float(shape), dtype=np.float32) # Last thing before constructing the field description: normalize both polar angle and eccen to # cover a range of 0-1: if max_eccentricity is Ellipsis: max_eccentricity = np.max(msh_data[1]) if max_polar_angle is Ellipsis: max_polar_angle = 180 if max_polar_angle is not None: msh_data[0] /= max_polar_angle mdl_data[0] /= max_polar_angle if max_eccentricity is not None: msh_data[1] /= max_eccentricity mdl_data[1] /= max_eccentricity # Check if we are making an eccentricity-only or a polar-angle-only field: if angle_type is not None: angle_type = angle_type.lower() if angle_type != 'both' and angle_type != 'all': convert = {'eccen':'eccen', 'eccentricity':'eccen', 'radius':'eccen', 'angle':'angle', 'polar_angle': 'angle', 'polar': 'angle'} angle_type = convert[angle_type] mdl_data = [mdl_data[0 if angle_type == 'angle' else 1]] msh_data = [msh_data[0 if angle_type == 'angle' else 1]] # okay, we've partially parsed the data that was given; now we can construct the final list of # instructions: if sigma is None: field_desc = ['mesh-field', 'harmonic', mdl_coords, mdl_faces, mdl_data, idcs, msh_data, 'scale', wgts, 'order', shape] else: if not hasattr(sigma, '__iter__'): sigma = [sigma for _ in wgts] field_desc = ['mesh-field', 'gaussian', mdl_coords, mdl_faces, mdl_data, idcs, msh_data, 'scale', wgts, 'order', shape, 'sigma', sigma] if suffix is not None: field_desc += suffix # now, if we want to exclude outliers, we do so here: if exclusion_threshold is not None: jpe = java_potential_term(mesh, field_desc) jcrds = to_java_doubles(mesh.coordinates) jgrad = to_java_doubles(np.zeros(mesh.coordinates.shape)) jpe.calculate(jcrds,jgrad) gnorms = np.sum((np.asarray([[x for x in row] for row in jgrad])[:, idcs])**2, axis=0) gnorms_pos = gnorms[gnorms > 0] mdn = np.median(gnorms_pos) std = np.std(gnorms_pos) gn_idcs = np.where(gnorms > mdn + std*3.5)[0] for i in gn_idcs: wgts[i] = 0; return field_desc
python
def retinotopy_mesh_field(mesh, mdl, polar_angle=None, eccentricity=None, weight=None, weight_min=0, scale=1, sigma=None, shape=2, suffix=None, max_eccentricity=Ellipsis, max_polar_angle=180, angle_type='both', exclusion_threshold=None): ''' retinotopy_mesh_field(mesh, model) yields a list that can be used with mesh_register as a potential term. This should generally be used in a similar fashion to retinotopy_anchors. Options: * polar_angle (default None) specifies that the given data should be used in place of the 'polar_angle' or 'PRF_polar_angle' property values. The given argument must be numeric and the same length as the the number of vertices in the mesh. If None is given, then the property value of the mesh is used; if a list is given and any element is None, then the weight for that vertex is treated as a zero. If the option is a string, then the property value with the same name isused as the polar_angle data. * eccentricity (default None) specifies that the given data should be used in places of the 'eccentricity' or 'PRF_eccentricity' property values. The eccentricity option is handled virtually identically to the polar_angle option. * weight (default None) specifies that the weight or scale of the data; this is handled generally like the polar_angle and eccentricity options, but may also be 1, indicating that all vertices with polar_angle and eccentricity values defined will be given a weight of 1. If weight is left as None, then the function will check for 'weight', 'variance_explained', 'PRF_variance_explained', and 'retinotopy_weight' values and will use the first found (in that order). If none of these is found, then a value of 1 is assumed. * weight_min (default 0) specifies that the weight must be higher than the given value inn order to be included in the fit; vertices with weights below this value have their weights truncated to 0. * scale (default 1) specifies a constant by which to multiply all weights for all anchors; the value None is interpreted as 1. * shape (default 2.0) specifies the exponent in the harmonic function. * sigma (default None) specifies, if given as a number, the sigma parameter of the Gaussian potential function; if sigma is None, however, the potential function is harmonic. * suffix (default None) specifies any additional arguments that should be appended to the potential function description list that is produced by this function; i.e., the retinotopy_anchors function produces a list, and the contents of suffix, if given and not None, are appended to that list (see mesh_register). * max_eccentricity (default Ellipsis) specifies how the eccentricity portion of the potential field should be normalized. Specifically, in order to ensure that polar angle and eccentricity contribute roughly equally to the potential, this should be approximately the max eccentricity appearing in the data on the mesh. If the argument is the default then the actual max eccentricity will be used. * max_polar_angle (default: 180) is used the same way as the max_eccentricity function, but if Ellipsis is given, the value 180 is always assumed regardless of measured data. * exclusion_threshold (default None) specifies that if the initial norm of a vertex's gradient is greater than exclusion_threshold * std + median (where std and median are calculated over the vertices with non-zero gradients) then its weight is set to 0 and it is not kept as part of the potential field. * angle_type (default: None) specifies that only one type of angle should be included in the mesh; this may be one of 'polar', 'eccen', 'eccentricity', 'angle', or 'polar_angle'. If None, then both polar angle and eccentricity are included. Example: # The retinotopy_anchors function is intended for use with mesh_register, as follows: # Define our Schira Model: model = neuropythy.retinotopy_model() # Make sure our mesh has polar angle, eccentricity, and weight data: mesh.prop('polar_angle', polar_angle_vertex_data); mesh.prop('eccentricity', eccentricity_vertex_data); mesh.prop('weight', variance_explained_vertex_data); # register the mesh using the retinotopy and model: registered_mesh = neuropythy.registration.mesh_register( mesh, ['mesh', retinotopy_mesh_field(mesh, model)], max_step_size=0.05, max_steps=2000) ''' #TODO: given a 3D mesh and a registered model, we should be able to return a 3D version of the # anchors by unprojecting them if pimms.is_str(mdl): mdl = retinotopy_model(mdl) if not isinstance(mdl, RetinotopyMeshModel): if isinstance(mdl, RegisteredRetinotopyModel): mdl = mdl.model if not isinstance(mdl, RetinotopyMeshModel): raise RuntimeError('given model is not a RetinotopyMeshModel instance!') if not hasattr(mdl, 'data') or 'polar_angle' not in mdl.data or 'eccentricity' not in mdl.data: raise ValueError('Retinotopy model does not have polar angle and eccentricity data') if not isinstance(mesh, CorticalMesh): raise RuntimeError('given mesh is not a CorticalMesh object!') n = mesh.vertex_count X = mesh.coordinates.T if weight_min is None: weight_min = 0 # make sure we have our polar angle/eccen/weight values: # (weight is odd because it might be a single number, so handle that first) (polar_angle, eccentricity, weight) = [ extract_retinotopy_argument(mesh, name, arg, default='empirical') for (name, arg) in [ ('polar_angle', polar_angle), ('eccentricity', eccentricity), ('weight', [weight for i in range(n)] \ if isinstance(weight, Number) or np.issubdtype(type(weight), np.float) \ else weight)]] # Make sure they contain no None/invalid values (polar_angle, eccentricity, weight) = _retinotopy_vectors_to_float( polar_angle, eccentricity, weight, weight_min=weight_min) if np.sum(weight > 0) == 0: raise ValueError('No positive weights found') idcs = [i for (i,w) in enumerate(weight) if w > 0] # Okay, let's get the model data ready mdl_1s = np.ones(mdl.forward.coordinates.shape[0]) mdl_coords = np.dot(mdl.transform, np.vstack((mdl.forward.coordinates.T, mdl_1s)))[:2].T mdl_faces = mdl.forward.triangles mdl_data = np.asarray([mdl.data['polar_angle'], mdl.data['eccentricity']]) # Get just the relevant weights and the scale wgts = weight[idcs] * (1 if scale is None else scale) # and the relevant polar angle/eccen data msh_data = np.asarray([polar_angle, eccentricity])[:,idcs] # format shape correctly shape = np.full((len(idcs)), float(shape), dtype=np.float32) # Last thing before constructing the field description: normalize both polar angle and eccen to # cover a range of 0-1: if max_eccentricity is Ellipsis: max_eccentricity = np.max(msh_data[1]) if max_polar_angle is Ellipsis: max_polar_angle = 180 if max_polar_angle is not None: msh_data[0] /= max_polar_angle mdl_data[0] /= max_polar_angle if max_eccentricity is not None: msh_data[1] /= max_eccentricity mdl_data[1] /= max_eccentricity # Check if we are making an eccentricity-only or a polar-angle-only field: if angle_type is not None: angle_type = angle_type.lower() if angle_type != 'both' and angle_type != 'all': convert = {'eccen':'eccen', 'eccentricity':'eccen', 'radius':'eccen', 'angle':'angle', 'polar_angle': 'angle', 'polar': 'angle'} angle_type = convert[angle_type] mdl_data = [mdl_data[0 if angle_type == 'angle' else 1]] msh_data = [msh_data[0 if angle_type == 'angle' else 1]] # okay, we've partially parsed the data that was given; now we can construct the final list of # instructions: if sigma is None: field_desc = ['mesh-field', 'harmonic', mdl_coords, mdl_faces, mdl_data, idcs, msh_data, 'scale', wgts, 'order', shape] else: if not hasattr(sigma, '__iter__'): sigma = [sigma for _ in wgts] field_desc = ['mesh-field', 'gaussian', mdl_coords, mdl_faces, mdl_data, idcs, msh_data, 'scale', wgts, 'order', shape, 'sigma', sigma] if suffix is not None: field_desc += suffix # now, if we want to exclude outliers, we do so here: if exclusion_threshold is not None: jpe = java_potential_term(mesh, field_desc) jcrds = to_java_doubles(mesh.coordinates) jgrad = to_java_doubles(np.zeros(mesh.coordinates.shape)) jpe.calculate(jcrds,jgrad) gnorms = np.sum((np.asarray([[x for x in row] for row in jgrad])[:, idcs])**2, axis=0) gnorms_pos = gnorms[gnorms > 0] mdn = np.median(gnorms_pos) std = np.std(gnorms_pos) gn_idcs = np.where(gnorms > mdn + std*3.5)[0] for i in gn_idcs: wgts[i] = 0; return field_desc
[ "def", "retinotopy_mesh_field", "(", "mesh", ",", "mdl", ",", "polar_angle", "=", "None", ",", "eccentricity", "=", "None", ",", "weight", "=", "None", ",", "weight_min", "=", "0", ",", "scale", "=", "1", ",", "sigma", "=", "None", ",", "shape", "=", ...
retinotopy_mesh_field(mesh, model) yields a list that can be used with mesh_register as a potential term. This should generally be used in a similar fashion to retinotopy_anchors. Options: * polar_angle (default None) specifies that the given data should be used in place of the 'polar_angle' or 'PRF_polar_angle' property values. The given argument must be numeric and the same length as the the number of vertices in the mesh. If None is given, then the property value of the mesh is used; if a list is given and any element is None, then the weight for that vertex is treated as a zero. If the option is a string, then the property value with the same name isused as the polar_angle data. * eccentricity (default None) specifies that the given data should be used in places of the 'eccentricity' or 'PRF_eccentricity' property values. The eccentricity option is handled virtually identically to the polar_angle option. * weight (default None) specifies that the weight or scale of the data; this is handled generally like the polar_angle and eccentricity options, but may also be 1, indicating that all vertices with polar_angle and eccentricity values defined will be given a weight of 1. If weight is left as None, then the function will check for 'weight', 'variance_explained', 'PRF_variance_explained', and 'retinotopy_weight' values and will use the first found (in that order). If none of these is found, then a value of 1 is assumed. * weight_min (default 0) specifies that the weight must be higher than the given value inn order to be included in the fit; vertices with weights below this value have their weights truncated to 0. * scale (default 1) specifies a constant by which to multiply all weights for all anchors; the value None is interpreted as 1. * shape (default 2.0) specifies the exponent in the harmonic function. * sigma (default None) specifies, if given as a number, the sigma parameter of the Gaussian potential function; if sigma is None, however, the potential function is harmonic. * suffix (default None) specifies any additional arguments that should be appended to the potential function description list that is produced by this function; i.e., the retinotopy_anchors function produces a list, and the contents of suffix, if given and not None, are appended to that list (see mesh_register). * max_eccentricity (default Ellipsis) specifies how the eccentricity portion of the potential field should be normalized. Specifically, in order to ensure that polar angle and eccentricity contribute roughly equally to the potential, this should be approximately the max eccentricity appearing in the data on the mesh. If the argument is the default then the actual max eccentricity will be used. * max_polar_angle (default: 180) is used the same way as the max_eccentricity function, but if Ellipsis is given, the value 180 is always assumed regardless of measured data. * exclusion_threshold (default None) specifies that if the initial norm of a vertex's gradient is greater than exclusion_threshold * std + median (where std and median are calculated over the vertices with non-zero gradients) then its weight is set to 0 and it is not kept as part of the potential field. * angle_type (default: None) specifies that only one type of angle should be included in the mesh; this may be one of 'polar', 'eccen', 'eccentricity', 'angle', or 'polar_angle'. If None, then both polar angle and eccentricity are included. Example: # The retinotopy_anchors function is intended for use with mesh_register, as follows: # Define our Schira Model: model = neuropythy.retinotopy_model() # Make sure our mesh has polar angle, eccentricity, and weight data: mesh.prop('polar_angle', polar_angle_vertex_data); mesh.prop('eccentricity', eccentricity_vertex_data); mesh.prop('weight', variance_explained_vertex_data); # register the mesh using the retinotopy and model: registered_mesh = neuropythy.registration.mesh_register( mesh, ['mesh', retinotopy_mesh_field(mesh, model)], max_step_size=0.05, max_steps=2000)
[ "retinotopy_mesh_field", "(", "mesh", "model", ")", "yields", "a", "list", "that", "can", "be", "used", "with", "mesh_register", "as", "a", "potential", "term", ".", "This", "should", "generally", "be", "used", "in", "a", "similar", "fashion", "to", "retinot...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/vision/retinotopy.py#L670-L824
train
Return a list of objects that can be used with a given mesh.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ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mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1493 - 1445) + chr(111) + '\065' + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\062' + chr(51) + '\x35', 46703 - 46695), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1000100 + 0o53) + chr(0b10101 + 0o36) + '\062' + chr(0b10001 + 0o45), 0b1000), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(0b1101111) + chr(1831 - 1781) + chr(2360 - 2308) + '\063', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(51) + '\x30' + chr(0b1110 + 0o47), 56801 - 56793), nzTpIcepk0o8(chr(1476 - 1428) + chr(111) + chr(50) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(52) + '\x36', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + chr(0b110000) + chr(0b100110 + 0o21), 0o10), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b100010 + 0o115) + '\x31' + chr(50) + '\x33', 0b1000), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b10011 + 0o134) + chr(141 - 88) + chr(55), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\067' + '\063', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b101010 + 0o105) + chr(0b100011 + 0o23) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b1101111) + chr(0b100011 + 0o20) + chr(0b110010), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + '\x30' + chr(0b100011 + 0o16), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b100001 + 0o116) + '\x37' + chr(2142 - 2093), 54782 - 54774), nzTpIcepk0o8('\060' + '\x6f' + '\x34' + chr(52), 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\063' + chr(0b10001 + 0o41) + chr(161 - 112), 0b1000), nzTpIcepk0o8('\x30' + chr(234 - 123) + chr(0b110011) + chr(49) + chr(1122 - 1070), 0b1000), nzTpIcepk0o8('\060' + chr(0b1111 + 0o140) + '\x32' + chr(0b11100 + 0o27) + '\x37', 0b1000), nzTpIcepk0o8(chr(0b101101 + 0o3) + '\x6f' + chr(1196 - 1146) + chr(0b110011) + chr(0b100010 + 0o24), 51761 - 51753), nzTpIcepk0o8('\060' + '\157' + chr(0b0 + 0o64) + chr(0b10110 + 0o35), 33517 - 33509), nzTpIcepk0o8('\x30' + chr(3903 - 3792) + '\066' + chr(50), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + '\x30' + '\065', 8), nzTpIcepk0o8('\x30' + chr(0b1100011 + 0o14) + chr(2351 - 2300) + chr(0b110100) + '\x32', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + '\x36' + chr(53), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\063' + '\066' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1826 - 1774) + chr(51), 8), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + chr(0b110110) + chr(0b110001), 11182 - 11174), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b101101 + 0o6) + chr(51) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(887 - 839) + '\x6f' + chr(2315 - 2261) + chr(0b110101), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1079 - 1027) + chr(2102 - 2053), 46253 - 46245), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + '\x31' + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b110000 + 0o0) + '\x6f' + '\062' + chr(48) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(111) + '\063' + chr(0b110000) + chr(0b110101), 8), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b1101111) + chr(49) + chr(0b101000 + 0o15) + '\064', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50) + chr(1512 - 1460) + '\060', 27173 - 27165), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1589 - 1539) + '\061', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b1000 + 0o53) + '\062' + chr(0b100100 + 0o21), 49115 - 49107), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1421 - 1372) + chr(0b11110 + 0o25) + chr(1625 - 1572), 37477 - 37469), nzTpIcepk0o8('\060' + chr(9390 - 9279) + '\062' + chr(553 - 500) + '\x36', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(5080 - 4969) + '\x35' + chr(0b110000), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x02'), '\x64' + chr(101) + chr(99) + chr(0b1101111) + '\x64' + '\145')(chr(117) + chr(116) + chr(5698 - 5596) + chr(45) + chr(0b100010 + 0o26)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Fl5w3dPP2XiB(olfRNjSgvQh6, AyfNy9MUxk6F, ooKdxILblZqK=None, J0cNllQBMug7=None, iBxKYeMqq_Bt=None, Ln79tjAfkW3Z=nzTpIcepk0o8(chr(0b110000) + chr(0b1101 + 0o142) + '\060', 0o10), r4zeu1khcH7g=nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49), 42466 - 42458), uc4gGmjAvJP3=None, lhbM092AFW8f=nzTpIcepk0o8(chr(48) + '\x6f' + '\062', 0b1000), biRCFepsLie5=None, LV8ttmXhxpse=RjQP07DYIdkf, k6YbAA958gdz=nzTpIcepk0o8(chr(0b10111 + 0o31) + '\x6f' + chr(0b101010 + 0o10) + chr(0b11110 + 0o30) + chr(52), ord("\x08")), PHIiG8JBWAOW=roI3spqORKae(ES5oEprVxulp(b'N\xf2\xa2\xcb'), '\144' + chr(0b1100101) + '\143' + '\x6f' + '\144' + '\x65')('\165' + '\x74' + chr(7471 - 7369) + '\055' + '\070'), PFfkzFQ9rLFu=None): if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'E\xee\x89\xd0\xb1g'), chr(506 - 406) + chr(0b11010 + 0o113) + chr(0b1100011) + '\157' + chr(0b1100100) + chr(0b1100101))('\x75' + '\x74' + chr(0b10011 + 0o123) + '\055' + chr(0b111000)))(AyfNy9MUxk6F): AyfNy9MUxk6F = e_0pGsIB40a0(AyfNy9MUxk6F) if not suIjIS24Zkqw(AyfNy9MUxk6F, fjscDrnRiZwg): if suIjIS24Zkqw(AyfNy9MUxk6F, IgXw5fcVvr0A): AyfNy9MUxk6F = AyfNy9MUxk6F.KW0sEfjlgNpM if not suIjIS24Zkqw(AyfNy9MUxk6F, fjscDrnRiZwg): raise _1qUu0gKi9gH(roI3spqORKae(ES5oEprVxulp(b'K\xf4\xa0\xc6\xab5K\xa87JW\x12s\xb2\x19J\xbe\xb8\xbf\xff\x03`\xa0\x96\x1c\x9eL\x05\xb0EX\xc6\xe7\xb6\x04\xed~\xb18\xc2\x0c\xf4\xb8\xd0\xb1tH\xa46\x0e'), chr(0b1100100) + '\145' + '\x63' + chr(0b110101 + 0o72) + chr(9664 - 9564) + '\145')(chr(0b1110101) + '\x74' + chr(9922 - 9820) + chr(0b10101 + 0o30) + chr(56))) if not dRKdVnHPFq7C(AyfNy9MUxk6F, roI3spqORKae(ES5oEprVxulp(b'H\xfc\xa2\xc2'), chr(976 - 876) + chr(101) + '\x63' + '\157' + chr(0b1001011 + 0o31) + '\x65')('\165' + chr(0b1110100) + chr(10065 - 9963) + chr(0b101101) + chr(0b100011 + 0o25))) or roI3spqORKae(ES5oEprVxulp(b'\\\xf2\xba\xc2\xb7JG\xa94C^'), chr(0b1100100) + chr(0b1011010 + 0o13) + chr(0b1100011) + chr(0b111000 + 0o67) + '\144' + '\145')(chr(6336 - 6219) + '\x74' + chr(0b1100110) + chr(45) + '\070') not in roI3spqORKae(AyfNy9MUxk6F, roI3spqORKae(ES5oEprVxulp(b'j\xfb\x9d\xec\x91}B\xb7<koP'), chr(130 - 30) + chr(0b1100101) + chr(99) + chr(0b1101111) + '\144' + chr(101))(chr(13486 - 13369) + chr(13295 - 13179) + chr(0b1100110) + chr(0b101101) + chr(56))) or roI3spqORKae(ES5oEprVxulp(b'I\xfe\xb5\xc6\xabaT\xae0FOK'), chr(0b1010100 + 0o20) + chr(607 - 506) + chr(99) + '\157' + chr(0b1100100) + '\x65')(chr(0b1110101) + '\x74' + '\146' + '\x2d' + chr(1088 - 1032)) not in roI3spqORKae(AyfNy9MUxk6F, roI3spqORKae(ES5oEprVxulp(b'j\xfb\x9d\xec\x91}B\xb7<koP'), chr(0b1100100) + chr(4399 - 4298) + chr(0b1100011) + '\x6f' + '\x64' + chr(101))(chr(0b1110101) + chr(116) + chr(4299 - 4197) + chr(0b10001 + 0o34) + chr(0b111000))): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'~\xf8\xa2\xca\xabzR\xa8#V\x1b_u\xa5\\H\xf1\xa8\xf0\xfbP\x12\xab\x8d\x01\xd0K\x10\xa9P\x01\xfb\xed\xa9\r\xd21\xb43\xc9@\xf8\xf6\xc2\xabq\x06\xa20L^\\n\xb3PG\xb8\xb8\xe6\xbeGS\xb1\x83'), chr(3359 - 3259) + chr(3093 - 2992) + chr(0b1100011) + chr(111) + chr(100) + chr(0b1001101 + 0o30))('\x75' + chr(116) + chr(102) + '\055' + chr(3106 - 3050))) if not suIjIS24Zkqw(olfRNjSgvQh6, XTWLGdNob38G): raise _1qUu0gKi9gH(roI3spqORKae(ES5oEprVxulp(b'K\xf4\xa0\xc6\xab5K\xa2 G\x1b[i\xe1WK\xa5\xec\xfe\xbe`]\xb7\x96\x1c\x93B\x1d\x92PR\xe3\xa2\xaa\x0e\xcat\xb6)\x8f'), chr(100) + chr(0b11 + 0o142) + chr(99) + '\x6f' + chr(0b1100100) + chr(0b1010 + 0o133))(chr(8426 - 8309) + chr(116) + '\146' + chr(0b100110 + 0o7) + '\070')) NoZxuO7wjArS = olfRNjSgvQh6.vertex_count mxhyDqTAMpMC = olfRNjSgvQh6.coordinates.hq6XE4_Nhd6R if Ln79tjAfkW3Z is None: Ln79tjAfkW3Z = nzTpIcepk0o8(chr(48) + chr(2295 - 2184) + chr(0b110000), 8) (ooKdxILblZqK, J0cNllQBMug7, iBxKYeMqq_Bt) = [Wsfg_Pu9yzqA(olfRNjSgvQh6, SLVB2BPA_mIe, S6EI_gyMl2nC, default=roI3spqORKae(ES5oEprVxulp(b'I\xf0\xa6\xca\xb7|E\xa6?'), '\x64' + '\145' + chr(1660 - 1561) + chr(0b1101111) + chr(9455 - 9355) + '\x65')(chr(7691 - 7574) + chr(0b1110100) + '\146' + chr(0b101100 + 0o1) + chr(1196 - 1140))) for (SLVB2BPA_mIe, S6EI_gyMl2nC) in [(roI3spqORKae(ES5oEprVxulp(b'\\\xf2\xba\xc2\xb7JG\xa94C^'), chr(0b1001000 + 0o34) + chr(3643 - 3542) + chr(6785 - 6686) + '\157' + '\144' + chr(0b110001 + 0o64))(chr(117) + chr(1594 - 1478) + '\x66' + chr(145 - 100) + chr(0b111000)), ooKdxILblZqK), (roI3spqORKae(ES5oEprVxulp(b'I\xfe\xb5\xc6\xabaT\xae0FOK'), '\x64' + '\x65' + '\x63' + '\x6f' + chr(4604 - 4504) + '\x65')(chr(0b1100011 + 0o22) + '\x74' + chr(102) + '\055' + chr(192 - 136)), J0cNllQBMug7), (roI3spqORKae(ES5oEprVxulp(b'[\xf8\xbf\xc4\xada'), '\x64' + '\x65' + chr(4817 - 4718) + '\x6f' + '\x64' + '\x65')(chr(0b1110101) + chr(116) + '\x66' + chr(45) + chr(0b101001 + 0o17)), [iBxKYeMqq_Bt for ZlbFMSG8gCoF in bbT2xIe5pzk7(NoZxuO7wjArS)] if suIjIS24Zkqw(iBxKYeMqq_Bt, IIRMJG_g3EWu) or nDF4gVNx0u9Q.issubdtype(MJ07XsN5uFgW(iBxKYeMqq_Bt), nDF4gVNx0u9Q.float) else iBxKYeMqq_Bt)]] (ooKdxILblZqK, J0cNllQBMug7, iBxKYeMqq_Bt) = dPy57KNPAzpC(ooKdxILblZqK, J0cNllQBMug7, iBxKYeMqq_Bt, weight_min=Ln79tjAfkW3Z) if roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'C\xfe\xba\xe0\xfdQj\xad\x12pWd'), '\x64' + chr(2902 - 2801) + chr(0b1100011) + chr(0b111101 + 0o62) + chr(0b1100100) + '\x65')('\165' + chr(9387 - 9271) + chr(0b1100110) + chr(0b101101) + '\x38'))(iBxKYeMqq_Bt > nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(111) + chr(0b1 + 0o57), 8)) == nzTpIcepk0o8(chr(0b110000) + chr(111) + '\060', 8): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'b\xf2\xf6\xd3\xaafO\xb3:Y^\x12m\xa4PC\xb9\xb8\xec\xbeE]\xb0\x8c\x11'), chr(0b101010 + 0o72) + '\x65' + chr(2366 - 2267) + chr(6718 - 6607) + '\144' + '\145')('\165' + chr(0b1110100) + chr(102) + chr(0b101101) + chr(56))) oWFalk9jWbpc = [ZlbFMSG8gCoF for (ZlbFMSG8gCoF, sm7_CLmeWGR7) in _kV_Bomx8PZ4(iBxKYeMqq_Bt) if sm7_CLmeWGR7 > nzTpIcepk0o8(chr(48) + chr(11322 - 11211) + chr(1949 - 1901), 8)] w_V5iIAgUx7e = nDF4gVNx0u9Q.rYPkZ8_2D0X1(AyfNy9MUxk6F.forward.coordinates.lhbM092AFW8f[nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110000), 8)]) OIkGBuQMluQG = nDF4gVNx0u9Q.dot(AyfNy9MUxk6F.transform, nDF4gVNx0u9Q.vstack((AyfNy9MUxk6F.forward.coordinates.T, w_V5iIAgUx7e)))[:nzTpIcepk0o8('\060' + chr(5604 - 5493) + '\062', 8)].hq6XE4_Nhd6R BREV_jKcXcxf = AyfNy9MUxk6F.forward.triangles UStEevlnkbLy = nDF4gVNx0u9Q.asarray([AyfNy9MUxk6F.FfKOThdpoDTb[roI3spqORKae(ES5oEprVxulp(b'\\\xf2\xba\xc2\xb7JG\xa94C^'), chr(0b1100100) + chr(7203 - 7102) + chr(7317 - 7218) + '\157' + chr(0b1100100) + chr(0b1100101))(chr(920 - 803) + '\164' + chr(0b1100110) + chr(0b11110 + 0o17) + '\x38')], AyfNy9MUxk6F.FfKOThdpoDTb[roI3spqORKae(ES5oEprVxulp(b'I\xfe\xb5\xc6\xabaT\xae0FOK'), chr(4415 - 4315) + '\145' + chr(99) + '\157' + '\x64' + chr(0b1100101))(chr(117) + chr(0b1110100) + chr(0b1100110) + '\055' + chr(56))]]) iNbrzwIbS6qX = iBxKYeMqq_Bt[oWFalk9jWbpc] * (nzTpIcepk0o8(chr(0b1 + 0o57) + chr(3558 - 3447) + chr(0b101010 + 0o7), 8) if r4zeu1khcH7g is None else r4zeu1khcH7g) qZbbgQYn2uPv = nDF4gVNx0u9Q.asarray([ooKdxILblZqK, J0cNllQBMug7])[:, oWFalk9jWbpc] lhbM092AFW8f = nDF4gVNx0u9Q.FQnMqH8X9LID(ftfygxgFas5X(oWFalk9jWbpc), jLW6pRf2DSRk(lhbM092AFW8f), dtype=nDF4gVNx0u9Q.float32) if LV8ttmXhxpse is RjQP07DYIdkf: LV8ttmXhxpse = nDF4gVNx0u9Q.KV9ckIhroIia(qZbbgQYn2uPv[nzTpIcepk0o8('\060' + chr(5824 - 5713) + chr(0b100101 + 0o14), 8)]) if k6YbAA958gdz is RjQP07DYIdkf: k6YbAA958gdz = nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + chr(1513 - 1459) + chr(0b11 + 0o61), 8) if k6YbAA958gdz is not None: qZbbgQYn2uPv[nzTpIcepk0o8(chr(48) + '\x6f' + chr(1475 - 1427), 8)] /= k6YbAA958gdz UStEevlnkbLy[nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(111) + '\x30', 8)] /= k6YbAA958gdz if LV8ttmXhxpse is not None: qZbbgQYn2uPv[nzTpIcepk0o8(chr(1142 - 1094) + '\157' + chr(0b100001 + 0o20), 8)] /= LV8ttmXhxpse UStEevlnkbLy[nzTpIcepk0o8('\x30' + chr(2009 - 1898) + '\x31', 8)] /= LV8ttmXhxpse if PHIiG8JBWAOW is not None: PHIiG8JBWAOW = PHIiG8JBWAOW.Xn8ENWMZdIRt() if PHIiG8JBWAOW != roI3spqORKae(ES5oEprVxulp(b'N\xf2\xa2\xcb'), '\144' + chr(0b1000100 + 0o41) + chr(99) + chr(2920 - 2809) + chr(0b1100100) + chr(2482 - 2381))(chr(0b1101011 + 0o12) + '\x74' + '\x66' + '\055' + chr(56)) and PHIiG8JBWAOW != roI3spqORKae(ES5oEprVxulp(b'M\xf1\xba'), '\144' + '\145' + chr(0b1001110 + 0o25) + chr(111) + chr(100) + chr(101))(chr(0b1110101) + chr(4142 - 4026) + chr(0b10011 + 0o123) + chr(45) + chr(56)): Ke7SAGs_qhbe = {roI3spqORKae(ES5oEprVxulp(b'I\xfe\xb5\xc6\xab'), '\144' + chr(7310 - 7209) + '\143' + '\157' + chr(0b1100100) + chr(0b1010 + 0o133))(chr(6405 - 6288) + '\x74' + chr(102) + chr(1030 - 985) + '\070'): roI3spqORKae(ES5oEprVxulp(b'I\xfe\xb5\xc6\xab'), chr(0b1100100) + chr(994 - 893) + chr(99) + chr(0b1101111) + chr(4122 - 4022) + '\x65')('\x75' + '\164' + '\146' + chr(0b101101) + '\070'), roI3spqORKae(ES5oEprVxulp(b'I\xfe\xb5\xc6\xabaT\xae0FOK'), chr(8629 - 8529) + chr(9786 - 9685) + chr(0b1100011) + chr(0b1100111 + 0o10) + chr(100) + chr(3113 - 3012))(chr(4160 - 4043) + chr(9275 - 9159) + chr(0b1100110) + chr(0b101101) + chr(0b111000)): roI3spqORKae(ES5oEprVxulp(b'I\xfe\xb5\xc6\xab'), chr(100) + chr(8924 - 8823) + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(0b100111 + 0o76))('\x75' + chr(0b1011110 + 0o26) + '\x66' + '\055' + '\x38'), roI3spqORKae(ES5oEprVxulp(b'^\xfc\xb2\xca\xb0f'), chr(100) + '\x65' + '\143' + '\157' + chr(0b1100100) + chr(0b1100101))(chr(117) + '\164' + chr(0b1100110) + chr(45) + chr(437 - 381)): roI3spqORKae(ES5oEprVxulp(b'I\xfe\xb5\xc6\xab'), chr(0b1010 + 0o132) + chr(101) + chr(0b1010100 + 0o17) + '\157' + chr(7270 - 7170) + '\145')('\165' + chr(116) + '\146' + chr(0b10100 + 0o31) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'M\xf3\xb1\xcf\xa0'), chr(6069 - 5969) + chr(101) + '\143' + '\157' + chr(0b1100100) + chr(0b1100000 + 0o5))('\x75' + '\164' + '\x66' + chr(0b101101) + '\070'): roI3spqORKae(ES5oEprVxulp(b'M\xf3\xb1\xcf\xa0'), chr(2394 - 2294) + '\x65' + chr(0b1100011) + chr(0b10111 + 0o130) + chr(0b1100100) + '\x65')(chr(117) + '\164' + chr(0b10110 + 0o120) + '\055' + chr(272 - 216)), roI3spqORKae(ES5oEprVxulp(b'\\\xf2\xba\xc2\xb7JG\xa94C^'), chr(0b110 + 0o136) + '\x65' + chr(99) + chr(0b1 + 0o156) + '\x64' + chr(0b1100101))('\165' + chr(116) + chr(0b100000 + 0o106) + chr(1001 - 956) + '\x38'): roI3spqORKae(ES5oEprVxulp(b'M\xf3\xb1\xcf\xa0'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(0b101010 + 0o105) + chr(0b1100100) + chr(0b1011011 + 0o12))('\x75' + chr(2371 - 2255) + '\x66' + chr(45) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\\\xf2\xba\xc2\xb7'), '\x64' + '\145' + chr(131 - 32) + chr(111) + chr(0b1100100) + chr(101))(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(0b101101) + chr(56)): roI3spqORKae(ES5oEprVxulp(b'M\xf3\xb1\xcf\xa0'), chr(0b11001 + 0o113) + chr(8941 - 8840) + '\143' + chr(0b111101 + 0o62) + chr(0b1100100) + '\x65')(chr(117) + '\164' + chr(102) + '\055' + chr(56))} PHIiG8JBWAOW = Ke7SAGs_qhbe[PHIiG8JBWAOW] UStEevlnkbLy = [UStEevlnkbLy[nzTpIcepk0o8(chr(48) + '\157' + chr(48), 8) if PHIiG8JBWAOW == roI3spqORKae(ES5oEprVxulp(b'M\xf3\xb1\xcf\xa0'), chr(0b1100100) + chr(0b1100101) + chr(0b1101 + 0o126) + chr(0b1000110 + 0o51) + '\x64' + chr(101))(chr(117) + chr(0b1110100) + chr(7019 - 6917) + chr(1575 - 1530) + '\070') else nzTpIcepk0o8(chr(48) + '\157' + '\061', 8)]] qZbbgQYn2uPv = [qZbbgQYn2uPv[nzTpIcepk0o8(chr(48) + '\157' + chr(0b110000), 8) if PHIiG8JBWAOW == roI3spqORKae(ES5oEprVxulp(b'M\xf3\xb1\xcf\xa0'), '\144' + chr(0b10010 + 0o123) + '\x63' + '\x6f' + chr(0b1100100) + chr(0b101101 + 0o70))(chr(6852 - 6735) + '\164' + chr(8947 - 8845) + '\055' + chr(0b10100 + 0o44)) else nzTpIcepk0o8('\x30' + chr(3670 - 3559) + '\061', 8)]] if uc4gGmjAvJP3 is None: bSNfIPU9tdAJ = [roI3spqORKae(ES5oEprVxulp(b'A\xf8\xa5\xcb\xe8sO\xa2?K'), '\x64' + chr(0b1110 + 0o127) + '\143' + chr(5267 - 5156) + chr(0b1100100) + chr(101))(chr(0b1100011 + 0o22) + '\164' + chr(102) + '\055' + chr(56)), roI3spqORKae(ES5oEprVxulp(b'D\xfc\xa4\xce\xaa{O\xa4'), '\144' + '\x65' + chr(99) + chr(0b1101111) + chr(100) + chr(101))(chr(0b1010110 + 0o37) + '\x74' + chr(0b1100110) + '\055' + chr(0b111000)), OIkGBuQMluQG, BREV_jKcXcxf, UStEevlnkbLy, oWFalk9jWbpc, qZbbgQYn2uPv, roI3spqORKae(ES5oEprVxulp(b'_\xfe\xb7\xcf\xa0'), chr(8048 - 7948) + '\x65' + chr(0b1100011) + '\x6f' + chr(8627 - 8527) + chr(8453 - 8352))(chr(2615 - 2498) + chr(0b1110100) + chr(102) + chr(0b10 + 0o53) + '\070'), iNbrzwIbS6qX, roI3spqORKae(ES5oEprVxulp(b'C\xef\xb2\xc6\xb7'), chr(0b1100100) + '\x65' + '\x63' + chr(0b1101111) + '\x64' + chr(0b1100 + 0o131))('\x75' + '\x74' + '\146' + chr(132 - 87) + '\x38'), lhbM092AFW8f] else: if not dRKdVnHPFq7C(uc4gGmjAvJP3, roI3spqORKae(ES5oEprVxulp(b's\xc2\xbf\xd7\xa0gy\x98'), chr(0b100000 + 0o104) + '\x65' + chr(0b1100011) + chr(4911 - 4800) + chr(6530 - 6430) + chr(101))(chr(5175 - 5058) + '\x74' + '\146' + chr(0b1110 + 0o37) + chr(0b111000))): uc4gGmjAvJP3 = [uc4gGmjAvJP3 for zIqcgNgQ9U6F in iNbrzwIbS6qX] bSNfIPU9tdAJ = [roI3spqORKae(ES5oEprVxulp(b'A\xf8\xa5\xcb\xe8sO\xa2?K'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(111) + '\x64' + chr(101))(chr(117) + chr(0b1110100) + chr(9341 - 9239) + '\x2d' + '\070'), roI3spqORKae(ES5oEprVxulp(b'K\xfc\xa3\xd0\xb6|G\xa9'), chr(100) + '\145' + '\143' + chr(5334 - 5223) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(1854 - 1809) + chr(1090 - 1034)), OIkGBuQMluQG, BREV_jKcXcxf, UStEevlnkbLy, oWFalk9jWbpc, qZbbgQYn2uPv, roI3spqORKae(ES5oEprVxulp(b'_\xfe\xb7\xcf\xa0'), chr(100) + '\145' + chr(3042 - 2943) + '\157' + chr(100) + chr(8017 - 7916))('\x75' + chr(116) + chr(7783 - 7681) + chr(45) + chr(198 - 142)), iNbrzwIbS6qX, roI3spqORKae(ES5oEprVxulp(b'C\xef\xb2\xc6\xb7'), chr(100) + chr(101) + chr(99) + chr(12015 - 11904) + chr(5019 - 4919) + chr(5395 - 5294))(chr(7476 - 7359) + chr(0b1110100) + chr(0b1100110) + '\055' + chr(2717 - 2661)), lhbM092AFW8f, roI3spqORKae(ES5oEprVxulp(b'_\xf4\xb1\xce\xa4'), chr(100) + '\x65' + chr(99) + '\157' + '\x64' + chr(101))(chr(13561 - 13444) + '\164' + chr(0b1100110) + chr(0b11010 + 0o23) + chr(0b100101 + 0o23)), uc4gGmjAvJP3] if biRCFepsLie5 is not None: bSNfIPU9tdAJ += biRCFepsLie5 if PFfkzFQ9rLFu is not None: jAsDR3c83zP2 = ocNRpJd6s6MK(olfRNjSgvQh6, bSNfIPU9tdAJ) CgeFa6auR3xu = UZNbH5gmkzup(olfRNjSgvQh6.r2wzacEY8Lls) hkcD5NE_jj13 = UZNbH5gmkzup(nDF4gVNx0u9Q.UmwwEp7MzR6q(olfRNjSgvQh6.coordinates.lhbM092AFW8f)) roI3spqORKae(jAsDR3c83zP2, roI3spqORKae(ES5oEprVxulp(b'O\xfc\xba\xc0\xb0yG\xb36'), '\144' + '\145' + chr(0b1100011) + chr(0b10 + 0o155) + '\144' + '\145')(chr(0b1011100 + 0o31) + '\x74' + chr(2435 - 2333) + chr(1295 - 1250) + chr(1719 - 1663)))(CgeFa6auR3xu, hkcD5NE_jj13) OPszIWk6PYIk = nDF4gVNx0u9Q.oclC8DLjA_lV(nDF4gVNx0u9Q.asarray([[bI5jsQ9OkQtj for bI5jsQ9OkQtj in o6UWUO21mH25] for o6UWUO21mH25 in hkcD5NE_jj13])[:, oWFalk9jWbpc] ** nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100011 + 0o17), 8), axis=nzTpIcepk0o8(chr(0b1111 + 0o41) + '\157' + chr(1792 - 1744), 8)) LFrBYh3PNvSX = OPszIWk6PYIk[OPszIWk6PYIk > nzTpIcepk0o8('\060' + chr(0b101100 + 0o103) + chr(48), 8)] EdnFGPON8FS4 = nDF4gVNx0u9Q.FvpUlOwKdj9t(LFrBYh3PNvSX) AFfTx5xLlh3B = nDF4gVNx0u9Q.AFfTx5xLlh3B(LFrBYh3PNvSX) yXEukFHW07OD = nDF4gVNx0u9Q.xWH4M7K6Qbd3(OPszIWk6PYIk > EdnFGPON8FS4 + AFfTx5xLlh3B * 3.5)[nzTpIcepk0o8(chr(48) + '\x6f' + '\x30', 8)] for ZlbFMSG8gCoF in yXEukFHW07OD: iNbrzwIbS6qX[ZlbFMSG8gCoF] = nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2042 - 1994), 8) return bSNfIPU9tdAJ
noahbenson/neuropythy
neuropythy/vision/retinotopy.py
retinotopy_anchors
def retinotopy_anchors(mesh, mdl, polar_angle=None, eccentricity=None, weight=None, weight_min=0.1, field_sign_weight=0, field_sign=None, invert_field_sign=False, radius_weight=0, radius_weight_source='Wandell2015', radius=None, model_field_sign=None, model_hemi=Ellipsis, scale=1, shape='Gaussian', suffix=None, sigma=[0.1, 2.0, 8.0], select='close'): ''' retinotopy_anchors(mesh, model) is intended for use with the mesh_register function and the retinotopy_model() function and/or the RetinotopyModel class; it yields a description of the anchor points that tie relevant vertices the given mesh to points predicted by the given model object. Any instance of the RetinotopyModel class should work as a model argument; this includes SchiraModel objects as well as RetinotopyMeshModel objects such as those returned by the retinotopy_model() function. If the model given is a string, then it is passed to the retinotopy_model() function first. Options: * polar_angle (default None) specifies that the given data should be used in place of the 'polar_angle' or 'PRF_polar_angle' property values. The given argument must be numeric and the same length as the the number of vertices in the mesh. If None is given, then the property value of the mesh is used; if a list is given and any element is None, then the weight for that vertex is treated as a zero. If the option is a string, then the property value with the same name isused as the polar_angle data. * eccentricity (default None) specifies that the given data should be used in places of the 'eccentricity' or 'PRF_eccentricity' property values. The eccentricity option is handled virtually identically to the polar_angle option. * weight (default None) specifies that the weight or scale of the data; this is handled generally like the polar_angle and eccentricity options, but may also be 1, indicating that all vertices with polar_angle and eccentricity values defined will be given a weight of 1. If weight is left as None, then the function will check for 'weight', 'variance_explained', 'PRF_variance_explained', and 'retinotopy_weight' values and will use the first found (in that order). If none of these is found, then a value of 1 is assumed. * weight_min (default 0) specifies that the weight must be higher than the given value inn order to be included in the fit; vertices with weights below this value have their weights truncated to 0. * scale (default 1) specifies a constant by which to multiply all weights for all anchors; the value None is interpreted as 1. * shape (default 'Gaussian') specifies the shape of the potential function (see mesh_register) * model_hemi (default: None) specifies the hemisphere of the model to load; if None, then looks for a non-specific model. * suffix (default None) specifies any additional arguments that should be appended to the potential function description list that is produced by this function; i.e., the retinotopy_anchors function produces a list, and the contents of suffix, if given and not None, are appended to that list (see mesh_register). * select (default 'close') specifies a function that will be called with two arguments for every vertex given an anchor; the arguments are the vertex label and the matrix of anchors. The function should return a list of anchors to use for the label (None is equivalent to lambda id,anc: anc). The parameter may alternately be specified using the string 'close': select=['close', [k]] indicates that any anchor more than k times the average edge-length in the mesh should be excluded; a value of just ['close', k] on the other hand indicates that any anchor more than k distance from the vertex should be exlcuded. The default value, 'close', is equivalent to ['close', [40]]. * sigma (default [0.1, 2.0, 4.0]) specifies how the sigma parameter should be handled; if None, then no sigma value is specified; if a single number, then all sigma values are assigned that value; if a list of three numbers, then the first is the minimum sigma value, the second is the fraction of the minimum distance between paired anchor points, and the last is the maximum sigma --- the idea with this form of the argument is that the ideal sigma value in many cases is approximately 0.25 to 0.5 times the distance between anchors to which a single vertex is attracted; for any anchor a to which a vertex u is attracted, the sigma of a is the middle sigma-argument value times the minimum distance from a to all other anchors to which u is attracted (clipped by the min and max sigma). * field_sign_weight (default: 0) specifies the amount of weight that should be put on the retinotopic field of the model as a method of attenuating the weights on those anchors whose empirical retinotopic values and predicted model locations do not match. The weight that results is calculated from the difference in empirical field-sign for each vertex and the visual area field sign based on the labels in the model. The higher the field-sign weight, (approaching 1) the more the resulting value is a geometric mean of the field-sign-based weight and the original weights. As this value approaches 0, the resulting weights are more like the original weights. * radius_weight (default: 0) specifies the amount of weight that should be put on the receptive field radius of the model as a method of attenuating the weights on those anchors whose empirical retinotopic values and predicted model locations do not match. The weight that results is calculated from the difference in empirical RF radius for each vertex and the predicted RF radius based on the labels in the model. The higher the radius weight, (approaching 1) the more the resulting value is a geometric mean of the field-sign-based weight and the original weights. As this value approaches 0, the resulting weights are more like the original weights. * radius_weight_source (default: 'Wandell2015') specifies the source for predicting RF radius; based on eccentricity and visual area label. Example: # The retinotopy_anchors function is intended for use with mesh_register, as follows: # Define our Schira Model: model = neuropythy.registration.SchiraModel() # Make sure our mesh has polar angle, eccentricity, and weight data: mesh.prop('polar_angle', polar_angle_vertex_data); mesh.prop('eccentricity', eccentricity_vertex_data); mesh.prop('weight', variance_explained_vertex_data); # register the mesh using the retinotopy and model: registered_mesh = neuropythy.registration.mesh_register( mesh, ['mesh', retinotopy_anchors(mesh, model)], max_step_size=0.05, max_steps=2000) ''' if pimms.is_str(mdl): hemi = None if pimms.is_str(model_hemi): model_hemi = model_hemi.upper() hemnames = {k:h for (h,als) in [('LH', ['LH','L','LEFT','RHX','RX']), ('RH', ['RH','R','RIGHT','LHX','LX'])] for k in als} if model_hemi in hemnames: hemi = hemnames[model_hemi] else: raise ValueError('Unrecognized hemisphere name: %s' % model_hemi) elif model_hemi is not None: raise ValueError('model_hemi must be a string, Ellipsis, or None') mdl = retinotopy_model(mdl, hemi=hemi) if not isinstance(mdl, RetinotopyModel): raise RuntimeError('given model is not a RetinotopyModel instance!') if not isinstance(mesh, geo.Mesh): raise RuntimeError('given mesh is not a Mesh object!') n = mesh.vertex_count X = mesh.coordinates.T if weight_min is None: weight_min = 0 # make sure we have our polar angle/eccen/weight values: # (weight is odd because it might be a single number, so handle that first) (polar_angle, eccentricity, weight) = [ extract_retinotopy_argument(mesh, name, arg, default='empirical') for (name, arg) in [ ('polar_angle', polar_angle), ('eccentricity', eccentricity), ('weight', np.full(n, weight) if pimms.is_number(weight) else weight)]] # Make sure they contain no None/invalid values (polar_angle, eccentricity, weight) = _retinotopy_vectors_to_float( polar_angle, eccentricity, weight, weight_min=weight_min) if np.sum(weight > 0) == 0: raise ValueError('No positive weights found') idcs = np.where(weight > 0)[0] # Interpret the select arg if necessary (but don't apply it yet) select = ['close', [40]] if select == 'close' else \ ['close', [40]] if select == ['close'] else \ select if select is None: select = lambda a,b: b elif ((pimms.is_vector(select) or is_list(select) or is_tuple(select)) and len(select) == 2 and select[0] == 'close'): if pimms.is_vector(select[1]): d = np.mean(mesh.edge_lengths) * select[1][0] else: d = select[1] select = lambda idx,ancs: [a for a in ancs if a[0] is not None if npla.norm(X[idx] - a) < d] # Okay, apply the model: res = mdl.angle_to_cortex(polar_angle[idcs], eccentricity[idcs]) oks = np.isfinite(np.sum(np.reshape(res, (res.shape[0], -1)), axis=1)) # Organize the data; trim out those not selected data = [[[i for _ in r], r, [ksidx[tuple(a)] for a in r]] for (i,r0,ok) in zip(idcs, res, oks) if ok for ksidx in [{tuple(a):(k+1) for (k,a) in enumerate(r0)}] for r in [select(i, r0)] if len(r) > 0] # Flatten out the data into arguments for Java idcs = [int(i) for d in data for i in d[0]] ancs = np.asarray([pt for d in data for pt in d[1]]).T labs = np.asarray([ii for d in data for ii in d[2]]).T # Get just the relevant weights and the scale wgts = np.asarray(weight[idcs] * (1 if scale is None else scale)) # add in the field-sign weights and radius weights if requested here; if not np.isclose(field_sign_weight, 0) and mdl.area_name_to_id is not None: id2n = mdl.area_id_to_name if field_sign is True or field_sign is Ellipsis or field_sign is None: from .cmag import cmag r = {'polar_angle': polar_angle, 'eccentricity': eccentricity} #field_sign = retinotopic_field_sign(mesh, retinotopy=r) field_sign = cmag(mesh, r)['field_sign'] elif pimms.is_str(field_sign): field_sign = mesh.prop(field_sign) field_sign = np.asarray(field_sign) if invert_field_sign: field_sign = -field_sign fswgts = 1.0 - 0.25 * np.asarray( [(fs - visual_area_field_signs[id2n[l]]) if l in id2n else 0 for (l,fs) in zip(labs,field_sign[idcs])])**2 # average the weights at some fraction with the original weights fswgts = field_sign_weight*fswgts + (1 - field_sign_weight)*wgts else: fswgts = None # add in radius weights if requested as well if not np.isclose(radius_weight, 0) and mdl.area_name_to_id is not None: id2n = mdl.area_id_to_name emprad = extract_retinotopy_argument(mesh, 'radius', radius, default='empirical') emprad = emprad[idcs] emprad = np.argsort(np.argsort(emprad)) * (1.0 / len(emprad)) - 0.5 eccs = eccentricity[idcs] prerad = np.asarray([predict_pRF_radius(ecc, id2n[lbl], source=radius_weight_source) for (ecc,lbl) in zip(eccs,labs)]) prerad = np.argsort(np.argsort(prerad)) * (1.0 / len(prerad)) - 0.5 rdwgts = 1.0 - (emprad - prerad)**2 # average the weights at some fraction with the original weights rdwgts = radius_weight*rdwgts + (1-radius_weight)*wgts else: rdwgts = None # apply the weights if fswgts is not None: if rdwgts is not None: wgts = np.power(fswgts*rdwgts*wgts, 1.0/3.0) else: wgts = np.sqrt(fswgts*wgts) elif rdwgts is not None: wgts = np.sqrt(rdwgts*wgts) # Figure out the sigma parameter: if sigma is None: sigs = None elif pimms.is_number(sigma): sigs = sigma elif pimms.is_vector(sigma) and len(sigma) == 3: [minsig, mult, maxsig] = sigma sigs = np.clip( [mult*min([npla.norm(a0 - a) for a in anchs if a is not a0]) if len(iii) > 1 else maxsig for (iii,anchs,_) in data for a0 in anchs], minsig, maxsig) else: raise ValueError('sigma must be a number or a list of 3 numbers') # okay, we've partially parsed the data that was given; now we can construct the final list of # instructions: tmp = (['anchor', shape, np.asarray(idcs, dtype=np.int), np.asarray(ancs, dtype=np.float64), 'scale', np.asarray(wgts, dtype=np.float64)] + ([] if sigs is None else ['sigma', sigs]) + ([] if suffix is None else suffix)) return tmp
python
def retinotopy_anchors(mesh, mdl, polar_angle=None, eccentricity=None, weight=None, weight_min=0.1, field_sign_weight=0, field_sign=None, invert_field_sign=False, radius_weight=0, radius_weight_source='Wandell2015', radius=None, model_field_sign=None, model_hemi=Ellipsis, scale=1, shape='Gaussian', suffix=None, sigma=[0.1, 2.0, 8.0], select='close'): ''' retinotopy_anchors(mesh, model) is intended for use with the mesh_register function and the retinotopy_model() function and/or the RetinotopyModel class; it yields a description of the anchor points that tie relevant vertices the given mesh to points predicted by the given model object. Any instance of the RetinotopyModel class should work as a model argument; this includes SchiraModel objects as well as RetinotopyMeshModel objects such as those returned by the retinotopy_model() function. If the model given is a string, then it is passed to the retinotopy_model() function first. Options: * polar_angle (default None) specifies that the given data should be used in place of the 'polar_angle' or 'PRF_polar_angle' property values. The given argument must be numeric and the same length as the the number of vertices in the mesh. If None is given, then the property value of the mesh is used; if a list is given and any element is None, then the weight for that vertex is treated as a zero. If the option is a string, then the property value with the same name isused as the polar_angle data. * eccentricity (default None) specifies that the given data should be used in places of the 'eccentricity' or 'PRF_eccentricity' property values. The eccentricity option is handled virtually identically to the polar_angle option. * weight (default None) specifies that the weight or scale of the data; this is handled generally like the polar_angle and eccentricity options, but may also be 1, indicating that all vertices with polar_angle and eccentricity values defined will be given a weight of 1. If weight is left as None, then the function will check for 'weight', 'variance_explained', 'PRF_variance_explained', and 'retinotopy_weight' values and will use the first found (in that order). If none of these is found, then a value of 1 is assumed. * weight_min (default 0) specifies that the weight must be higher than the given value inn order to be included in the fit; vertices with weights below this value have their weights truncated to 0. * scale (default 1) specifies a constant by which to multiply all weights for all anchors; the value None is interpreted as 1. * shape (default 'Gaussian') specifies the shape of the potential function (see mesh_register) * model_hemi (default: None) specifies the hemisphere of the model to load; if None, then looks for a non-specific model. * suffix (default None) specifies any additional arguments that should be appended to the potential function description list that is produced by this function; i.e., the retinotopy_anchors function produces a list, and the contents of suffix, if given and not None, are appended to that list (see mesh_register). * select (default 'close') specifies a function that will be called with two arguments for every vertex given an anchor; the arguments are the vertex label and the matrix of anchors. The function should return a list of anchors to use for the label (None is equivalent to lambda id,anc: anc). The parameter may alternately be specified using the string 'close': select=['close', [k]] indicates that any anchor more than k times the average edge-length in the mesh should be excluded; a value of just ['close', k] on the other hand indicates that any anchor more than k distance from the vertex should be exlcuded. The default value, 'close', is equivalent to ['close', [40]]. * sigma (default [0.1, 2.0, 4.0]) specifies how the sigma parameter should be handled; if None, then no sigma value is specified; if a single number, then all sigma values are assigned that value; if a list of three numbers, then the first is the minimum sigma value, the second is the fraction of the minimum distance between paired anchor points, and the last is the maximum sigma --- the idea with this form of the argument is that the ideal sigma value in many cases is approximately 0.25 to 0.5 times the distance between anchors to which a single vertex is attracted; for any anchor a to which a vertex u is attracted, the sigma of a is the middle sigma-argument value times the minimum distance from a to all other anchors to which u is attracted (clipped by the min and max sigma). * field_sign_weight (default: 0) specifies the amount of weight that should be put on the retinotopic field of the model as a method of attenuating the weights on those anchors whose empirical retinotopic values and predicted model locations do not match. The weight that results is calculated from the difference in empirical field-sign for each vertex and the visual area field sign based on the labels in the model. The higher the field-sign weight, (approaching 1) the more the resulting value is a geometric mean of the field-sign-based weight and the original weights. As this value approaches 0, the resulting weights are more like the original weights. * radius_weight (default: 0) specifies the amount of weight that should be put on the receptive field radius of the model as a method of attenuating the weights on those anchors whose empirical retinotopic values and predicted model locations do not match. The weight that results is calculated from the difference in empirical RF radius for each vertex and the predicted RF radius based on the labels in the model. The higher the radius weight, (approaching 1) the more the resulting value is a geometric mean of the field-sign-based weight and the original weights. As this value approaches 0, the resulting weights are more like the original weights. * radius_weight_source (default: 'Wandell2015') specifies the source for predicting RF radius; based on eccentricity and visual area label. Example: # The retinotopy_anchors function is intended for use with mesh_register, as follows: # Define our Schira Model: model = neuropythy.registration.SchiraModel() # Make sure our mesh has polar angle, eccentricity, and weight data: mesh.prop('polar_angle', polar_angle_vertex_data); mesh.prop('eccentricity', eccentricity_vertex_data); mesh.prop('weight', variance_explained_vertex_data); # register the mesh using the retinotopy and model: registered_mesh = neuropythy.registration.mesh_register( mesh, ['mesh', retinotopy_anchors(mesh, model)], max_step_size=0.05, max_steps=2000) ''' if pimms.is_str(mdl): hemi = None if pimms.is_str(model_hemi): model_hemi = model_hemi.upper() hemnames = {k:h for (h,als) in [('LH', ['LH','L','LEFT','RHX','RX']), ('RH', ['RH','R','RIGHT','LHX','LX'])] for k in als} if model_hemi in hemnames: hemi = hemnames[model_hemi] else: raise ValueError('Unrecognized hemisphere name: %s' % model_hemi) elif model_hemi is not None: raise ValueError('model_hemi must be a string, Ellipsis, or None') mdl = retinotopy_model(mdl, hemi=hemi) if not isinstance(mdl, RetinotopyModel): raise RuntimeError('given model is not a RetinotopyModel instance!') if not isinstance(mesh, geo.Mesh): raise RuntimeError('given mesh is not a Mesh object!') n = mesh.vertex_count X = mesh.coordinates.T if weight_min is None: weight_min = 0 # make sure we have our polar angle/eccen/weight values: # (weight is odd because it might be a single number, so handle that first) (polar_angle, eccentricity, weight) = [ extract_retinotopy_argument(mesh, name, arg, default='empirical') for (name, arg) in [ ('polar_angle', polar_angle), ('eccentricity', eccentricity), ('weight', np.full(n, weight) if pimms.is_number(weight) else weight)]] # Make sure they contain no None/invalid values (polar_angle, eccentricity, weight) = _retinotopy_vectors_to_float( polar_angle, eccentricity, weight, weight_min=weight_min) if np.sum(weight > 0) == 0: raise ValueError('No positive weights found') idcs = np.where(weight > 0)[0] # Interpret the select arg if necessary (but don't apply it yet) select = ['close', [40]] if select == 'close' else \ ['close', [40]] if select == ['close'] else \ select if select is None: select = lambda a,b: b elif ((pimms.is_vector(select) or is_list(select) or is_tuple(select)) and len(select) == 2 and select[0] == 'close'): if pimms.is_vector(select[1]): d = np.mean(mesh.edge_lengths) * select[1][0] else: d = select[1] select = lambda idx,ancs: [a for a in ancs if a[0] is not None if npla.norm(X[idx] - a) < d] # Okay, apply the model: res = mdl.angle_to_cortex(polar_angle[idcs], eccentricity[idcs]) oks = np.isfinite(np.sum(np.reshape(res, (res.shape[0], -1)), axis=1)) # Organize the data; trim out those not selected data = [[[i for _ in r], r, [ksidx[tuple(a)] for a in r]] for (i,r0,ok) in zip(idcs, res, oks) if ok for ksidx in [{tuple(a):(k+1) for (k,a) in enumerate(r0)}] for r in [select(i, r0)] if len(r) > 0] # Flatten out the data into arguments for Java idcs = [int(i) for d in data for i in d[0]] ancs = np.asarray([pt for d in data for pt in d[1]]).T labs = np.asarray([ii for d in data for ii in d[2]]).T # Get just the relevant weights and the scale wgts = np.asarray(weight[idcs] * (1 if scale is None else scale)) # add in the field-sign weights and radius weights if requested here; if not np.isclose(field_sign_weight, 0) and mdl.area_name_to_id is not None: id2n = mdl.area_id_to_name if field_sign is True or field_sign is Ellipsis or field_sign is None: from .cmag import cmag r = {'polar_angle': polar_angle, 'eccentricity': eccentricity} #field_sign = retinotopic_field_sign(mesh, retinotopy=r) field_sign = cmag(mesh, r)['field_sign'] elif pimms.is_str(field_sign): field_sign = mesh.prop(field_sign) field_sign = np.asarray(field_sign) if invert_field_sign: field_sign = -field_sign fswgts = 1.0 - 0.25 * np.asarray( [(fs - visual_area_field_signs[id2n[l]]) if l in id2n else 0 for (l,fs) in zip(labs,field_sign[idcs])])**2 # average the weights at some fraction with the original weights fswgts = field_sign_weight*fswgts + (1 - field_sign_weight)*wgts else: fswgts = None # add in radius weights if requested as well if not np.isclose(radius_weight, 0) and mdl.area_name_to_id is not None: id2n = mdl.area_id_to_name emprad = extract_retinotopy_argument(mesh, 'radius', radius, default='empirical') emprad = emprad[idcs] emprad = np.argsort(np.argsort(emprad)) * (1.0 / len(emprad)) - 0.5 eccs = eccentricity[idcs] prerad = np.asarray([predict_pRF_radius(ecc, id2n[lbl], source=radius_weight_source) for (ecc,lbl) in zip(eccs,labs)]) prerad = np.argsort(np.argsort(prerad)) * (1.0 / len(prerad)) - 0.5 rdwgts = 1.0 - (emprad - prerad)**2 # average the weights at some fraction with the original weights rdwgts = radius_weight*rdwgts + (1-radius_weight)*wgts else: rdwgts = None # apply the weights if fswgts is not None: if rdwgts is not None: wgts = np.power(fswgts*rdwgts*wgts, 1.0/3.0) else: wgts = np.sqrt(fswgts*wgts) elif rdwgts is not None: wgts = np.sqrt(rdwgts*wgts) # Figure out the sigma parameter: if sigma is None: sigs = None elif pimms.is_number(sigma): sigs = sigma elif pimms.is_vector(sigma) and len(sigma) == 3: [minsig, mult, maxsig] = sigma sigs = np.clip( [mult*min([npla.norm(a0 - a) for a in anchs if a is not a0]) if len(iii) > 1 else maxsig for (iii,anchs,_) in data for a0 in anchs], minsig, maxsig) else: raise ValueError('sigma must be a number or a list of 3 numbers') # okay, we've partially parsed the data that was given; now we can construct the final list of # instructions: tmp = (['anchor', shape, np.asarray(idcs, dtype=np.int), np.asarray(ancs, dtype=np.float64), 'scale', np.asarray(wgts, dtype=np.float64)] + ([] if sigs is None else ['sigma', sigs]) + ([] if suffix is None else suffix)) return tmp
[ "def", "retinotopy_anchors", "(", "mesh", ",", "mdl", ",", "polar_angle", "=", "None", ",", "eccentricity", "=", "None", ",", "weight", "=", "None", ",", "weight_min", "=", "0.1", ",", "field_sign_weight", "=", "0", ",", "field_sign", "=", "None", ",", "...
retinotopy_anchors(mesh, model) is intended for use with the mesh_register function and the retinotopy_model() function and/or the RetinotopyModel class; it yields a description of the anchor points that tie relevant vertices the given mesh to points predicted by the given model object. Any instance of the RetinotopyModel class should work as a model argument; this includes SchiraModel objects as well as RetinotopyMeshModel objects such as those returned by the retinotopy_model() function. If the model given is a string, then it is passed to the retinotopy_model() function first. Options: * polar_angle (default None) specifies that the given data should be used in place of the 'polar_angle' or 'PRF_polar_angle' property values. The given argument must be numeric and the same length as the the number of vertices in the mesh. If None is given, then the property value of the mesh is used; if a list is given and any element is None, then the weight for that vertex is treated as a zero. If the option is a string, then the property value with the same name isused as the polar_angle data. * eccentricity (default None) specifies that the given data should be used in places of the 'eccentricity' or 'PRF_eccentricity' property values. The eccentricity option is handled virtually identically to the polar_angle option. * weight (default None) specifies that the weight or scale of the data; this is handled generally like the polar_angle and eccentricity options, but may also be 1, indicating that all vertices with polar_angle and eccentricity values defined will be given a weight of 1. If weight is left as None, then the function will check for 'weight', 'variance_explained', 'PRF_variance_explained', and 'retinotopy_weight' values and will use the first found (in that order). If none of these is found, then a value of 1 is assumed. * weight_min (default 0) specifies that the weight must be higher than the given value inn order to be included in the fit; vertices with weights below this value have their weights truncated to 0. * scale (default 1) specifies a constant by which to multiply all weights for all anchors; the value None is interpreted as 1. * shape (default 'Gaussian') specifies the shape of the potential function (see mesh_register) * model_hemi (default: None) specifies the hemisphere of the model to load; if None, then looks for a non-specific model. * suffix (default None) specifies any additional arguments that should be appended to the potential function description list that is produced by this function; i.e., the retinotopy_anchors function produces a list, and the contents of suffix, if given and not None, are appended to that list (see mesh_register). * select (default 'close') specifies a function that will be called with two arguments for every vertex given an anchor; the arguments are the vertex label and the matrix of anchors. The function should return a list of anchors to use for the label (None is equivalent to lambda id,anc: anc). The parameter may alternately be specified using the string 'close': select=['close', [k]] indicates that any anchor more than k times the average edge-length in the mesh should be excluded; a value of just ['close', k] on the other hand indicates that any anchor more than k distance from the vertex should be exlcuded. The default value, 'close', is equivalent to ['close', [40]]. * sigma (default [0.1, 2.0, 4.0]) specifies how the sigma parameter should be handled; if None, then no sigma value is specified; if a single number, then all sigma values are assigned that value; if a list of three numbers, then the first is the minimum sigma value, the second is the fraction of the minimum distance between paired anchor points, and the last is the maximum sigma --- the idea with this form of the argument is that the ideal sigma value in many cases is approximately 0.25 to 0.5 times the distance between anchors to which a single vertex is attracted; for any anchor a to which a vertex u is attracted, the sigma of a is the middle sigma-argument value times the minimum distance from a to all other anchors to which u is attracted (clipped by the min and max sigma). * field_sign_weight (default: 0) specifies the amount of weight that should be put on the retinotopic field of the model as a method of attenuating the weights on those anchors whose empirical retinotopic values and predicted model locations do not match. The weight that results is calculated from the difference in empirical field-sign for each vertex and the visual area field sign based on the labels in the model. The higher the field-sign weight, (approaching 1) the more the resulting value is a geometric mean of the field-sign-based weight and the original weights. As this value approaches 0, the resulting weights are more like the original weights. * radius_weight (default: 0) specifies the amount of weight that should be put on the receptive field radius of the model as a method of attenuating the weights on those anchors whose empirical retinotopic values and predicted model locations do not match. The weight that results is calculated from the difference in empirical RF radius for each vertex and the predicted RF radius based on the labels in the model. The higher the radius weight, (approaching 1) the more the resulting value is a geometric mean of the field-sign-based weight and the original weights. As this value approaches 0, the resulting weights are more like the original weights. * radius_weight_source (default: 'Wandell2015') specifies the source for predicting RF radius; based on eccentricity and visual area label. Example: # The retinotopy_anchors function is intended for use with mesh_register, as follows: # Define our Schira Model: model = neuropythy.registration.SchiraModel() # Make sure our mesh has polar angle, eccentricity, and weight data: mesh.prop('polar_angle', polar_angle_vertex_data); mesh.prop('eccentricity', eccentricity_vertex_data); mesh.prop('weight', variance_explained_vertex_data); # register the mesh using the retinotopy and model: registered_mesh = neuropythy.registration.mesh_register( mesh, ['mesh', retinotopy_anchors(mesh, model)], max_step_size=0.05, max_steps=2000)
[ "retinotopy_anchors", "(", "mesh", "model", ")", "is", "intended", "for", "use", "with", "the", "mesh_register", "function", "and", "the", "retinotopy_model", "()", "function", "and", "/", "or", "the", "RetinotopyModel", "class", ";", "it", "yields", "a", "des...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/vision/retinotopy.py#L827-L1043
train
This function returns a description of the anchor points that tie relevant vertices to predicted vertices.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,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S,WtdkIpFeYozM,MdkNqd1bagO6,QNQS9e6tJqMV,typojWN5Phrq,gufQJgTAhMnI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b1101111) + '\063' + '\x37' + '\x31', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(955 - 904) + chr(54) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(874 - 826) + chr(0b1101111) + chr(0b110001) + chr(0b110000) + '\066', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b101011 + 0o6) + chr(0b11010 + 0o34) + '\062', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(51) + '\x36' + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(11008 - 10897) + chr(50) + '\x37' + chr(0b110001), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + chr(0b110010) + chr(54), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + chr(0b110011 + 0o0) + chr(0b101100 + 0o11), 11021 - 11013), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(111) + chr(51) + '\061' + chr(50), ord("\x08")), nzTpIcepk0o8(chr(1451 - 1403) + chr(0b110101 + 0o72) + chr(1080 - 1029) + '\x37' + chr(55), 0o10), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(111) + chr(0b110001) + chr(479 - 430) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(1054 - 943) + chr(2271 - 2220) + chr(52), 48736 - 48728), nzTpIcepk0o8(chr(695 - 647) + chr(0b1010111 + 0o30) + '\x32' + '\067' + chr(0b110010), 41556 - 41548), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + '\065' + '\x30', ord("\x08")), nzTpIcepk0o8('\060' + chr(7452 - 7341) + '\066' + '\x31', 0b1000), nzTpIcepk0o8(chr(0b11111 + 0o21) + '\x6f' + '\063' + chr(412 - 357) + chr(0b101000 + 0o17), 8), nzTpIcepk0o8(chr(625 - 577) + '\157' + chr(49) + '\066' + '\x31', 22109 - 22101), nzTpIcepk0o8('\x30' + '\157' + '\066' + chr(0b110111), 52981 - 52973), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110101 + 0o2), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + '\061' + '\x31', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + chr(1256 - 1201) + chr(0b110011), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + chr(2238 - 2188) + chr(1942 - 1892), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001 + 0o1) + '\x37' + '\x37', 0o10), nzTpIcepk0o8('\x30' + chr(7333 - 7222) + chr(667 - 616) + chr(55) + '\063', 0o10), nzTpIcepk0o8(chr(1611 - 1563) + '\157' + chr(51) + chr(55) + '\x31', 8), nzTpIcepk0o8(chr(49 - 1) + '\x6f' + chr(1824 - 1775) + '\062' + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b10100 + 0o133) + chr(0b101001 + 0o12) + chr(1618 - 1563) + chr(0b110001), 8), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + chr(0b101001 + 0o16) + chr(1723 - 1669), 0b1000), nzTpIcepk0o8(chr(1738 - 1690) + chr(111) + chr(2238 - 2187) + chr(52) + '\x30', 18370 - 18362), nzTpIcepk0o8(chr(48) + chr(7761 - 7650) + chr(0b110111) + chr(55), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101011 + 0o4) + '\062' + '\060' + chr(0b110000), 0o10), nzTpIcepk0o8('\060' + '\157' + '\061' + '\066' + '\066', 0b1000), nzTpIcepk0o8(chr(2091 - 2043) + '\157' + chr(51) + chr(0b110 + 0o57), 0o10), nzTpIcepk0o8('\x30' + chr(5367 - 5256) + chr(0b110010) + chr(52), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b11000 + 0o32), 65272 - 65264), nzTpIcepk0o8(chr(0b11001 + 0o27) + '\x6f' + chr(2323 - 2273) + chr(0b11010 + 0o32) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b110110 + 0o71) + chr(0b110010) + chr(0b110011) + '\x35', 0o10), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(0b1101111) + chr(51) + chr(0b10011 + 0o44) + chr(0b101111 + 0o4), 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(2410 - 2359) + '\067' + '\065', ord("\x08")), nzTpIcepk0o8(chr(304 - 256) + '\x6f' + '\x32' + '\063' + chr(0b110100), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b1000000 + 0o57) + '\x35' + '\060', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xd7'), chr(3355 - 3255) + chr(0b1100101) + '\x63' + chr(0b1001001 + 0o46) + chr(100) + chr(101))('\165' + chr(0b1110100) + '\146' + chr(0b110 + 0o47) + chr(1109 - 1053)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def bEebcqmA0lAw(olfRNjSgvQh6, AyfNy9MUxk6F, ooKdxILblZqK=None, J0cNllQBMug7=None, iBxKYeMqq_Bt=None, Ln79tjAfkW3Z=0.1, yeLIHjdeJh9t=nzTpIcepk0o8(chr(1223 - 1175) + chr(111) + chr(0b110000 + 0o0), 0o10), cbzpjAxnbPkW=None, GM49tZD66vR4=nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b1101111) + chr(942 - 894), 8), iUYivoiUtGhn=nzTpIcepk0o8(chr(2210 - 2162) + chr(285 - 174) + '\060', 8), MKQMDnGDdZUd=roI3spqORKae(ES5oEprVxulp(b'\xae\x94(\x16\x93\xd5\xbao\xfa\xcez'), chr(100) + chr(0b1010001 + 0o24) + chr(99) + '\157' + chr(100) + '\x65')(chr(0b1 + 0o164) + chr(7551 - 7435) + chr(0b1100110) + '\055' + '\070'), qGhcQMWNyIbI=None, euZGvxZKpa8Y=None, R8QlNEoai_6G=RjQP07DYIdkf, r4zeu1khcH7g=nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1716 - 1667), 0b1000), lhbM092AFW8f=roI3spqORKae(ES5oEprVxulp(b'\xbe\x943\x01\x85\xd0\xb73'), chr(0b1100100) + chr(101) + '\x63' + chr(0b1101101 + 0o2) + chr(0b1100100) + chr(0b101101 + 0o70))(chr(3001 - 2884) + chr(12951 - 12835) + chr(0b1100110) + chr(0b101101) + chr(1003 - 947)), biRCFepsLie5=None, uc4gGmjAvJP3=[0.1, 2.0, 8.0], ioyOAbFuCaaE=roI3spqORKae(ES5oEprVxulp(b'\x9a\x99)\x01\x93'), '\x64' + chr(0b0 + 0o145) + chr(5601 - 5502) + '\157' + chr(8419 - 8319) + chr(101))(chr(0b1110101) + '\x74' + chr(0b1011000 + 0o16) + chr(0b101101) + chr(0b101011 + 0o15))): if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x90\x86\x19\x01\x82\xcb'), '\144' + chr(101) + chr(99) + chr(1848 - 1737) + chr(0b10010 + 0o122) + chr(101))('\x75' + chr(0b1110000 + 0o4) + '\x66' + chr(0b101101) + chr(0b111000)))(AyfNy9MUxk6F): nRSX3HCpSIw0 = None if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x90\x86\x19\x01\x82\xcb'), chr(100) + chr(0b1100000 + 0o5) + '\143' + chr(0b111000 + 0o67) + '\144' + chr(1723 - 1622))('\165' + chr(0b111000 + 0o74) + chr(0b1100110) + chr(0b101101) + chr(0b111000)))(R8QlNEoai_6G): R8QlNEoai_6G = R8QlNEoai_6G.iq1mNMefb1Zd() xCzLuaz8PugO = {B6UAF1zReOyJ: _9ve2uheHd6a for (_9ve2uheHd6a, xAxWurfGzxNU) in [(roI3spqORKae(ES5oEprVxulp(b'\xb5\xbd'), '\144' + '\145' + '\x63' + '\x6f' + chr(100) + chr(101))(chr(117) + chr(0b1110100) + chr(0b1100110) + chr(0b1011 + 0o42) + chr(0b111000)), [roI3spqORKae(ES5oEprVxulp(b'\xb5\xbd'), '\x64' + chr(834 - 733) + '\143' + chr(5403 - 5292) + '\x64' + '\145')(chr(0b1110101) + '\164' + '\x66' + '\055' + '\070'), roI3spqORKae(ES5oEprVxulp(b'\xb5'), chr(5678 - 5578) + chr(0b11100 + 0o111) + '\x63' + chr(6585 - 6474) + chr(100) + chr(0b1011 + 0o132))(chr(0b1110101) + chr(9347 - 9231) + '\x66' + '\x2d' + chr(0b10001 + 0o47)), roI3spqORKae(ES5oEprVxulp(b'\xb5\xb0\x00&'), '\x64' + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(0b1001010 + 0o32) + '\x65')('\x75' + '\x74' + chr(0b1100110) + '\055' + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\xab\xbd\x1e'), '\x64' + chr(0b1100101) + chr(0b110 + 0o135) + '\157' + '\144' + chr(0b100001 + 0o104))('\165' + chr(0b1000001 + 0o63) + '\x66' + chr(0b101101) + '\070'), roI3spqORKae(ES5oEprVxulp(b'\xab\xad'), chr(5346 - 5246) + '\145' + chr(9566 - 9467) + chr(111) + chr(0b11011 + 0o111) + chr(3496 - 3395))('\x75' + chr(0b1110100) + '\146' + chr(356 - 311) + '\x38')]), (roI3spqORKae(ES5oEprVxulp(b'\xab\xbd'), chr(2628 - 2528) + '\145' + chr(2615 - 2516) + chr(0b1101100 + 0o3) + chr(0b1100100) + chr(0b1100101))(chr(1882 - 1765) + chr(116) + chr(0b1100110) + chr(0b101101) + '\x38'), [roI3spqORKae(ES5oEprVxulp(b'\xab\xbd'), chr(100) + chr(4465 - 4364) + chr(0b1100011) + chr(5294 - 5183) + '\x64' + '\145')(chr(0b110100 + 0o101) + chr(0b1110100) + chr(0b1100110) + '\055' + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\xab'), chr(0b1100100) + chr(8353 - 8252) + chr(0b101000 + 0o73) + '\157' + '\144' + chr(101))(chr(8154 - 8037) + chr(3233 - 3117) + '\x66' + '\x2d' + chr(2313 - 2257)), roI3spqORKae(ES5oEprVxulp(b'\xab\xbc\x01:\xa2'), chr(2626 - 2526) + '\145' + chr(759 - 660) + chr(1242 - 1131) + chr(100) + chr(0b1100101))('\x75' + chr(0b1110100) + chr(0b1100110) + '\055' + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\xb5\xbd\x1e'), chr(0b1000101 + 0o37) + '\x65' + chr(7605 - 7506) + '\x6f' + '\x64' + chr(101))('\x75' + chr(0b10001 + 0o143) + chr(0b1100110) + chr(45) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\xb5\xad'), chr(0b1100100) + chr(0b10111 + 0o116) + chr(99) + '\x6f' + '\x64' + chr(0b110101 + 0o60))(chr(11852 - 11735) + '\164' + chr(0b1100110) + chr(0b0 + 0o55) + '\x38')])] for B6UAF1zReOyJ in xAxWurfGzxNU} if R8QlNEoai_6G in xCzLuaz8PugO: nRSX3HCpSIw0 = xCzLuaz8PugO[R8QlNEoai_6G] else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xac\x9b4\x17\x95\xd6\xb13\xa3\x85*x\x9a\x80T\x92\x18Dw\xe1\x1e\xe0\xda\xdb\x972\x94\x1b\xda\x1f\xa5\x05'), '\144' + '\x65' + chr(0b1000101 + 0o36) + '\x6f' + chr(0b1101 + 0o127) + chr(0b11110 + 0o107))(chr(117) + chr(4125 - 4009) + '\x66' + '\x2d' + chr(0b11010 + 0o36)) % R8QlNEoai_6G) elif R8QlNEoai_6G is not None: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\x94\x9a"\x17\x9a\xe6\xbe8\xa7\x96oq\xcf\x9bE\xdf\x13R\'\xe8[\xe1\xcb\x89\x90=\x9eR\xc0z\xec\x1atdq\xcc\xee\xd7\xdd\xf3\x8b\xd5\x08\x1d\x98\xdc'), chr(100) + '\x65' + chr(2742 - 2643) + chr(111) + chr(0b11001 + 0o113) + '\x65')(chr(0b1000011 + 0o62) + '\164' + '\x66' + chr(0b101101) + '\070')) AyfNy9MUxk6F = e_0pGsIB40a0(AyfNy9MUxk6F, hemi=nRSX3HCpSIw0) if not suIjIS24Zkqw(AyfNy9MUxk6F, mWrC0OXZE9sA): raise _1qUu0gKi9gH(roI3spqORKae(ES5oEprVxulp(b"\x9e\x9c0\x17\x98\x99\xbb2\xae\x9a#<\xd3\x9b\x11\x91\x1eC'\xe8[\xc0\xda\x8f\x90=\x96\n\x8fO\xf9;rpg\xc9\xbd\x92\x93\xef\x8d\x94(\x11\x93\x98"), chr(0b1000010 + 0o42) + chr(101) + chr(9633 - 9534) + chr(0b1101111) + '\x64' + '\145')('\x75' + chr(0b1110100) + chr(0b10010 + 0o124) + chr(1423 - 1378) + chr(1782 - 1726))) if not suIjIS24Zkqw(olfRNjSgvQh6, roI3spqORKae(GZNMH8A4U3yp, roI3spqORKae(ES5oEprVxulp(b'\xb4\x905\x1a'), chr(100) + chr(0b1100101) + chr(6503 - 6404) + chr(6763 - 6652) + chr(4703 - 4603) + '\145')(chr(0b100000 + 0o125) + chr(116) + '\146' + chr(0b101101) + chr(2147 - 2091)))): raise _1qUu0gKi9gH(roI3spqORKae(ES5oEprVxulp(b'\x9e\x9c0\x17\x98\x99\xbb8\xb9\x97ou\xc9\xc8_\x90\x05\x17f\xa96\xf7\xcc\x93\xd9<\x9b\x14\x85\\\xf4W'), chr(100) + chr(0b10100 + 0o121) + chr(0b1011110 + 0o5) + chr(6045 - 5934) + chr(0b1000000 + 0o44) + chr(5452 - 5351))(chr(117) + '\x74' + chr(2498 - 2396) + chr(0b101001 + 0o4) + '\x38')) NoZxuO7wjArS = olfRNjSgvQh6.vertex_count mxhyDqTAMpMC = olfRNjSgvQh6.coordinates.hq6XE4_Nhd6R if Ln79tjAfkW3Z is None: Ln79tjAfkW3Z = nzTpIcepk0o8('\x30' + chr(0b1010100 + 0o33) + chr(0b101110 + 0o2), 8) (ooKdxILblZqK, J0cNllQBMug7, iBxKYeMqq_Bt) = [Wsfg_Pu9yzqA(olfRNjSgvQh6, SLVB2BPA_mIe, S6EI_gyMl2nC, default=roI3spqORKae(ES5oEprVxulp(b'\x9c\x986\x1b\x84\xd0\xb5<\xa6'), '\144' + chr(101) + chr(0b111010 + 0o51) + chr(111) + '\144' + '\x65')(chr(0b10 + 0o163) + chr(0b11100 + 0o130) + chr(7899 - 7797) + '\055' + '\x38')) for (SLVB2BPA_mIe, S6EI_gyMl2nC) in [(roI3spqORKae(ES5oEprVxulp(b'\x89\x9a*\x13\x84\xe6\xb73\xad\x93*'), '\144' + '\145' + chr(0b10111 + 0o114) + chr(1807 - 1696) + chr(0b1100100) + chr(101))(chr(0b1110101 + 0o0) + '\x74' + '\x66' + chr(45) + chr(2944 - 2888)), ooKdxILblZqK), (roI3spqORKae(ES5oEprVxulp(b'\x9c\x96%\x17\x98\xcd\xa44\xa9\x96;e'), '\144' + chr(0b1100101) + chr(0b100110 + 0o75) + '\x6f' + chr(100) + '\145')(chr(117) + '\x74' + chr(102) + chr(45) + chr(0b111000)), J0cNllQBMug7), (roI3spqORKae(ES5oEprVxulp(b'\x8e\x90/\x15\x9e\xcd'), chr(100) + '\145' + chr(5498 - 5399) + '\157' + chr(0b1100100) + chr(10182 - 10081))('\x75' + '\x74' + chr(0b101001 + 0o75) + chr(698 - 653) + chr(0b111000)), nDF4gVNx0u9Q.FQnMqH8X9LID(NoZxuO7wjArS, iBxKYeMqq_Bt) if zAgo8354IlJ7.is_number(iBxKYeMqq_Bt) else iBxKYeMqq_Bt)]] (ooKdxILblZqK, J0cNllQBMug7, iBxKYeMqq_Bt) = dPy57KNPAzpC(ooKdxILblZqK, J0cNllQBMug7, iBxKYeMqq_Bt, weight_min=Ln79tjAfkW3Z) if roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\x96\x96*1\xce\xfd\x9a7\x8b\xa0#J'), '\x64' + '\145' + chr(99) + chr(0b11111 + 0o120) + chr(0b1100100) + '\x65')(chr(7999 - 7882) + chr(116) + '\146' + chr(0b11011 + 0o22) + '\070'))(iBxKYeMqq_Bt > nzTpIcepk0o8('\x30' + chr(0b1001 + 0o146) + chr(0b1 + 0o57), 8)) == nzTpIcepk0o8('\x30' + chr(111) + chr(48), 8): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xb7\x9af\x02\x99\xca\xbf)\xa3\x89*<\xcd\x8dX\x98\x19Ct\xa9\x1d\xfd\xca\x95\x9d'), chr(100) + '\145' + chr(0b1001100 + 0o27) + chr(0b1101111) + '\x64' + '\145')(chr(0b100000 + 0o125) + chr(0b100111 + 0o115) + '\x66' + '\x2d' + chr(471 - 415))) oWFalk9jWbpc = nDF4gVNx0u9Q.xWH4M7K6Qbd3(iBxKYeMqq_Bt > nzTpIcepk0o8('\x30' + chr(111) + chr(48), 8))[nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11010 + 0o26), 8)] ioyOAbFuCaaE = [roI3spqORKae(ES5oEprVxulp(b'\x9a\x99)\x01\x93'), '\x64' + '\x65' + chr(99) + '\157' + '\x64' + chr(0b1100101))('\x75' + chr(11505 - 11389) + '\146' + chr(45) + chr(3006 - 2950)), [nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x35' + chr(0b1010 + 0o46), 8)]] if ioyOAbFuCaaE == roI3spqORKae(ES5oEprVxulp(b'\x9a\x99)\x01\x93'), chr(8651 - 8551) + chr(1072 - 971) + chr(7238 - 7139) + chr(0b110111 + 0o70) + '\x64' + chr(0b1011000 + 0o15))('\165' + chr(0b1110100) + chr(4565 - 4463) + '\055' + '\x38') else [roI3spqORKae(ES5oEprVxulp(b'\x9a\x99)\x01\x93'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(0b110110 + 0o71) + '\x64' + chr(0b1100101))('\x75' + chr(5977 - 5861) + chr(102) + chr(45) + '\070'), [nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(11479 - 11368) + chr(53) + '\x30', 8)]] if ioyOAbFuCaaE == [roI3spqORKae(ES5oEprVxulp(b'\x9a\x99)\x01\x93'), chr(100) + chr(0b111010 + 0o53) + chr(0b1000100 + 0o37) + chr(0b110100 + 0o73) + chr(0b11101 + 0o107) + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(0b101 + 0o141) + chr(0b101101) + chr(0b111000))] else ioyOAbFuCaaE if ioyOAbFuCaaE is None: def ioyOAbFuCaaE(AQ9ceR9AaoT1, xFDEVQn5qSdh): return xFDEVQn5qSdh elif (roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x90\x86\x19\x04\x93\xda\xa22\xb8'), '\144' + chr(0b1011110 + 0o7) + '\143' + chr(111) + '\144' + '\145')('\165' + chr(7906 - 7790) + chr(0b1100110) + chr(0b101101) + chr(1367 - 1311)))(ioyOAbFuCaaE) or ckw3KzAL3kba(ioyOAbFuCaaE) or kBeKB4Df6Zrm(ioyOAbFuCaaE)) and ftfygxgFas5X(ioyOAbFuCaaE) == nzTpIcepk0o8(chr(0b110000) + chr(0b10000 + 0o137) + chr(0b10000 + 0o42), 8) and (ioyOAbFuCaaE[nzTpIcepk0o8(chr(0b1001 + 0o47) + '\157' + '\060', 8)] == roI3spqORKae(ES5oEprVxulp(b'\x9a\x99)\x01\x93'), chr(0b1100011 + 0o1) + '\145' + '\x63' + chr(0b1011011 + 0o24) + chr(100) + chr(101))(chr(0b1110101) + chr(6021 - 5905) + '\x66' + chr(0b101101) + '\070')): if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x90\x86\x19\x04\x93\xda\xa22\xb8'), chr(100) + chr(101) + '\143' + chr(0b1100001 + 0o16) + chr(0b0 + 0o144) + chr(101))(chr(13409 - 13292) + chr(0b1111 + 0o145) + chr(102) + '\055' + chr(0b100 + 0o64)))(ioyOAbFuCaaE[nzTpIcepk0o8('\x30' + '\157' + chr(0b1011 + 0o46), 8)]): vPPlOXQgR3SM = nDF4gVNx0u9Q.JE1frtxECu3x(olfRNjSgvQh6.edge_lengths) * ioyOAbFuCaaE[nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061', 8)][nzTpIcepk0o8('\x30' + chr(2319 - 2208) + chr(0b1001 + 0o47), 8)] else: vPPlOXQgR3SM = ioyOAbFuCaaE[nzTpIcepk0o8('\x30' + chr(0b1011011 + 0o24) + '\x31', 8)] def ioyOAbFuCaaE(At3kbMoXzzmV, YQ2yYxR6Kc9A): return [AQ9ceR9AaoT1 for AQ9ceR9AaoT1 in YQ2yYxR6Kc9A if AQ9ceR9AaoT1[nzTpIcepk0o8(chr(0b110 + 0o52) + chr(11342 - 11231) + chr(0b110000), 8)] is not None if roI3spqORKae(fGHETgqJg5SB, roI3spqORKae(ES5oEprVxulp(b"\x81\xb7\x004\xbc\xff\xb7'\xa3\xb9\x0bI"), chr(1258 - 1158) + chr(0b1100101) + chr(0b1100011) + chr(0b101100 + 0o103) + '\144' + '\145')('\x75' + chr(0b1110100) + '\146' + chr(45) + chr(56)))(mxhyDqTAMpMC[At3kbMoXzzmV] - AQ9ceR9AaoT1) < vPPlOXQgR3SM] _XdQFJpnzJor = AyfNy9MUxk6F.angle_to_cortex(ooKdxILblZqK[oWFalk9jWbpc], J0cNllQBMug7[oWFalk9jWbpc]) zA1iay47SBh9 = nDF4gVNx0u9Q.AWxpWpGwxU15(nDF4gVNx0u9Q.oclC8DLjA_lV(nDF4gVNx0u9Q.reshape(_XdQFJpnzJor, (_XdQFJpnzJor.lhbM092AFW8f[nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(111) + chr(845 - 797), 8)], -nzTpIcepk0o8('\060' + chr(5568 - 5457) + chr(637 - 588), 8))), axis=nzTpIcepk0o8('\x30' + chr(5663 - 5552) + chr(0b1010 + 0o47), 8))) FfKOThdpoDTb = [[[ZlbFMSG8gCoF for zIqcgNgQ9U6F in LCrwg7lcbmU9], LCrwg7lcbmU9, [ugEcnNy2tzI3[nfNqtJL5aRaY(AQ9ceR9AaoT1)] for AQ9ceR9AaoT1 in LCrwg7lcbmU9]] for (ZlbFMSG8gCoF, a2vuJMOBrLrT, arcyz8y9ckuT) in TxMFWa_Xzviv(oWFalk9jWbpc, _XdQFJpnzJor, zA1iay47SBh9) if arcyz8y9ckuT for ugEcnNy2tzI3 in [{nfNqtJL5aRaY(AQ9ceR9AaoT1): B6UAF1zReOyJ + nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b111 + 0o150) + chr(49), 8) for (B6UAF1zReOyJ, AQ9ceR9AaoT1) in _kV_Bomx8PZ4(a2vuJMOBrLrT)}] for LCrwg7lcbmU9 in [ioyOAbFuCaaE(ZlbFMSG8gCoF, a2vuJMOBrLrT)] if ftfygxgFas5X(LCrwg7lcbmU9) > nzTpIcepk0o8(chr(0b11101 + 0o23) + '\157' + '\x30', 8)] oWFalk9jWbpc = [nzTpIcepk0o8(ZlbFMSG8gCoF) for vPPlOXQgR3SM in FfKOThdpoDTb for ZlbFMSG8gCoF in vPPlOXQgR3SM[nzTpIcepk0o8(chr(0b101001 + 0o7) + '\157' + chr(2052 - 2004), 8)]] YQ2yYxR6Kc9A = nDF4gVNx0u9Q.asarray([i9cIicSKupwD for vPPlOXQgR3SM in FfKOThdpoDTb for i9cIicSKupwD in vPPlOXQgR3SM[nzTpIcepk0o8(chr(48) + chr(0b10010 + 0o135) + '\x31', 8)]]).hq6XE4_Nhd6R NwWTZrm1WiKj = nDF4gVNx0u9Q.asarray([p8Ou2emaDF7Z for vPPlOXQgR3SM in FfKOThdpoDTb for p8Ou2emaDF7Z in vPPlOXQgR3SM[nzTpIcepk0o8(chr(0b100100 + 0o14) + '\157' + chr(0b100 + 0o56), 8)]]).hq6XE4_Nhd6R iNbrzwIbS6qX = nDF4gVNx0u9Q.asarray(iBxKYeMqq_Bt[oWFalk9jWbpc] * (nzTpIcepk0o8(chr(1540 - 1492) + chr(0b110000 + 0o77) + '\061', 8) if r4zeu1khcH7g is None else r4zeu1khcH7g)) if not roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xaa\xa7\x111\xa9\xf6\xb0\x08\xfb\x92\x03T'), chr(100) + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(0b1100100) + '\145')('\165' + chr(116) + '\x66' + '\x2d' + chr(0b0 + 0o70)))(yeLIHjdeJh9t, nzTpIcepk0o8(chr(2199 - 2151) + chr(9722 - 9611) + chr(0b110000), 8)) and roI3spqORKae(AyfNy9MUxk6F, roI3spqORKae(ES5oEprVxulp(b'\x98\x87#\x13\xa9\xd7\xb70\xaf\xa0;s\xe5\x81U'), '\144' + chr(8442 - 8341) + chr(5471 - 5372) + '\157' + chr(0b1100100) + '\145')(chr(8596 - 8479) + '\x74' + chr(603 - 501) + chr(45) + chr(56))) is not None: ZehFxnvcnMu1 = AyfNy9MUxk6F.area_id_to_name if cbzpjAxnbPkW is nzTpIcepk0o8('\x30' + chr(111) + '\x31', 8) or cbzpjAxnbPkW is RjQP07DYIdkf or cbzpjAxnbPkW is None: (CuGGxrJTb21Y,) = (roI3spqORKae(rFFUeiYWzOhx(roI3spqORKae(ES5oEprVxulp(b"\x9a\x98'\x15"), '\x64' + chr(0b1100101) + chr(0b1100011) + '\x6f' + chr(100) + chr(0b1000101 + 0o40))('\165' + chr(0b1101001 + 0o13) + '\x66' + chr(299 - 254) + chr(0b101000 + 0o20)), roI3spqORKae(ES5oEprVxulp(b"\x9a\x98'\x15"), chr(0b11111 + 0o105) + '\x65' + chr(0b1000101 + 0o36) + chr(0b1101111) + '\144' + chr(0b11011 + 0o112))('\x75' + chr(116) + chr(5661 - 5559) + '\055' + chr(2270 - 2214))), roI3spqORKae(ES5oEprVxulp(b"\x9a\x98'\x15"), chr(0b1100100) + '\x65' + chr(99) + chr(0b1101111) + chr(0b100011 + 0o101) + '\145')('\x75' + chr(0b110000 + 0o104) + chr(102) + chr(0b101101) + chr(0b101100 + 0o14))),) LCrwg7lcbmU9 = {roI3spqORKae(ES5oEprVxulp(b'\x89\x9a*\x13\x84\xe6\xb73\xad\x93*'), '\144' + chr(101) + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))('\x75' + '\164' + '\x66' + '\055' + '\070'): ooKdxILblZqK, roI3spqORKae(ES5oEprVxulp(b'\x9c\x96%\x17\x98\xcd\xa44\xa9\x96;e'), chr(898 - 798) + chr(500 - 399) + '\x63' + chr(111) + chr(0b1100100) + '\x65')(chr(117) + '\164' + '\x66' + chr(1827 - 1782) + '\x38'): J0cNllQBMug7} cbzpjAxnbPkW = CuGGxrJTb21Y(olfRNjSgvQh6, LCrwg7lcbmU9)[roI3spqORKae(ES5oEprVxulp(b'\x9f\x9c#\x1e\x92\xe6\xa54\xad\x91'), '\x64' + chr(5031 - 4930) + chr(99) + chr(261 - 150) + chr(100) + '\x65')('\165' + chr(528 - 412) + chr(7066 - 6964) + chr(0b101101) + chr(0b111000))] elif roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x90\x86\x19\x01\x82\xcb'), '\144' + chr(0b1100101) + chr(0b1100011) + chr(7823 - 7712) + chr(0b10011 + 0o121) + chr(0b1100101))('\165' + chr(0b111001 + 0o73) + '\x66' + chr(0b101101) + chr(691 - 635)))(cbzpjAxnbPkW): cbzpjAxnbPkW = olfRNjSgvQh6.prop(cbzpjAxnbPkW) cbzpjAxnbPkW = nDF4gVNx0u9Q.asarray(cbzpjAxnbPkW) if GM49tZD66vR4: cbzpjAxnbPkW = -cbzpjAxnbPkW NqdVF_3n4hsG = 1.0 - 0.25 * nDF4gVNx0u9Q.asarray([ANVmZzFk_RHC - rrsR2Zx9VeMz[ZehFxnvcnMu1[fPrVrKACaFCC]] if fPrVrKACaFCC in ZehFxnvcnMu1 else nzTpIcepk0o8('\x30' + chr(9877 - 9766) + chr(48), 8) for (fPrVrKACaFCC, ANVmZzFk_RHC) in TxMFWa_Xzviv(NwWTZrm1WiKj, cbzpjAxnbPkW[oWFalk9jWbpc])]) ** nzTpIcepk0o8(chr(48) + chr(0b1100000 + 0o17) + chr(1989 - 1939), 8) NqdVF_3n4hsG = yeLIHjdeJh9t * NqdVF_3n4hsG + (nzTpIcepk0o8(chr(0b101000 + 0o10) + '\x6f' + '\061', 8) - yeLIHjdeJh9t) * iNbrzwIbS6qX else: NqdVF_3n4hsG = None if not roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xaa\xa7\x111\xa9\xf6\xb0\x08\xfb\x92\x03T'), '\144' + chr(7571 - 7470) + chr(792 - 693) + chr(111) + '\144' + '\145')(chr(0b1110101) + chr(0b1110100) + chr(102) + chr(1183 - 1138) + chr(0b111000)))(iUYivoiUtGhn, nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110000), 8)) and roI3spqORKae(AyfNy9MUxk6F, roI3spqORKae(ES5oEprVxulp(b'\x98\x87#\x13\xa9\xd7\xb70\xaf\xa0;s\xe5\x81U'), '\x64' + '\145' + '\x63' + chr(2523 - 2412) + chr(0b11110 + 0o106) + '\x65')(chr(0b1110101) + chr(116) + '\146' + chr(0b101101) + '\070')) is not None: ZehFxnvcnMu1 = AyfNy9MUxk6F.area_id_to_name D5PwH7HNrIg6 = Wsfg_Pu9yzqA(olfRNjSgvQh6, roI3spqORKae(ES5oEprVxulp(b'\x8b\x94"\x1b\x83\xca'), chr(0b1100100) + chr(101) + chr(0b100110 + 0o75) + '\x6f' + '\x64' + '\145')('\165' + chr(116) + chr(0b1100110) + chr(45) + '\070'), qGhcQMWNyIbI, default=roI3spqORKae(ES5oEprVxulp(b'\x9c\x986\x1b\x84\xd0\xb5<\xa6'), chr(0b1001101 + 0o27) + '\145' + chr(5737 - 5638) + chr(0b10111 + 0o130) + '\x64' + chr(5472 - 5371))(chr(0b111101 + 0o70) + chr(0b1110100) + chr(0b1100110) + chr(0b11 + 0o52) + chr(56))) D5PwH7HNrIg6 = D5PwH7HNrIg6[oWFalk9jWbpc] D5PwH7HNrIg6 = nDF4gVNx0u9Q.argsort(nDF4gVNx0u9Q.argsort(D5PwH7HNrIg6)) * (1.0 / ftfygxgFas5X(D5PwH7HNrIg6)) - 0.5 gQL4TJPGyvCP = J0cNllQBMug7[oWFalk9jWbpc] Ax5zE0Y1avff = nDF4gVNx0u9Q.asarray([AH_IuH1RaXuz(cRb7OGyXJeT1, ZehFxnvcnMu1[aYHSBMjZouVV], source=MKQMDnGDdZUd) for (cRb7OGyXJeT1, aYHSBMjZouVV) in TxMFWa_Xzviv(gQL4TJPGyvCP, NwWTZrm1WiKj)]) Ax5zE0Y1avff = nDF4gVNx0u9Q.argsort(nDF4gVNx0u9Q.argsort(Ax5zE0Y1avff)) * (1.0 / ftfygxgFas5X(Ax5zE0Y1avff)) - 0.5 TrXFm0JjALOp = 1.0 - (D5PwH7HNrIg6 - Ax5zE0Y1avff) ** nzTpIcepk0o8('\060' + chr(2752 - 2641) + chr(0b110010), 8) TrXFm0JjALOp = iUYivoiUtGhn * TrXFm0JjALOp + (nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b11101 + 0o24), 8) - iUYivoiUtGhn) * iNbrzwIbS6qX else: TrXFm0JjALOp = None if NqdVF_3n4hsG is not None: if TrXFm0JjALOp is not None: iNbrzwIbS6qX = nDF4gVNx0u9Q.power(NqdVF_3n4hsG * TrXFm0JjALOp * iNbrzwIbS6qX, 1.0 / 3.0) else: iNbrzwIbS6qX = nDF4gVNx0u9Q.sqrt(NqdVF_3n4hsG * iNbrzwIbS6qX) elif TrXFm0JjALOp is not None: iNbrzwIbS6qX = nDF4gVNx0u9Q.sqrt(TrXFm0JjALOp * iNbrzwIbS6qX) if uc4gGmjAvJP3 is None: AgQg2fGhhkGf = None elif roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x90\x86\x19\x1c\x83\xd4\xb48\xb8'), chr(100) + chr(0b1100101) + chr(529 - 430) + '\x6f' + chr(6398 - 6298) + chr(101))(chr(0b101010 + 0o113) + '\164' + chr(9129 - 9027) + chr(0b101101) + '\070'))(uc4gGmjAvJP3): AgQg2fGhhkGf = uc4gGmjAvJP3 elif roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\x90\x86\x19\x04\x93\xda\xa22\xb8'), chr(100) + '\x65' + chr(7998 - 7899) + chr(0b1101111) + chr(6086 - 5986) + chr(101))('\165' + '\x74' + '\x66' + '\055' + chr(0b111000)))(uc4gGmjAvJP3) and ftfygxgFas5X(uc4gGmjAvJP3) == nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b111 + 0o54), ord("\x08")): [MatrEcLdFdGk, YT7X8RbRQnhH, RQTg8GwisZKU] = uc4gGmjAvJP3 AgQg2fGhhkGf = nDF4gVNx0u9Q.clip([YT7X8RbRQnhH * XURpmPuEWCNF([fGHETgqJg5SB.xBFFJFaziFDU(D58E0u829xTt - AQ9ceR9AaoT1) for AQ9ceR9AaoT1 in tCrdi8hQnYLq if AQ9ceR9AaoT1 is not D58E0u829xTt]) if ftfygxgFas5X(xOfbJsiPB6RA) > nzTpIcepk0o8('\060' + '\x6f' + '\061', 8) else RQTg8GwisZKU for (xOfbJsiPB6RA, tCrdi8hQnYLq, zIqcgNgQ9U6F) in FfKOThdpoDTb for D58E0u829xTt in tCrdi8hQnYLq], MatrEcLdFdGk, RQTg8GwisZKU) else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\x8a\x9c!\x1f\x97\x99\xbb(\xb9\x8bo~\xdf\xc8P\xdf\x1fBj\xeb\x1e\xe0\x9f\x94\x8bs\x98^\x8cV\xf3\x02={d\x85\xae\xdb\x93\xe9\x94\x97#\x00\x85'), chr(100) + '\145' + chr(0b10000 + 0o123) + '\157' + chr(0b101100 + 0o70) + '\145')(chr(0b101100 + 0o111) + '\164' + chr(5305 - 5203) + chr(0b11101 + 0o20) + chr(0b110100 + 0o4))) PT32xG247TS3 = [roI3spqORKae(ES5oEprVxulp(b'\x98\x9b%\x1a\x99\xcb'), chr(100) + chr(101) + chr(3754 - 3655) + '\157' + '\144' + chr(0b111001 + 0o54))(chr(698 - 581) + '\x74' + chr(10192 - 10090) + '\x2d' + '\070'), lhbM092AFW8f, nDF4gVNx0u9Q.asarray(oWFalk9jWbpc, dtype=nDF4gVNx0u9Q.nzTpIcepk0o8), nDF4gVNx0u9Q.asarray(YQ2yYxR6Kc9A, dtype=nDF4gVNx0u9Q.float64), roI3spqORKae(ES5oEprVxulp(b"\x8a\x96'\x1e\x93"), chr(8304 - 8204) + '\x65' + '\x63' + chr(0b1101111) + chr(100) + chr(0b1100101))('\165' + chr(116) + chr(0b100000 + 0o106) + chr(0b1111 + 0o36) + '\070'), nDF4gVNx0u9Q.asarray(iNbrzwIbS6qX, dtype=nDF4gVNx0u9Q.float64)] + ([] if AgQg2fGhhkGf is None else [roI3spqORKae(ES5oEprVxulp(b'\x8a\x9c!\x1f\x97'), '\x64' + chr(0b1100101) + chr(0b11 + 0o140) + chr(0b1101111) + chr(3335 - 3235) + '\145')(chr(117) + '\164' + chr(102) + chr(0b101101) + '\070'), AgQg2fGhhkGf]) + ([] if biRCFepsLie5 is None else biRCFepsLie5) return PT32xG247TS3
noahbenson/neuropythy
neuropythy/vision/retinotopy.py
calc_empirical_retinotopy
def calc_empirical_retinotopy(cortex, polar_angle=None, eccentricity=None, pRF_radius=None, weight=None, eccentricity_range=None, weight_min=0, invert_rh_angle=False, partial_voluming_correction=False): ''' calc_empirical_retinotopy computes the value empirical_retinotopy, which is an itable object storing the retinotopy data for the registration. Required afferent parameters: @ cortex Must be the cortex object that is to be registered to the model of retinotopy. Optional afferent parameters: @ polar_angle May be an array of polar angle values or a polar angle property name; if None (the default), attempts to auto-detect an empirical polar angle property. @ eccentricity May be an array of eccentricity values or an eccentricity property name; if None (the default), attempts to auto-detect an empirical eccentricity property. @ pRF_radius May be an array of receptive field radius values or the property name for such an array; if None (the default), attempts to auto-detect an empirical radius property. @ weight May be an array of weight values or a weight property name; if None (the default), attempts to auto-detect an empirical weight property, such as variance_explained. @ eccentricity_range May be a maximum eccentricity value or a (min, max) eccentricity range to be used in the registration; if None, then no clipping is done. @ weight_min May be given to indicate that weight values below this value should not be included in the registration; the default is 0. @ partial_voluming_correction May be set to True (default is False) to indicate that partial voluming correction should be used to adjust the weights. @ invert_rh_angle May be set to True (default is False) to indicate that the right hemisphere has its polar angle stored with opposite sign to the model polar angle. Efferent values: @ empirical_retinotopy Will be a pimms itable of the empirical retinotopy data to be used in the registration; the table's keys will be 'polar_angle', 'eccentricity', and 'weight'; values that should be excluded for any reason will have 0 weight and undefined angles. ''' data = {} # the map we build up in this function n = cortex.vertex_count (emin,emax) = (-np.inf,np.inf) if eccentricity_range is None else \ (0,eccentricity_range) if pimms.is_number(eccentricity_range) else \ eccentricity_range # Step 1: get our properties straight ########################################################## (ang, ecc, rad, wgt) = [ np.array(extract_retinotopy_argument(cortex, name, arg, default='empirical')) for (name, arg) in [ ('polar_angle', polar_angle), ('eccentricity', eccentricity), ('radius', pRF_radius), ('weight', np.full(n, weight) if pimms.is_number(weight) else weight)]] if wgt is None: wgt = np.ones(len(ecc)) bad = np.logical_not(np.isfinite(np.prod([ang, ecc, wgt], axis=0))) ecc[bad] = 0 wgt[bad] = 0 if rad is not None: rad[bad] = 0 # do partial voluming correction if requested if partial_voluming_correction: wgt = wgt * (1 - cortex.partial_voluming_factor) # now trim and finalize bad = bad | (wgt <= weight_min) | (ecc < emin) | (ecc > emax) wgt[bad] = 0 ang[bad] = 0 ecc[bad] = 0 for x in [ang, ecc, wgt, rad]: if x is not None: x.setflags(write=False) # that's it! dat = dict(polar_angle=ang, eccentricity=ecc, weight=wgt) if rad is not None: dat['radius'] = rad return (pimms.itable(dat),)
python
def calc_empirical_retinotopy(cortex, polar_angle=None, eccentricity=None, pRF_radius=None, weight=None, eccentricity_range=None, weight_min=0, invert_rh_angle=False, partial_voluming_correction=False): ''' calc_empirical_retinotopy computes the value empirical_retinotopy, which is an itable object storing the retinotopy data for the registration. Required afferent parameters: @ cortex Must be the cortex object that is to be registered to the model of retinotopy. Optional afferent parameters: @ polar_angle May be an array of polar angle values or a polar angle property name; if None (the default), attempts to auto-detect an empirical polar angle property. @ eccentricity May be an array of eccentricity values or an eccentricity property name; if None (the default), attempts to auto-detect an empirical eccentricity property. @ pRF_radius May be an array of receptive field radius values or the property name for such an array; if None (the default), attempts to auto-detect an empirical radius property. @ weight May be an array of weight values or a weight property name; if None (the default), attempts to auto-detect an empirical weight property, such as variance_explained. @ eccentricity_range May be a maximum eccentricity value or a (min, max) eccentricity range to be used in the registration; if None, then no clipping is done. @ weight_min May be given to indicate that weight values below this value should not be included in the registration; the default is 0. @ partial_voluming_correction May be set to True (default is False) to indicate that partial voluming correction should be used to adjust the weights. @ invert_rh_angle May be set to True (default is False) to indicate that the right hemisphere has its polar angle stored with opposite sign to the model polar angle. Efferent values: @ empirical_retinotopy Will be a pimms itable of the empirical retinotopy data to be used in the registration; the table's keys will be 'polar_angle', 'eccentricity', and 'weight'; values that should be excluded for any reason will have 0 weight and undefined angles. ''' data = {} # the map we build up in this function n = cortex.vertex_count (emin,emax) = (-np.inf,np.inf) if eccentricity_range is None else \ (0,eccentricity_range) if pimms.is_number(eccentricity_range) else \ eccentricity_range # Step 1: get our properties straight ########################################################## (ang, ecc, rad, wgt) = [ np.array(extract_retinotopy_argument(cortex, name, arg, default='empirical')) for (name, arg) in [ ('polar_angle', polar_angle), ('eccentricity', eccentricity), ('radius', pRF_radius), ('weight', np.full(n, weight) if pimms.is_number(weight) else weight)]] if wgt is None: wgt = np.ones(len(ecc)) bad = np.logical_not(np.isfinite(np.prod([ang, ecc, wgt], axis=0))) ecc[bad] = 0 wgt[bad] = 0 if rad is not None: rad[bad] = 0 # do partial voluming correction if requested if partial_voluming_correction: wgt = wgt * (1 - cortex.partial_voluming_factor) # now trim and finalize bad = bad | (wgt <= weight_min) | (ecc < emin) | (ecc > emax) wgt[bad] = 0 ang[bad] = 0 ecc[bad] = 0 for x in [ang, ecc, wgt, rad]: if x is not None: x.setflags(write=False) # that's it! dat = dict(polar_angle=ang, eccentricity=ecc, weight=wgt) if rad is not None: dat['radius'] = rad return (pimms.itable(dat),)
[ "def", "calc_empirical_retinotopy", "(", "cortex", ",", "polar_angle", "=", "None", ",", "eccentricity", "=", "None", ",", "pRF_radius", "=", "None", ",", "weight", "=", "None", ",", "eccentricity_range", "=", "None", ",", "weight_min", "=", "0", ",", "inver...
calc_empirical_retinotopy computes the value empirical_retinotopy, which is an itable object storing the retinotopy data for the registration. Required afferent parameters: @ cortex Must be the cortex object that is to be registered to the model of retinotopy. Optional afferent parameters: @ polar_angle May be an array of polar angle values or a polar angle property name; if None (the default), attempts to auto-detect an empirical polar angle property. @ eccentricity May be an array of eccentricity values or an eccentricity property name; if None (the default), attempts to auto-detect an empirical eccentricity property. @ pRF_radius May be an array of receptive field radius values or the property name for such an array; if None (the default), attempts to auto-detect an empirical radius property. @ weight May be an array of weight values or a weight property name; if None (the default), attempts to auto-detect an empirical weight property, such as variance_explained. @ eccentricity_range May be a maximum eccentricity value or a (min, max) eccentricity range to be used in the registration; if None, then no clipping is done. @ weight_min May be given to indicate that weight values below this value should not be included in the registration; the default is 0. @ partial_voluming_correction May be set to True (default is False) to indicate that partial voluming correction should be used to adjust the weights. @ invert_rh_angle May be set to True (default is False) to indicate that the right hemisphere has its polar angle stored with opposite sign to the model polar angle. Efferent values: @ empirical_retinotopy Will be a pimms itable of the empirical retinotopy data to be used in the registration; the table's keys will be 'polar_angle', 'eccentricity', and 'weight'; values that should be excluded for any reason will have 0 weight and undefined angles.
[ "calc_empirical_retinotopy", "computes", "the", "value", "empirical_retinotopy", "which", "is", "an", "itable", "object", "storing", "the", "retinotopy", "data", "for", "the", "registration", "." ]
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/vision/retinotopy.py#L1051-L1117
train
This function calculates the value empirical_retinotopy for the given cortex object and returns it.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e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Z,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1720 - 1672) + chr(0b1101111) + chr(0b110010) + chr(0b11111 + 0o21) + '\066', 0o10), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1010101 + 0o32) + '\064' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(873 - 825) + chr(111) + chr(0b110011) + chr(1494 - 1446) + '\067', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b1 + 0o64) + chr(1777 - 1727), 20954 - 20946), nzTpIcepk0o8(chr(48) + '\157' + '\062' + '\066', 0b1000), nzTpIcepk0o8(chr(2032 - 1984) + chr(111) + '\063' + chr(2152 - 2103) + chr(0b11111 + 0o22), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(10613 - 10502) + chr(55), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(50) + '\066' + chr(0b101111 + 0o6), 0o10), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(111) + '\x31' + chr(1515 - 1464), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + '\x33' + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b0 + 0o157) + chr(0b110011) + chr(531 - 477) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b111110 + 0o61) + chr(0b10000 + 0o47) + chr(2194 - 2143), 53115 - 53107), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111 + 0o0) + chr(0b0 + 0o65), 31459 - 31451), nzTpIcepk0o8('\060' + chr(0b100100 + 0o113) + chr(0b10111 + 0o34) + chr(0b1 + 0o63) + chr(0b101010 + 0o6), 0b1000), nzTpIcepk0o8(chr(306 - 258) + '\x6f' + chr(53) + '\061', 55563 - 55555), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + '\063' + '\x31', 40406 - 40398), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001) + chr(0b110001) + chr(49), 0o10), nzTpIcepk0o8(chr(466 - 418) + '\x6f' + chr(0b11 + 0o57) + '\064' + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(0b110111) + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\060' + chr(12026 - 11915) + '\062' + chr(50) + chr(0b100110 + 0o17), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(50) + chr(0b110110) + '\x30', 0o10), nzTpIcepk0o8('\x30' + chr(0b1110 + 0o141) + chr(49) + chr(49) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + chr(867 - 813) + '\x32', 14670 - 14662), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010) + chr(0b101001 + 0o10) + chr(0b11001 + 0o31), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + chr(0b110010) + chr(54), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(53) + '\062', 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(51) + '\x34' + chr(0b1011 + 0o46), ord("\x08")), nzTpIcepk0o8('\060' + chr(10215 - 10104) + chr(0b101 + 0o62) + chr(52), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(49), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + chr(0b100000 + 0o20) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + chr(969 - 917) + chr(52), 0b1000), nzTpIcepk0o8('\x30' + chr(0b11010 + 0o125) + chr(0b110001) + chr(0b110110 + 0o0) + chr(51), 3817 - 3809), nzTpIcepk0o8('\060' + chr(0b1000110 + 0o51) + chr(51) + chr(0b10110 + 0o33) + '\066', 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\062' + chr(55) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(1365 - 1317) + chr(10541 - 10430) + '\062' + chr(0b100011 + 0o17) + chr(0b1000 + 0o52), 0o10), nzTpIcepk0o8(chr(1540 - 1492) + '\157' + chr(0b110011) + chr(49) + '\x32', 0o10), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(0b1101111) + chr(557 - 507) + chr(1293 - 1245) + chr(280 - 232), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(3526 - 3415) + chr(0b110001) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(888 - 840) + chr(0b1000000 + 0o57) + chr(1169 - 1118) + chr(0b110001), 8), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(8084 - 7973) + chr(0b100001 + 0o25) + '\x31', 53190 - 53182)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b1101110 + 0o1) + chr(0b110101) + '\060', 15386 - 15378)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xa8'), chr(0b1100100) + chr(5505 - 5404) + chr(6544 - 6445) + chr(111) + chr(0b1100100) + chr(0b100010 + 0o103))('\x75' + chr(0b1110100) + chr(3427 - 3325) + '\x2d' + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def GW7HTtexn1t2(i_tHHjQwY02v, ooKdxILblZqK=None, J0cNllQBMug7=None, qmG3MpnzJ4sd=None, iBxKYeMqq_Bt=None, rJrkFr9k00bC=None, Ln79tjAfkW3Z=nzTpIcepk0o8(chr(1100 - 1052) + '\157' + chr(416 - 368), 0o10), KRG2X5z4owz9=nzTpIcepk0o8('\060' + chr(0b100101 + 0o112) + chr(48), 8), SYQKh4x6Vvul=nzTpIcepk0o8(chr(48) + chr(0b1111 + 0o140) + chr(2171 - 2123), 8)): FfKOThdpoDTb = {} NoZxuO7wjArS = i_tHHjQwY02v.vertex_count (l_BmvR6sw04u, II5Q8m7HH78c) = (-nDF4gVNx0u9Q.fMNxX9dGa5H9, nDF4gVNx0u9Q.fMNxX9dGa5H9) if rJrkFr9k00bC is None else (nzTpIcepk0o8('\060' + chr(7491 - 7380) + chr(353 - 305), 8), rJrkFr9k00bC) if zAgo8354IlJ7.is_number(rJrkFr9k00bC) else rJrkFr9k00bC (Y54gViOryHfr, cRb7OGyXJeT1, wJpOqKauo9id, xmp6v1QmXZwR) = [nDF4gVNx0u9Q.Tn6rGr7XTM7t(Wsfg_Pu9yzqA(i_tHHjQwY02v, SLVB2BPA_mIe, S6EI_gyMl2nC, default=roI3spqORKae(ES5oEprVxulp(b'\xe3M\xb7Cd\xa0d\xd4g'), '\144' + '\145' + chr(8213 - 8114) + '\x6f' + chr(100) + '\x65')(chr(0b1110101) + '\x74' + chr(102) + chr(0b101101) + chr(1601 - 1545)))) for (SLVB2BPA_mIe, S6EI_gyMl2nC) in [(roI3spqORKae(ES5oEprVxulp(b'\xf6O\xabKd\x96f\xdbl3\x92'), '\x64' + '\x65' + chr(3905 - 3806) + chr(0b1101111) + '\144' + chr(3390 - 3289))('\165' + chr(116) + '\146' + chr(45) + chr(0b101011 + 0o15)), ooKdxILblZqK), (roI3spqORKae(ES5oEprVxulp(b'\xe3C\xa4Ox\xbdu\xdch6\x83B'), chr(7152 - 7052) + chr(101) + chr(99) + chr(0b10101 + 0o132) + chr(0b1100100) + '\145')(chr(117) + '\x74' + chr(0b111001 + 0o55) + '\x2d' + chr(2044 - 1988)), J0cNllQBMug7), (roI3spqORKae(ES5oEprVxulp(b'\xf4A\xa3Cc\xba'), chr(7467 - 7367) + chr(3099 - 2998) + chr(99) + '\x6f' + '\144' + '\x65')('\165' + chr(0b1110100) + chr(102) + '\x2d' + chr(0b111000)), qmG3MpnzJ4sd), (roI3spqORKae(ES5oEprVxulp(b'\xf1E\xaeM~\xbd'), chr(5474 - 5374) + chr(965 - 864) + chr(0b1100011) + chr(0b110 + 0o151) + chr(100) + chr(7783 - 7682))(chr(10472 - 10355) + chr(0b1110000 + 0o4) + chr(102) + chr(0b101101) + '\x38'), nDF4gVNx0u9Q.FQnMqH8X9LID(NoZxuO7wjArS, iBxKYeMqq_Bt) if zAgo8354IlJ7.is_number(iBxKYeMqq_Bt) else iBxKYeMqq_Bt)]] if xmp6v1QmXZwR is None: xmp6v1QmXZwR = nDF4gVNx0u9Q.rYPkZ8_2D0X1(ftfygxgFas5X(cRb7OGyXJeT1)) A2PkwDstJ70g = nDF4gVNx0u9Q.logical_not(nDF4gVNx0u9Q.AWxpWpGwxU15(nDF4gVNx0u9Q.prod([Y54gViOryHfr, cRb7OGyXJeT1, xmp6v1QmXZwR], axis=nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b1101111) + chr(0b110000), 8)))) cRb7OGyXJeT1[A2PkwDstJ70g] = nzTpIcepk0o8('\x30' + '\157' + chr(0b110000), 8) xmp6v1QmXZwR[A2PkwDstJ70g] = nzTpIcepk0o8('\x30' + '\157' + chr(0b100111 + 0o11), 8) if wJpOqKauo9id is not None: wJpOqKauo9id[A2PkwDstJ70g] = nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110000), 8) if SYQKh4x6Vvul: xmp6v1QmXZwR = xmp6v1QmXZwR * (nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b101100 + 0o5), 0b1000) - i_tHHjQwY02v.partial_voluming_factor) A2PkwDstJ70g = A2PkwDstJ70g | (xmp6v1QmXZwR <= Ln79tjAfkW3Z) | (cRb7OGyXJeT1 < l_BmvR6sw04u) | (cRb7OGyXJeT1 > II5Q8m7HH78c) xmp6v1QmXZwR[A2PkwDstJ70g] = nzTpIcepk0o8(chr(48) + chr(7691 - 7580) + '\x30', 8) Y54gViOryHfr[A2PkwDstJ70g] = nzTpIcepk0o8(chr(0b11001 + 0o27) + '\x6f' + chr(48), 8) cRb7OGyXJeT1[A2PkwDstJ70g] = nzTpIcepk0o8(chr(0b110000) + chr(111) + '\060', 8) for bI5jsQ9OkQtj in [Y54gViOryHfr, cRb7OGyXJeT1, xmp6v1QmXZwR, wJpOqKauo9id]: if bI5jsQ9OkQtj is not None: roI3spqORKae(bI5jsQ9OkQtj, roI3spqORKae(ES5oEprVxulp(b'\xf5E\xb3Lz\xa8`\xc6'), chr(0b1100100) + '\145' + chr(5962 - 5863) + chr(0b100011 + 0o114) + chr(0b1100100) + chr(0b1100101))(chr(117) + '\164' + chr(0b11 + 0o143) + chr(1870 - 1825) + '\x38'))(write=nzTpIcepk0o8('\x30' + chr(620 - 509) + chr(1979 - 1931), 8)) LMcCiF4czwpp = znjnJWK64FDT(polar_angle=Y54gViOryHfr, eccentricity=cRb7OGyXJeT1, weight=xmp6v1QmXZwR) if wJpOqKauo9id is not None: LMcCiF4czwpp[roI3spqORKae(ES5oEprVxulp(b'\xf4A\xa3Cc\xba'), chr(0b1100100) + '\145' + chr(0b1111 + 0o124) + '\157' + chr(8672 - 8572) + chr(5505 - 5404))(chr(117) + chr(1480 - 1364) + chr(7405 - 7303) + chr(147 - 102) + chr(0b111000))] = wJpOqKauo9id return (roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xefT\xa6Hz\xac'), chr(100) + '\x65' + chr(8504 - 8405) + '\x6f' + '\x64' + '\x65')('\x75' + chr(0b110 + 0o156) + chr(102) + chr(469 - 424) + chr(0b110111 + 0o1)))(LMcCiF4czwpp),)
noahbenson/neuropythy
neuropythy/vision/retinotopy.py
calc_model
def calc_model(cortex, model_argument, model_hemi=Ellipsis, radius=np.pi/3): ''' calc_model loads the appropriate model object given the model argument, which may given the name of the model or a model object itself. Required afferent parameters: @ model_argument Must be either a RegisteredRetinotopyModel object or the name of a model that can be loaded. Optional afferent parameters: @ model_hemi May be used to specify the hemisphere of the model; this is usually only used when the fsaverage_sym hemisphere is desired, in which case this should be set to None; if left at the default value (Ellipsis), then it will use the hemisphere of the cortex param. Provided efferent values: @ model Will be the RegisteredRetinotopyModel object to which the mesh should be registered. ''' if pimms.is_str(model_argument): h = cortex.chirality if model_hemi is Ellipsis else \ None if model_hemi is None else \ model_hemi model = retinotopy_model(model_argument, hemi=h, radius=radius) else: model = model_argument if not isinstance(model, RegisteredRetinotopyModel): raise ValueError('model must be a RegisteredRetinotopyModel') return model
python
def calc_model(cortex, model_argument, model_hemi=Ellipsis, radius=np.pi/3): ''' calc_model loads the appropriate model object given the model argument, which may given the name of the model or a model object itself. Required afferent parameters: @ model_argument Must be either a RegisteredRetinotopyModel object or the name of a model that can be loaded. Optional afferent parameters: @ model_hemi May be used to specify the hemisphere of the model; this is usually only used when the fsaverage_sym hemisphere is desired, in which case this should be set to None; if left at the default value (Ellipsis), then it will use the hemisphere of the cortex param. Provided efferent values: @ model Will be the RegisteredRetinotopyModel object to which the mesh should be registered. ''' if pimms.is_str(model_argument): h = cortex.chirality if model_hemi is Ellipsis else \ None if model_hemi is None else \ model_hemi model = retinotopy_model(model_argument, hemi=h, radius=radius) else: model = model_argument if not isinstance(model, RegisteredRetinotopyModel): raise ValueError('model must be a RegisteredRetinotopyModel') return model
[ "def", "calc_model", "(", "cortex", ",", "model_argument", ",", "model_hemi", "=", "Ellipsis", ",", "radius", "=", "np", ".", "pi", "/", "3", ")", ":", "if", "pimms", ".", "is_str", "(", "model_argument", ")", ":", "h", "=", "cortex", ".", "chirality",...
calc_model loads the appropriate model object given the model argument, which may given the name of the model or a model object itself. Required afferent parameters: @ model_argument Must be either a RegisteredRetinotopyModel object or the name of a model that can be loaded. Optional afferent parameters: @ model_hemi May be used to specify the hemisphere of the model; this is usually only used when the fsaverage_sym hemisphere is desired, in which case this should be set to None; if left at the default value (Ellipsis), then it will use the hemisphere of the cortex param. Provided efferent values: @ model Will be the RegisteredRetinotopyModel object to which the mesh should be registered.
[ "calc_model", "loads", "the", "appropriate", "model", "object", "given", "the", "model", "argument", "which", "may", "given", "the", "name", "of", "the", "model", "or", "a", "model", "object", "itself", "." ]
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/vision/retinotopy.py#L1119-L1145
train
calc_model loads the appropriate model object given the model argument.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsu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xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(111) + '\062' + '\x36' + chr(53), 55439 - 55431), nzTpIcepk0o8('\x30' + chr(111) + chr(52) + chr(0b110001), 5407 - 5399), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001) + chr(48) + chr(0b101 + 0o61), 62302 - 62294), nzTpIcepk0o8(chr(48) + chr(111) + '\x31' + '\x34' + '\062', 25655 - 25647), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b1101111) + chr(0b11010 + 0o27) + chr(0b110101) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(1777 - 1729) + chr(0b1101111) + chr(0b110101) + chr(0b110010), 46821 - 46813), nzTpIcepk0o8(chr(1971 - 1923) + chr(0b1011100 + 0o23) + chr(1499 - 1447) + chr(52), 0o10), nzTpIcepk0o8('\060' + '\157' + '\063' + chr(0b1010 + 0o46) + chr(2941 - 2886), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(1103 - 1053) + chr(0b110001) + '\067', 7004 - 6996), nzTpIcepk0o8(chr(48) + chr(1567 - 1456) + '\x31' + '\x36', 0o10), nzTpIcepk0o8('\x30' + chr(3954 - 3843) + chr(0b10000 + 0o41) + chr(0b110001 + 0o1) + '\066', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(787 - 737) + chr(52) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(1584 - 1536) + chr(6622 - 6511) + '\062' + chr(0b101110 + 0o7) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + chr(0b110101) + '\065', 48580 - 48572), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + chr(48) + chr(1001 - 948), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1011011 + 0o24) + chr(0b110010) + '\067' + '\061', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + '\061' + chr(55), 8), nzTpIcepk0o8('\x30' + chr(617 - 506) + '\062' + '\061' + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(2579 - 2528) + '\x33', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(49) + chr(2542 - 2491) + '\064', 0o10), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(111) + '\x31' + chr(51) + '\061', 60380 - 60372), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(134 - 84) + '\061' + '\063', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1000100 + 0o53) + chr(50) + chr(855 - 807) + chr(50), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b10 + 0o57) + '\060' + chr(1661 - 1611), 0o10), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(111) + chr(0b110001) + '\061' + chr(0b1010 + 0o47), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + '\x33' + chr(0b110011), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + chr(0b110001) + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\065', ord("\x08")), nzTpIcepk0o8(chr(115 - 67) + chr(0b11000 + 0o127) + chr(0b110001) + '\x31' + chr(0b110001), 8), nzTpIcepk0o8(chr(0b110000) + chr(1849 - 1738) + chr(214 - 164) + chr(1908 - 1859) + '\x33', 8), nzTpIcepk0o8('\x30' + chr(11462 - 11351) + chr(0b1011 + 0o47) + chr(0b11011 + 0o33) + chr(1999 - 1951), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(1185 - 1135) + chr(50) + chr(49), 0b1000), nzTpIcepk0o8(chr(1812 - 1764) + '\157' + chr(0b110001) + '\064' + chr(48), 58865 - 58857), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + chr(0b101011 + 0o11) + chr(52), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + chr(50) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\061' + chr(49) + chr(54), 8), nzTpIcepk0o8(chr(0b11111 + 0o21) + '\x6f' + chr(0b11100 + 0o27) + chr(0b110000) + '\x35', 31721 - 31713), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + '\x37' + chr(49), 0b1000), nzTpIcepk0o8('\x30' + chr(0b10110 + 0o131) + chr(49) + chr(0b110001) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\061' + chr(52) + '\x32', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10110 + 0o37) + chr(748 - 700), 53646 - 53638)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x9b'), '\144' + chr(101) + chr(9726 - 9627) + '\x6f' + chr(9076 - 8976) + '\145')('\x75' + '\x74' + '\146' + chr(45) + chr(1550 - 1494)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def G0PadCeSviIw(i_tHHjQwY02v, q_zTIob4gIo2, R8QlNEoai_6G=RjQP07DYIdkf, qGhcQMWNyIbI=roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xdbl4:\x04xT\x93\xde7\x19\xcd'), chr(763 - 663) + chr(7146 - 7045) + '\143' + chr(0b1101100 + 0o3) + chr(0b1100100) + '\x65')(chr(0b1110101) + '\164' + '\146' + chr(45) + '\x38')) / nzTpIcepk0o8('\x30' + chr(0b1101000 + 0o7) + chr(0b110011), 0o10)): if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xdcR\x19\x11\x1bX'), '\x64' + chr(1767 - 1666) + '\143' + chr(0b110 + 0o151) + '\144' + chr(9224 - 9123))('\x75' + chr(0b1110100) + '\x66' + chr(45) + '\x38'))(q_zTIob4gIo2): _9ve2uheHd6a = i_tHHjQwY02v.chirality if R8QlNEoai_6G is RjQP07DYIdkf else None if R8QlNEoai_6G is None else R8QlNEoai_6G KW0sEfjlgNpM = e_0pGsIB40a0(q_zTIob4gIo2, hemi=_9ve2uheHd6a, radius=qGhcQMWNyIbI) else: KW0sEfjlgNpM = q_zTIob4gIo2 if not suIjIS24Zkqw(KW0sEfjlgNpM, IgXw5fcVvr0A): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xd8N"\x07\x03\nI\xb2\xfczv\xc0\xc9\xcd$\x99\xdd\xec|5*\xff\xe70,\xff\x1c`=\xe2\xde\xfe\x14\x8b\xe37\x88\x96/\x07\xd9'), '\x64' + chr(0b1100101) + chr(7597 - 7498) + chr(12305 - 12194) + '\144' + chr(0b1100101))('\165' + chr(0b1110100) + '\146' + chr(997 - 952) + chr(0b111000))) return KW0sEfjlgNpM
noahbenson/neuropythy
neuropythy/vision/retinotopy.py
calc_initial_state
def calc_initial_state(cortex, model, empirical_retinotopy, resample=Ellipsis, prior=None): ''' calc_initial_state is a calculator that prepares the initial state of the registration process. The initial state consists of a flattened 2D mesh ('native_map') that has been made from the initial cortex, and a 'registration_map', on which registration is to be performed. The former of these two meshes will always share vertex labels with the cortex argument, and the latter mesh this mesh may be identical to the native mesh or may be a resampled version of it. Optional afferent parameters: @ resample May specify that the registration_map should be resampled to the 'fsaverage' or the 'fsaverage_sym' map; the advantage of this is that the resampling prevents angles already distorted by inflation, registration, and flattening from being sufficiently small to dominate the registration initially. The default value is Ellipsis, which specifies that the 'fsaverage' or 'fsaverage_sym' resampling should be applied if the model is registered to either of those, and otherwise no resampling should be applied. @ prior May specify an alternate registration to which the native mesh should be projected prior to flattening and registration. The default value, None, indicates that the model's default registration should just be used. Generally models will be registered to either the fsaverage or fsaverage_sym atlases; if your fsaverage subject has a geometry file matching the pattern ?h.*.sphere.reg, such as lh.retinotopy.sphere.reg, you can use that file as a registration (with registration/prior name 'retinotopy') in place of the fsaverage's native lh.sphere from which to start the overall retinotopy registration. Provided efferent values: @ native_mesh Will be the 3D mesh registered to the model's required registration space. @ preregistration_mesh Will be the 3D mesh that is ready to be used in registration; this may be identical to native_mesh if there is no resampling. @ preregistration_map Will be the 2D flattened mesh for use in registration; this mesh is a flattened version of preregistration_mesh. ''' model_reg = model.map_projection.registration model_reg = 'native' if model_reg is None else model_reg model_chirality = None if model_reg == 'fsaverage_sym' else model.map_projection.chirality ch = 'lh' if model_chirality is None else model_chirality if model_chirality is not None and cortex.chirality != model_chirality: raise ValueError('Inverse-chirality hemisphere cannot be registered to model') # make sure we are registered to the model space if model_reg not in cortex.registrations: raise ValueError('given Cortex is not registered to the model registration: %s' % model_reg) # give this registration the correct data native_mesh = cortex.registrations[model_reg].with_prop(empirical_retinotopy) preregmesh = native_mesh # will become the preregistration mesh below # see about the prior if prior is not None: try: mdl_ctx = getattr(nyfs.subject(model_reg), ch) nativ = mdl_ctx.registrations['native'] prior = mdl_ctx.registrations[prior] except Exception: raise ValueError('Could not find given prior %s' % prior) addr = nativ.address(native_mesh) preregmesh = native_mesh.copy(coordinates=prior.unaddress(addr)) # and now, resampling... if resample is Ellipsis: resample = model_reg if model_reg == 'fsaverage' or model_reg == 'fsaverage_sym' else None if resample is not None and resample is not False: # make a map from the appropriate hemisphere... preregmesh = getattr(nyfs.subject(resample), ch).registrations['native'] # resample properties over... preregmesh = preregmesh.with_prop(native_mesh.interpolate(preregmesh.coordinates, 'all')) # make the map projection now... preregmap = model.map_projection(preregmesh) return {'native_mesh': native_mesh, 'preregistration_mesh': preregmesh, 'preregistration_map': preregmap}
python
def calc_initial_state(cortex, model, empirical_retinotopy, resample=Ellipsis, prior=None): ''' calc_initial_state is a calculator that prepares the initial state of the registration process. The initial state consists of a flattened 2D mesh ('native_map') that has been made from the initial cortex, and a 'registration_map', on which registration is to be performed. The former of these two meshes will always share vertex labels with the cortex argument, and the latter mesh this mesh may be identical to the native mesh or may be a resampled version of it. Optional afferent parameters: @ resample May specify that the registration_map should be resampled to the 'fsaverage' or the 'fsaverage_sym' map; the advantage of this is that the resampling prevents angles already distorted by inflation, registration, and flattening from being sufficiently small to dominate the registration initially. The default value is Ellipsis, which specifies that the 'fsaverage' or 'fsaverage_sym' resampling should be applied if the model is registered to either of those, and otherwise no resampling should be applied. @ prior May specify an alternate registration to which the native mesh should be projected prior to flattening and registration. The default value, None, indicates that the model's default registration should just be used. Generally models will be registered to either the fsaverage or fsaverage_sym atlases; if your fsaverage subject has a geometry file matching the pattern ?h.*.sphere.reg, such as lh.retinotopy.sphere.reg, you can use that file as a registration (with registration/prior name 'retinotopy') in place of the fsaverage's native lh.sphere from which to start the overall retinotopy registration. Provided efferent values: @ native_mesh Will be the 3D mesh registered to the model's required registration space. @ preregistration_mesh Will be the 3D mesh that is ready to be used in registration; this may be identical to native_mesh if there is no resampling. @ preregistration_map Will be the 2D flattened mesh for use in registration; this mesh is a flattened version of preregistration_mesh. ''' model_reg = model.map_projection.registration model_reg = 'native' if model_reg is None else model_reg model_chirality = None if model_reg == 'fsaverage_sym' else model.map_projection.chirality ch = 'lh' if model_chirality is None else model_chirality if model_chirality is not None and cortex.chirality != model_chirality: raise ValueError('Inverse-chirality hemisphere cannot be registered to model') # make sure we are registered to the model space if model_reg not in cortex.registrations: raise ValueError('given Cortex is not registered to the model registration: %s' % model_reg) # give this registration the correct data native_mesh = cortex.registrations[model_reg].with_prop(empirical_retinotopy) preregmesh = native_mesh # will become the preregistration mesh below # see about the prior if prior is not None: try: mdl_ctx = getattr(nyfs.subject(model_reg), ch) nativ = mdl_ctx.registrations['native'] prior = mdl_ctx.registrations[prior] except Exception: raise ValueError('Could not find given prior %s' % prior) addr = nativ.address(native_mesh) preregmesh = native_mesh.copy(coordinates=prior.unaddress(addr)) # and now, resampling... if resample is Ellipsis: resample = model_reg if model_reg == 'fsaverage' or model_reg == 'fsaverage_sym' else None if resample is not None and resample is not False: # make a map from the appropriate hemisphere... preregmesh = getattr(nyfs.subject(resample), ch).registrations['native'] # resample properties over... preregmesh = preregmesh.with_prop(native_mesh.interpolate(preregmesh.coordinates, 'all')) # make the map projection now... preregmap = model.map_projection(preregmesh) return {'native_mesh': native_mesh, 'preregistration_mesh': preregmesh, 'preregistration_map': preregmap}
[ "def", "calc_initial_state", "(", "cortex", ",", "model", ",", "empirical_retinotopy", ",", "resample", "=", "Ellipsis", ",", "prior", "=", "None", ")", ":", "model_reg", "=", "model", ".", "map_projection", ".", "registration", "model_reg", "=", "'native'", "...
calc_initial_state is a calculator that prepares the initial state of the registration process. The initial state consists of a flattened 2D mesh ('native_map') that has been made from the initial cortex, and a 'registration_map', on which registration is to be performed. The former of these two meshes will always share vertex labels with the cortex argument, and the latter mesh this mesh may be identical to the native mesh or may be a resampled version of it. Optional afferent parameters: @ resample May specify that the registration_map should be resampled to the 'fsaverage' or the 'fsaverage_sym' map; the advantage of this is that the resampling prevents angles already distorted by inflation, registration, and flattening from being sufficiently small to dominate the registration initially. The default value is Ellipsis, which specifies that the 'fsaverage' or 'fsaverage_sym' resampling should be applied if the model is registered to either of those, and otherwise no resampling should be applied. @ prior May specify an alternate registration to which the native mesh should be projected prior to flattening and registration. The default value, None, indicates that the model's default registration should just be used. Generally models will be registered to either the fsaverage or fsaverage_sym atlases; if your fsaverage subject has a geometry file matching the pattern ?h.*.sphere.reg, such as lh.retinotopy.sphere.reg, you can use that file as a registration (with registration/prior name 'retinotopy') in place of the fsaverage's native lh.sphere from which to start the overall retinotopy registration. Provided efferent values: @ native_mesh Will be the 3D mesh registered to the model's required registration space. @ preregistration_mesh Will be the 3D mesh that is ready to be used in registration; this may be identical to native_mesh if there is no resampling. @ preregistration_map Will be the 2D flattened mesh for use in registration; this mesh is a flattened version of preregistration_mesh.
[ "calc_initial_state", "is", "a", "calculator", "that", "prepares", "the", "initial", "state", "of", "the", "registration", "process", ".", "The", "initial", "state", "consists", "of", "a", "flattened", "2D", "mesh", "(", "native_map", ")", "that", "has", "been...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/vision/retinotopy.py#L1147-L1210
train
This function prepares the initial state of the registration process.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1S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9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(51 - 3) + chr(0b1101111) + '\x32' + chr(0b11011 + 0o33) + '\066', 0b1000), nzTpIcepk0o8(chr(1991 - 1943) + '\x6f' + chr(0b110001) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(1240 - 1192) + chr(8503 - 8392) + chr(0b110001) + '\066' + '\066', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + chr(891 - 836) + chr(1993 - 1940), 0b1000), nzTpIcepk0o8(chr(2013 - 1965) + chr(2470 - 2359) + chr(0b101110 + 0o3) + chr(0b10000 + 0o40) + '\067', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1297 - 1248) + chr(1379 - 1327) + chr(2349 - 2298), 0o10), nzTpIcepk0o8('\x30' + chr(0b1011110 + 0o21) + chr(981 - 927) + chr(1847 - 1794), 0o10), nzTpIcepk0o8(chr(543 - 495) + chr(0b1101111) + chr(0b111 + 0o54) + chr(428 - 373), ord("\x08")), nzTpIcepk0o8(chr(1995 - 1947) + chr(8060 - 7949) + '\063' + '\064' + '\064', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + '\x30' + chr(0b110011 + 0o3), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + chr(0b110011) + chr(1944 - 1891), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1712 - 1660) + '\063', 0b1000), nzTpIcepk0o8('\x30' + chr(0b111000 + 0o67) + chr(0b110011) + '\x37', 8), nzTpIcepk0o8(chr(1792 - 1744) + chr(111) + chr(50) + chr(0b110100) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(2192 - 2144) + chr(0b1101111) + '\x32' + chr(0b100111 + 0o13) + '\060', 24647 - 24639), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + chr(0b110101), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(50) + '\064' + chr(0b11010 + 0o27), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(2740 - 2629) + chr(1367 - 1316) + chr(0b110111) + '\060', 50780 - 50772), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b1101111 + 0o0) + '\x35' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(111) + chr(0b110011) + chr(50) + '\065', 24921 - 24913), nzTpIcepk0o8('\060' + '\x6f' + '\063' + chr(51) + chr(0b110100), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\061' + chr(368 - 316) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b1110 + 0o42) + '\x6f' + '\x34' + chr(815 - 766), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\067' + '\066', 0b1000), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(2268 - 2157) + chr(0b101111 + 0o4) + '\x33' + chr(54), 50673 - 50665), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b0 + 0o61) + '\x33' + '\x34', 65225 - 65217), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + '\x35' + '\066', 0b1000), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(111) + '\065' + chr(554 - 499), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\x33' + chr(51) + chr(1727 - 1679), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b101010 + 0o7) + '\061' + chr(411 - 363), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1010010 + 0o35) + chr(0b101000 + 0o13) + '\x36' + '\064', ord("\x08")), nzTpIcepk0o8(chr(108 - 60) + '\157' + chr(51) + chr(0b11011 + 0o33) + '\062', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + '\x33' + chr(0b110000), 8), nzTpIcepk0o8(chr(1889 - 1841) + chr(0b1100110 + 0o11) + '\062' + chr(576 - 523) + chr(1507 - 1459), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110110 + 0o1) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b1101111) + chr(0b11111 + 0o23) + chr(0b110111) + '\060', 18937 - 18929), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + '\x30' + '\062', 0b1000), nzTpIcepk0o8(chr(1794 - 1746) + chr(0b101111 + 0o100) + chr(0b11010 + 0o34) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + chr(0b100111 + 0o15) + chr(0b110000 + 0o6), 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b1101010 + 0o5) + chr(0b11101 + 0o25) + '\x31', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b1001100 + 0o43) + chr(53) + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x98'), '\144' + chr(101) + chr(99) + chr(111) + '\x64' + '\145')(chr(0b1011100 + 0o31) + chr(116) + chr(0b1100010 + 0o4) + chr(1106 - 1061) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def hZtYkJBvHKbz(i_tHHjQwY02v, KW0sEfjlgNpM, ZPIEmcKOnGQj, Rb9nsjAdIneG=RjQP07DYIdkf, kQ4qX8I6GVGJ=None): dUm8CkMizQ6e = KW0sEfjlgNpM.map_projection.DLbBU9_iMFpN dUm8CkMizQ6e = roI3spqORKae(ES5oEprVxulp(b'\xd8m\x02\x141\x06'), '\x64' + chr(0b1100101) + chr(0b11 + 0o140) + '\x6f' + '\x64' + chr(101))('\x75' + '\164' + '\x66' + chr(0b100101 + 0o10) + chr(864 - 808)) if dUm8CkMizQ6e is None else dUm8CkMizQ6e qrqh7hBExvCX = None if dUm8CkMizQ6e == roI3spqORKae(ES5oEprVxulp(b'\xd0\x7f\x17\x0b"\x11Tx\x81\x19\xeeZr'), '\x64' + chr(0b1100000 + 0o5) + chr(0b10010 + 0o121) + '\157' + '\144' + '\145')(chr(0b1110101) + chr(12806 - 12690) + '\146' + chr(0b11 + 0o52) + chr(0b10110 + 0o42)) else KW0sEfjlgNpM.map_projection.chirality uTB8aC1qrW__ = roI3spqORKae(ES5oEprVxulp(b'\xdad'), chr(100) + chr(2471 - 2370) + '\x63' + chr(0b100000 + 0o117) + '\x64' + '\145')('\x75' + chr(116) + '\x66' + '\x2d' + chr(56)) if qrqh7hBExvCX is None else qrqh7hBExvCX if qrqh7hBExvCX is not None and roI3spqORKae(i_tHHjQwY02v, roI3spqORKae(ES5oEprVxulp(b'\xd5d\x1f\x0f&\x0f\\k\x9d'), chr(9041 - 8941) + '\x65' + chr(0b1100011) + '\157' + chr(4008 - 3908) + chr(0b1010110 + 0o17))('\x75' + chr(3159 - 3043) + chr(0b101000 + 0o76) + '\x2d' + chr(56))) != qrqh7hBExvCX: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xffb\x00\x185\x10P2\x87.\xf4Q~\xcb\xf9a\xd8\xd8B\xb0\xb1\tRN\xb69\x1cJ\xf8+\x95\x9c\xb6\xc7H\x98\xa0S\xc6c\xd3k\x1f\x0e3\x06Gz\x80f\xe9L?\xca\xffq\xc4\x94'), chr(0b1100100) + chr(101) + '\143' + chr(0b1000111 + 0o50) + chr(0b1100100) + '\x65')(chr(0b1011 + 0o152) + chr(4351 - 4235) + chr(2213 - 2111) + '\x2d' + chr(0b110100 + 0o4))) if dUm8CkMizQ6e not in roI3spqORKae(i_tHHjQwY02v, roI3spqORKae(ES5oEprVxulp(b'\xc4i\x11\x144\x17G~\x90/\xf2Ml'), chr(0b1000001 + 0o43) + chr(0b1100000 + 0o5) + chr(0b1100011) + '\157' + chr(0b11011 + 0o111) + '\145')('\165' + chr(2608 - 2492) + chr(102) + chr(173 - 128) + '\x38')): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xd1e\x00\x18)Cvp\x962\xf8[?\xce\xe35\xcf\x97^\xf5\xae\x05FW\xad(\x0b]\xbd,\xd4\x86\xb7\x88H\xd0\xa7\x16\x8b~\xd2i\x1a]5\x06Rv\x972\xefBk\xce\xff{\x9b\xd8\x0f\xa6'), chr(0b1100100) + '\145' + chr(0b1100011) + chr(8309 - 8198) + '\x64' + '\145')(chr(117) + chr(116) + '\x66' + '\055' + chr(0b1111 + 0o51)) % dUm8CkMizQ6e) fmeJRzLnC4A3 = i_tHHjQwY02v.registrations[dUm8CkMizQ6e].with_prop(ZPIEmcKOnGQj) ApxCS6MI4wVM = fmeJRzLnC4A3 if kQ4qX8I6GVGJ is not None: try: s7ktgaUnSNSe = roI3spqORKae(UPYDQKfXDmro.NybBYFIJq0hU(dUm8CkMizQ6e), uTB8aC1qrW__) B7a4YikW8tTO = s7ktgaUnSNSe.registrations[roI3spqORKae(ES5oEprVxulp(b'\xd8m\x02\x141\x06'), '\x64' + '\x65' + '\x63' + chr(7166 - 7055) + chr(0b110101 + 0o57) + chr(5055 - 4954))(chr(0b1110101) + chr(116) + chr(0b1011100 + 0o12) + '\055' + chr(0b11011 + 0o35))] kQ4qX8I6GVGJ = s7ktgaUnSNSe.registrations[kQ4qX8I6GVGJ] except zfo2Sgkz3IVJ: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xf5c\x03\x11#C[p\x90f\xfbJq\xc3\xb0r\xc8\x8eO\xbb\xfc\x10SW\xb1.N\n\xab'), chr(100) + chr(0b1100101) + chr(99) + chr(2641 - 2530) + '\x64' + '\145')(chr(0b1110101) + chr(0b1110100) + '\146' + chr(45) + chr(1312 - 1256)) % kQ4qX8I6GVGJ) _m0lLs6iTLa5 = B7a4YikW8tTO.en8jF5h3sD4W(fmeJRzLnC4A3) ApxCS6MI4wVM = fmeJRzLnC4A3.copy(coordinates=kQ4qX8I6GVGJ.unaddress(_m0lLs6iTLa5)) if Rb9nsjAdIneG is RjQP07DYIdkf: Rb9nsjAdIneG = dUm8CkMizQ6e if dUm8CkMizQ6e == roI3spqORKae(ES5oEprVxulp(b'\xd0\x7f\x17\x0b"\x11Tx\x81'), chr(0b1100100) + chr(0b1100101) + '\143' + '\x6f' + chr(7382 - 7282) + chr(101))('\165' + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + chr(56)) or dUm8CkMizQ6e == roI3spqORKae(ES5oEprVxulp(b'\xd0\x7f\x17\x0b"\x11Tx\x81\x19\xeeZr'), '\144' + chr(0b1100101) + chr(0b1100011) + '\157' + '\x64' + chr(0b1100101))('\x75' + chr(3956 - 3840) + '\146' + chr(0b101101) + chr(0b111000)) else None if Rb9nsjAdIneG is not None and Rb9nsjAdIneG is not nzTpIcepk0o8('\060' + '\157' + chr(1967 - 1919), 0o10): ApxCS6MI4wVM = roI3spqORKae(UPYDQKfXDmro.subject(Rb9nsjAdIneG), uTB8aC1qrW__).registrations[roI3spqORKae(ES5oEprVxulp(b'\xd8m\x02\x141\x06'), chr(0b11001 + 0o113) + chr(0b1100101) + chr(99) + '\157' + chr(0b10100 + 0o120) + chr(0b1100101))(chr(0b1110101) + '\164' + chr(102) + chr(1304 - 1259) + chr(572 - 516))] ApxCS6MI4wVM = ApxCS6MI4wVM.with_prop(fmeJRzLnC4A3.wo2_AaefnPDo(ApxCS6MI4wVM.r2wzacEY8Lls, roI3spqORKae(ES5oEprVxulp(b'\xd7`\x1a'), '\144' + chr(0b1000011 + 0o42) + chr(99) + '\x6f' + chr(0b1100100) + '\145')(chr(6934 - 6817) + chr(0b1011000 + 0o34) + '\x66' + '\x2d' + chr(2657 - 2601)))) GLF99vtm_AB9 = KW0sEfjlgNpM.map_projection(ApxCS6MI4wVM) return {roI3spqORKae(ES5oEprVxulp(b'\xd8m\x02\x141\x06jr\x815\xf5'), chr(100) + '\145' + chr(0b1100011) + '\157' + chr(0b1001000 + 0o34) + '\x65')('\165' + '\164' + chr(0b1110 + 0o130) + chr(0b100001 + 0o14) + chr(56)): fmeJRzLnC4A3, roI3spqORKae(ES5oEprVxulp(b'\xc6~\x13\x0f"\x04\\l\x904\xfcWv\xc8\xfeJ\xcc\x9dY\xbd'), chr(0b1100100) + chr(9606 - 9505) + chr(0b1100011) + chr(111) + '\x64' + '\x65')(chr(2487 - 2370) + chr(5311 - 5195) + chr(102) + chr(45) + chr(0b100010 + 0o26)): ApxCS6MI4wVM, roI3spqORKae(ES5oEprVxulp(b'\xc6~\x13\x0f"\x04\\l\x904\xfcWv\xc8\xfeJ\xcc\x99Z'), chr(100) + '\x65' + chr(0b100110 + 0o75) + chr(6482 - 6371) + chr(3292 - 3192) + '\x65')('\165' + chr(0b100010 + 0o122) + '\x66' + '\x2d' + chr(2153 - 2097)): GLF99vtm_AB9}
noahbenson/neuropythy
neuropythy/vision/retinotopy.py
calc_anchors
def calc_anchors(preregistration_map, model, model_hemi, scale=1, sigma=Ellipsis, radius_weight=0, field_sign_weight=0, invert_rh_field_sign=False): ''' calc_anchors is a calculator that creates a set of anchor instructions for a registration. Required afferent parameters: @ invert_rh_field_sign May be set to True (default is False) to indicate that the right hemisphere's field signs will be incorrect relative to the model; this generally should be used whenever invert_rh_angle is also set to True. ''' wgts = preregistration_map.prop('weight') rads = preregistration_map.prop('radius') if np.isclose(radius_weight, 0): radius_weight = 0 ancs = retinotopy_anchors(preregistration_map, model, polar_angle='polar_angle', eccentricity='eccentricity', radius='radius', weight=wgts, weight_min=0, # taken care of already radius_weight=radius_weight, field_sign_weight=field_sign_weight, scale=scale, invert_field_sign=(model_hemi == 'rh' and invert_rh_field_sign), **({} if sigma is Ellipsis else {'sigma':sigma})) return ancs
python
def calc_anchors(preregistration_map, model, model_hemi, scale=1, sigma=Ellipsis, radius_weight=0, field_sign_weight=0, invert_rh_field_sign=False): ''' calc_anchors is a calculator that creates a set of anchor instructions for a registration. Required afferent parameters: @ invert_rh_field_sign May be set to True (default is False) to indicate that the right hemisphere's field signs will be incorrect relative to the model; this generally should be used whenever invert_rh_angle is also set to True. ''' wgts = preregistration_map.prop('weight') rads = preregistration_map.prop('radius') if np.isclose(radius_weight, 0): radius_weight = 0 ancs = retinotopy_anchors(preregistration_map, model, polar_angle='polar_angle', eccentricity='eccentricity', radius='radius', weight=wgts, weight_min=0, # taken care of already radius_weight=radius_weight, field_sign_weight=field_sign_weight, scale=scale, invert_field_sign=(model_hemi == 'rh' and invert_rh_field_sign), **({} if sigma is Ellipsis else {'sigma':sigma})) return ancs
[ "def", "calc_anchors", "(", "preregistration_map", ",", "model", ",", "model_hemi", ",", "scale", "=", "1", ",", "sigma", "=", "Ellipsis", ",", "radius_weight", "=", "0", ",", "field_sign_weight", "=", "0", ",", "invert_rh_field_sign", "=", "False", ")", ":"...
calc_anchors is a calculator that creates a set of anchor instructions for a registration. Required afferent parameters: @ invert_rh_field_sign May be set to True (default is False) to indicate that the right hemisphere's field signs will be incorrect relative to the model; this generally should be used whenever invert_rh_angle is also set to True.
[ "calc_anchors", "is", "a", "calculator", "that", "creates", "a", "set", "of", "anchor", "instructions", "for", "a", "registration", "." ]
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/vision/retinotopy.py#L1212-L1236
train
calc_anchors is a calculator that creates a set of anchor instructions for a registration.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7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ZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(0b1010101 + 0o32) + chr(0b110101) + chr(0b100111 + 0o15), 29515 - 29507), nzTpIcepk0o8('\060' + '\x6f' + chr(0b1100 + 0o51) + chr(1384 - 1332), 8), nzTpIcepk0o8('\060' + chr(0b1111 + 0o140) + '\x33' + chr(0b101000 + 0o13), 0o10), nzTpIcepk0o8(chr(1277 - 1229) + chr(0b1101111) + chr(0b110001) + '\065', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(6149 - 6038) + chr(0b110011) + chr(0b1111 + 0o45) + '\063', ord("\x08")), nzTpIcepk0o8(chr(1947 - 1899) + chr(10323 - 10212) + chr(50) + chr(0b110001), 41365 - 41357), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + chr(1279 - 1225) + chr(917 - 865), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(537 - 486) + chr(0b110 + 0o60) + chr(0b11000 + 0o30), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(48) + '\x35', 0b1000), nzTpIcepk0o8(chr(731 - 683) + chr(0b1101000 + 0o7) + chr(537 - 487) + '\065' + '\062', ord("\x08")), nzTpIcepk0o8('\x30' + chr(6410 - 6299) + '\064' + chr(51), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(886 - 837) + chr(0b110010) + chr(2196 - 2141), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001 + 0o0) + chr(0b10000 + 0o40) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(0b1011 + 0o144) + chr(49) + chr(2192 - 2139) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b11011 + 0o124) + chr(51) + chr(0b100010 + 0o22) + chr(54), 0o10), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(3602 - 3491) + '\061' + chr(55) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + chr(0b110101) + '\x31', 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b1100 + 0o47) + chr(0b1101 + 0o44) + '\x31', 0b1000), nzTpIcepk0o8(chr(0b10 + 0o56) + '\157' + chr(0b110001) + chr(665 - 613) + chr(48), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b10100 + 0o37) + chr(52) + chr(0b101111 + 0o2), 24504 - 24496), nzTpIcepk0o8('\x30' + chr(111) + '\061' + chr(0b100110 + 0o14), 0b1000), nzTpIcepk0o8('\x30' + chr(0b101001 + 0o106) + '\x31' + chr(0b110001) + chr(1863 - 1810), ord("\x08")), nzTpIcepk0o8(chr(1614 - 1566) + '\x6f' + '\x31' + chr(0b110 + 0o52) + chr(1331 - 1282), 62345 - 62337), nzTpIcepk0o8('\x30' + chr(0b111011 + 0o64) + '\063' + chr(0b100 + 0o54) + chr(0b10010 + 0o42), 15664 - 15656), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b11111 + 0o24) + chr(0b110100) + '\x35', 15425 - 15417), nzTpIcepk0o8(chr(1219 - 1171) + chr(0b1101111) + chr(777 - 728) + '\x30' + '\063', 0b1000), nzTpIcepk0o8('\060' + chr(0b11 + 0o154) + chr(73 - 19) + chr(0b110011 + 0o1), 47596 - 47588), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1465 - 1415) + chr(0b110010), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110000 + 0o2) + chr(0b10110 + 0o33) + chr(227 - 173), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + chr(1224 - 1172) + chr(0b100001 + 0o23), 0o10), nzTpIcepk0o8(chr(310 - 262) + chr(0b1101111) + '\x31' + '\062' + chr(49), 0o10), nzTpIcepk0o8(chr(147 - 99) + '\157' + chr(0b100000 + 0o23) + chr(0b110100) + chr(48), 7160 - 7152), nzTpIcepk0o8(chr(1081 - 1033) + '\x6f' + '\x33' + chr(1191 - 1140) + chr(0b100110 + 0o21), 25238 - 25230), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(2042 - 1931) + chr(0b110011) + chr(548 - 493) + '\x33', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110111), 28135 - 28127), nzTpIcepk0o8(chr(671 - 623) + '\157' + '\063' + '\060' + chr(48), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1110 + 0o141) + chr(0b1111 + 0o43) + chr(55) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b11 + 0o60) + '\x33' + '\061', 0b1000), nzTpIcepk0o8(chr(48) + chr(7219 - 7108) + '\062' + '\061' + '\x32', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + chr(54) + chr(53), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b11 + 0o55) + '\157' + chr(53) + chr(1711 - 1663), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x02'), chr(5222 - 5122) + chr(101) + chr(0b1011 + 0o130) + '\157' + '\144' + '\x65')(chr(1337 - 1220) + chr(0b1000 + 0o154) + chr(0b1100110) + chr(0b101101) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def m8jIIYnm_wr0(v2K3rGmg1Akm, KW0sEfjlgNpM, R8QlNEoai_6G, r4zeu1khcH7g=nzTpIcepk0o8('\060' + chr(5816 - 5705) + '\x31', 0o10), uc4gGmjAvJP3=RjQP07DYIdkf, iUYivoiUtGhn=nzTpIcepk0o8(chr(0b110000) + chr(0b100 + 0o153) + chr(2293 - 2245), 0o10), yeLIHjdeJh9t=nzTpIcepk0o8(chr(48) + chr(12126 - 12015) + '\060', 8), KasRFAbVbW37=nzTpIcepk0o8('\060' + '\157' + '\x30', 8)): iNbrzwIbS6qX = v2K3rGmg1Akm.prop(roI3spqORKae(ES5oEprVxulp(b'[Irj\x8be'), chr(100) + chr(0b11101 + 0o110) + chr(0b1100011) + chr(0b11110 + 0o121) + chr(0b10000 + 0o124) + chr(0b1100101))(chr(117) + '\x74' + chr(0b111111 + 0o47) + '\x2d' + '\070')) H5SQth9HBWC7 = v2K3rGmg1Akm.prop(roI3spqORKae(ES5oEprVxulp(b'^M\x7fd\x96b'), chr(0b1100100) + chr(101) + chr(99) + chr(0b1101111) + '\144' + chr(101))(chr(0b1110101) + '\164' + '\146' + '\x2d' + chr(0b111000))) if roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\x7f~LN\xbc^\x12\xa5t\xc7o\x1f'), '\x64' + '\145' + '\x63' + '\x6f' + '\144' + chr(8364 - 8263))('\x75' + chr(0b1100001 + 0o23) + '\x66' + chr(0b11000 + 0o25) + chr(1203 - 1147)))(iUYivoiUtGhn, nzTpIcepk0o8(chr(48) + '\x6f' + '\x30', 8)): iUYivoiUtGhn = nzTpIcepk0o8('\x30' + '\x6f' + chr(0b1011 + 0o45), 8) YQ2yYxR6Kc9A = bEebcqmA0lAw(v2K3rGmg1Akm, KW0sEfjlgNpM, polar_angle=roI3spqORKae(ES5oEprVxulp(b'\\Cwl\x91N\x15\x9e"\xc6F'), '\144' + '\145' + '\143' + '\x6f' + chr(0b1010100 + 0o20) + '\x65')(chr(117) + chr(0b1100101 + 0o17) + chr(0b111101 + 0o51) + chr(1161 - 1116) + chr(56)), eccentricity=roI3spqORKae(ES5oEprVxulp(b'IOxh\x8de\x06\x99&\xc3W.'), chr(100) + chr(101) + '\143' + '\x6f' + chr(100) + '\145')(chr(0b1110101) + chr(0b1110100) + chr(102) + chr(1335 - 1290) + chr(0b11100 + 0o34)), radius=roI3spqORKae(ES5oEprVxulp(b'^M\x7fd\x96b'), chr(100) + chr(4575 - 4474) + '\x63' + '\157' + '\x64' + '\x65')(chr(0b111100 + 0o71) + '\x74' + '\x66' + chr(1116 - 1071) + chr(56)), weight=iNbrzwIbS6qX, weight_min=nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b11100 + 0o24), 8), radius_weight=iUYivoiUtGhn, field_sign_weight=yeLIHjdeJh9t, scale=r4zeu1khcH7g, invert_field_sign=R8QlNEoai_6G == roI3spqORKae(ES5oEprVxulp(b'^D'), chr(0b1011101 + 0o7) + chr(0b1100101) + '\x63' + chr(0b110100 + 0o73) + chr(0b1100100) + chr(3162 - 3061))(chr(7639 - 7522) + chr(0b1110100) + chr(0b1100110) + chr(45) + '\070') and KasRFAbVbW37, **{} if uc4gGmjAvJP3 is RjQP07DYIdkf else {roI3spqORKae(ES5oEprVxulp(b'_E|`\x82'), '\144' + chr(101) + chr(0b1100011) + chr(12259 - 12148) + chr(100) + '\x65')(chr(0b100010 + 0o123) + chr(0b111000 + 0o74) + chr(0b1100110) + '\x2d' + chr(2703 - 2647)): uc4gGmjAvJP3}) return YQ2yYxR6Kc9A
noahbenson/neuropythy
neuropythy/vision/retinotopy.py
calc_registration
def calc_registration(preregistration_map, anchors, max_steps=2000, max_step_size=0.05, method='random'): ''' calc_registration is a calculator that creates the registration coordinates. ''' # if max steps is a tuple (max, stride) then a trajectory is saved into # the registered_map meta-data pmap = preregistration_map if is_tuple(max_steps) or is_list(max_steps): (max_steps, stride) = max_steps traj = [preregistration_map.coordinates] x = preregistration_map.coordinates for s in np.arange(0, max_steps, stride): x = mesh_register( preregistration_map, [['edge', 'harmonic', 'scale', 1.0], ['angle', 'infinite-well', 'scale', 1.0], ['perimeter', 'harmonic'], anchors], initial_coordinates=x, method=method, max_steps=stride, max_step_size=max_step_size) traj.append(x) pmap = pmap.with_meta(trajectory=np.asarray(traj)) else: x = mesh_register( preregistration_map, [['edge', 'harmonic', 'scale', 1.0], ['angle', 'infinite-well', 'scale', 1.0], ['perimeter', 'harmonic'], anchors], method=method, max_steps=max_steps, max_step_size=max_step_size) return pmap.copy(coordinates=x)
python
def calc_registration(preregistration_map, anchors, max_steps=2000, max_step_size=0.05, method='random'): ''' calc_registration is a calculator that creates the registration coordinates. ''' # if max steps is a tuple (max, stride) then a trajectory is saved into # the registered_map meta-data pmap = preregistration_map if is_tuple(max_steps) or is_list(max_steps): (max_steps, stride) = max_steps traj = [preregistration_map.coordinates] x = preregistration_map.coordinates for s in np.arange(0, max_steps, stride): x = mesh_register( preregistration_map, [['edge', 'harmonic', 'scale', 1.0], ['angle', 'infinite-well', 'scale', 1.0], ['perimeter', 'harmonic'], anchors], initial_coordinates=x, method=method, max_steps=stride, max_step_size=max_step_size) traj.append(x) pmap = pmap.with_meta(trajectory=np.asarray(traj)) else: x = mesh_register( preregistration_map, [['edge', 'harmonic', 'scale', 1.0], ['angle', 'infinite-well', 'scale', 1.0], ['perimeter', 'harmonic'], anchors], method=method, max_steps=max_steps, max_step_size=max_step_size) return pmap.copy(coordinates=x)
[ "def", "calc_registration", "(", "preregistration_map", ",", "anchors", ",", "max_steps", "=", "2000", ",", "max_step_size", "=", "0.05", ",", "method", "=", "'random'", ")", ":", "# if max steps is a tuple (max, stride) then a trajectory is saved into", "# the registered_m...
calc_registration is a calculator that creates the registration coordinates.
[ "calc_registration", "is", "a", "calculator", "that", "creates", "the", "registration", "coordinates", "." ]
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/vision/retinotopy.py#L1239-L1274
train
calc_registration is a calculator that creates the registration coordinates.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2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okenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + '\157' + chr(751 - 702) + chr(2333 - 2283) + chr(50), 50010 - 50002), nzTpIcepk0o8(chr(0b110000) + chr(6748 - 6637) + chr(54) + chr(49), 35136 - 35128), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1831 - 1781) + '\063' + chr(661 - 612), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + chr(0b110001) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(0b11101 + 0o122) + chr(0b11100 + 0o24), 0o10), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\x6f' + '\061' + '\x33' + chr(53), 0b1000), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(0b111011 + 0o64) + '\x31' + chr(678 - 626) + chr(0b1001 + 0o52), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b100110 + 0o13) + chr(0b101100 + 0o11), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + chr(1742 - 1693) + chr(295 - 240), 61249 - 61241), nzTpIcepk0o8(chr(48) + '\157' + chr(0b10010 + 0o37) + chr(0b110110) + chr(0b110101), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110101) + chr(51), 31271 - 31263), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + chr(0b1010 + 0o51) + chr(0b110001), 8), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + '\x30', 14348 - 14340), nzTpIcepk0o8('\x30' + '\157' + chr(2180 - 2129) + chr(0b100001 + 0o17) + '\x34', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b11101 + 0o24) + '\060' + chr(0b110100 + 0o3), 15943 - 15935), nzTpIcepk0o8('\060' + '\157' + chr(0b110101) + chr(153 - 100), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + '\067' + chr(0b110010), 49848 - 49840), nzTpIcepk0o8(chr(48) + chr(111) + chr(51) + chr(2293 - 2242) + chr(463 - 414), 0b1000), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(0b1101111) + chr(0b110010) + chr(54), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b1001 + 0o50) + chr(55), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(50) + '\064' + '\062', 18950 - 18942), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + chr(0b111 + 0o53) + chr(1926 - 1876), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b100000 + 0o25) + '\066', 40529 - 40521), nzTpIcepk0o8(chr(0b10 + 0o56) + '\157' + chr(0b100101 + 0o15) + '\x31' + chr(0b1101 + 0o44), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + chr(566 - 512) + '\065', 45891 - 45883), nzTpIcepk0o8('\060' + chr(1280 - 1169) + '\062' + chr(49), 0o10), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(9433 - 9322) + '\x32' + '\x36', 8), nzTpIcepk0o8(chr(0b110000) + chr(6905 - 6794) + chr(1246 - 1196) + chr(0b110001) + chr(51), 6139 - 6131), nzTpIcepk0o8(chr(844 - 796) + '\157' + chr(0b110010) + chr(1948 - 1893) + '\x31', 0o10), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\157' + chr(51) + chr(545 - 493) + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b100101 + 0o112) + '\x32' + chr(0b110001) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(1718 - 1670) + chr(0b1101111) + '\x31' + chr(0b110011) + chr(0b10110 + 0o35), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + '\061' + '\x35', 231 - 223), nzTpIcepk0o8('\060' + chr(10532 - 10421) + chr(0b101100 + 0o6) + chr(53), 0b1000), nzTpIcepk0o8(chr(361 - 313) + chr(0b1101111) + '\x31' + '\x31' + '\061', 0b1000), nzTpIcepk0o8('\060' + chr(0b1000100 + 0o53) + chr(50) + chr(0b10011 + 0o37) + '\060', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + chr(51) + chr(51), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + '\063' + chr(49), 0o10), nzTpIcepk0o8(chr(48) + chr(6960 - 6849) + chr(1741 - 1692) + '\x31' + chr(2730 - 2675), 0b1000), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(111) + chr(0b110100) + chr(1541 - 1492), 45229 - 45221)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\157' + '\x35' + '\060', 9598 - 9590)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'|'), chr(0b10001 + 0o123) + '\x65' + chr(0b1010101 + 0o16) + chr(8237 - 8126) + chr(7095 - 6995) + chr(0b1100101))(chr(117) + chr(116) + chr(8219 - 8117) + '\x2d' + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def L2Ca3Od_oh5a(v2K3rGmg1Akm, YqsLRZUv46fu, F8LaVTjDyKEP=nzTpIcepk0o8(chr(48) + chr(7562 - 7451) + chr(51) + chr(0b110111) + chr(50) + chr(0b110000), 13558 - 13550), nKaEsZFj5AKq=0.05, e5rcHW8hR5dL=roI3spqORKae(ES5oEprVxulp(b' P\xf7\xaeo0'), '\x64' + '\145' + '\x63' + chr(11651 - 11540) + chr(100) + chr(0b100101 + 0o100))(chr(0b111110 + 0o67) + '\x74' + '\146' + chr(45) + chr(0b111000))): EoEJo3svA73j = v2K3rGmg1Akm if kBeKB4Df6Zrm(F8LaVTjDyKEP) or ckw3KzAL3kba(F8LaVTjDyKEP): (F8LaVTjDyKEP, k56XXbUTVXhD) = F8LaVTjDyKEP K2_k76fE7zBl = [v2K3rGmg1Akm.r2wzacEY8Lls] bI5jsQ9OkQtj = v2K3rGmg1Akm.r2wzacEY8Lls for PmE5_h409JAA in roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'1Y\xf4\x83_\x1a.X\x90\x06n\xf0'), chr(9443 - 9343) + chr(7639 - 7538) + '\x63' + chr(0b1101111) + '\144' + '\x65')(chr(0b1110101) + '\x74' + chr(0b110010 + 0o64) + '\x2d' + '\070'))(nzTpIcepk0o8('\060' + '\x6f' + chr(48), 8), F8LaVTjDyKEP, k56XXbUTVXhD): bI5jsQ9OkQtj = B0v4gLza9l3C(v2K3rGmg1Akm, [[roI3spqORKae(ES5oEprVxulp(b'7U\xfe\xaf'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(5789 - 5678) + chr(5787 - 5687) + '\x65')(chr(0b1110 + 0o147) + chr(11674 - 11558) + chr(102) + chr(45) + '\070'), roI3spqORKae(ES5oEprVxulp(b':P\xeb\xa7o3\nn'), chr(0b1100100) + chr(101) + chr(3860 - 3761) + '\x6f' + chr(0b101101 + 0o67) + chr(5414 - 5313))(chr(2885 - 2768) + chr(12306 - 12190) + chr(8895 - 8793) + chr(45) + '\070'), roI3spqORKae(ES5oEprVxulp(b'!R\xf8\xa6e'), chr(0b1100100) + chr(101) + chr(0b10000 + 0o123) + chr(155 - 44) + chr(100) + chr(101))(chr(0b1110101) + chr(116) + chr(0b110001 + 0o65) + chr(0b101101) + chr(56)), 1.0], [roI3spqORKae(ES5oEprVxulp(b'3_\xfe\xa6e'), chr(100) + chr(0b1100101) + chr(427 - 328) + chr(6183 - 6072) + chr(0b1100100) + '\x65')(chr(117) + chr(116) + chr(102) + '\x2d' + '\x38'), roI3spqORKae(ES5oEprVxulp(b';_\xff\xa3n4\x17h\xe2\x02N\xf5d'), chr(0b1 + 0o143) + chr(2849 - 2748) + chr(3530 - 3431) + '\x6f' + chr(100) + chr(2265 - 2164))('\165' + chr(10494 - 10378) + '\x66' + chr(45) + chr(581 - 525)), roI3spqORKae(ES5oEprVxulp(b'!R\xf8\xa6e'), chr(0b101010 + 0o72) + chr(0b1001100 + 0o31) + '\143' + chr(0b1100011 + 0o14) + chr(0b1100100) + chr(8244 - 8143))(chr(0b1110101) + chr(4335 - 4219) + chr(0b1100110) + chr(45) + chr(2652 - 2596)), 1.0], [roI3spqORKae(ES5oEprVxulp(b'"T\xeb\xa3m8\x17h\xbd'), '\x64' + chr(2079 - 1978) + chr(99) + chr(111) + chr(0b1100100) + chr(101))(chr(2762 - 2645) + '\164' + '\146' + chr(464 - 419) + chr(2079 - 2023)), roI3spqORKae(ES5oEprVxulp(b':P\xeb\xa7o3\nn'), '\x64' + chr(7411 - 7310) + chr(0b1001011 + 0o30) + '\157' + chr(2298 - 2198) + chr(0b1100101))('\165' + '\164' + chr(0b111010 + 0o54) + '\055' + '\070')], YqsLRZUv46fu], initial_coordinates=bI5jsQ9OkQtj, method=e5rcHW8hR5dL, max_steps=k56XXbUTVXhD, max_step_size=nKaEsZFj5AKq) roI3spqORKae(K2_k76fE7zBl, roI3spqORKae(ES5oEprVxulp(b'\x1ae\xca\xfex:$b\xa5\x1a~\xac'), chr(0b1100100) + chr(0b110001 + 0o64) + chr(99) + chr(4270 - 4159) + chr(0b101000 + 0o74) + '\145')('\165' + chr(0b1110100) + chr(10395 - 10293) + chr(0b101101) + '\070'))(bI5jsQ9OkQtj) EoEJo3svA73j = EoEJo3svA73j.with_meta(trajectory=nDF4gVNx0u9Q.asarray(K2_k76fE7zBl)) else: bI5jsQ9OkQtj = B0v4gLza9l3C(v2K3rGmg1Akm, [[roI3spqORKae(ES5oEprVxulp(b'7U\xfe\xaf'), '\144' + chr(5188 - 5087) + '\143' + '\157' + chr(0b1100100) + chr(7485 - 7384))('\x75' + '\164' + chr(102) + chr(45) + '\x38'), roI3spqORKae(ES5oEprVxulp(b':P\xeb\xa7o3\nn'), chr(0b1000010 + 0o42) + chr(904 - 803) + chr(0b1100011) + chr(111) + chr(7050 - 6950) + '\145')('\165' + chr(0b1110100) + '\x66' + '\x2d' + chr(0b101000 + 0o20)), roI3spqORKae(ES5oEprVxulp(b'!R\xf8\xa6e'), chr(0b1100100) + chr(0b110010 + 0o63) + '\143' + chr(1851 - 1740) + chr(4221 - 4121) + '\x65')('\x75' + chr(3039 - 2923) + chr(992 - 890) + chr(0b1010 + 0o43) + '\070'), 1.0], [roI3spqORKae(ES5oEprVxulp(b'3_\xfe\xa6e'), chr(0b1100100) + chr(2673 - 2572) + '\x63' + '\x6f' + '\144' + '\x65')('\165' + '\164' + chr(0b111011 + 0o53) + chr(279 - 234) + '\x38'), roI3spqORKae(ES5oEprVxulp(b';_\xff\xa3n4\x17h\xe2\x02N\xf5d'), chr(0b1100100) + chr(0b1100101) + chr(99) + '\x6f' + chr(0b10 + 0o142) + '\x65')(chr(2625 - 2508) + chr(0b1110100) + '\146' + '\x2d' + chr(0b11 + 0o65)), roI3spqORKae(ES5oEprVxulp(b'!R\xf8\xa6e'), chr(0b1011010 + 0o12) + '\x65' + '\143' + chr(0b1101111) + '\x64' + '\x65')('\165' + '\164' + chr(5202 - 5100) + '\055' + '\x38'), 1.0], [roI3spqORKae(ES5oEprVxulp(b'"T\xeb\xa3m8\x17h\xbd'), chr(0b1100100) + '\145' + chr(4681 - 4582) + chr(0b11000 + 0o127) + chr(0b1010110 + 0o16) + '\x65')(chr(0b101010 + 0o113) + '\164' + '\146' + chr(0b101101) + '\070'), roI3spqORKae(ES5oEprVxulp(b':P\xeb\xa7o3\nn'), chr(100) + '\x65' + chr(0b1011100 + 0o7) + '\x6f' + '\x64' + chr(914 - 813))(chr(117) + chr(116) + chr(4024 - 3922) + chr(0b111 + 0o46) + '\x38')], YqsLRZUv46fu], method=e5rcHW8hR5dL, max_steps=F8LaVTjDyKEP, max_step_size=nKaEsZFj5AKq) return roI3spqORKae(EoEJo3svA73j, roI3spqORKae(ES5oEprVxulp(b'1^\xe9\xb3'), chr(0b1100100) + chr(101) + '\x63' + '\x6f' + chr(0b111100 + 0o50) + chr(0b1100101))(chr(117) + '\164' + '\x66' + '\055' + '\070'))(coordinates=bI5jsQ9OkQtj)
noahbenson/neuropythy
neuropythy/vision/retinotopy.py
calc_prediction
def calc_prediction(registered_map, preregistration_mesh, native_mesh, model): ''' calc_registration_prediction is a pimms calculator that creates the both the prediction and the registration_prediction, both of which are pimms itables including the fields 'polar_angle', 'eccentricity', and 'visual_area'. The registration_prediction data describe the vertices for the registered_map, not necessarily of the native_mesh, while the prediction describes the native mesh. Provided efferent values: @ registered_mesh Will be a mesh object that is equivalent to the preregistration_mesh but with the coordinates and predicted fields (from the registration) filled in. Note that this mesh is still in the resampled configuration is resampling was performed. @ registration_prediction Will be a pimms ITable object with columns 'polar_angle', 'eccentricity', and 'visual_area'. For values outside of the model region, visual_area will be 0 and other values will be undefined (but are typically 0). The registration_prediction describes the values on the registrered_mesh. @ prediction will be a pimms ITable object with columns 'polar_angle', 'eccentricity', and 'visual_area'. For values outside of the model region, visual_area will be 0 and other values will be undefined (but are typically 0). The prediction describes the values on the native_mesh and the predicted_mesh. ''' # invert the map projection to make the registration map into a mesh coords3d = np.array(preregistration_mesh.coordinates) idcs = registered_map.labels coords3d[:,idcs] = registered_map.meta('projection').inverse(registered_map.coordinates) rmesh = preregistration_mesh.copy(coordinates=coords3d) # go ahead and get the model predictions... d = model.cortex_to_angle(registered_map.coordinates) id2n = model.area_id_to_name (ang, ecc) = d[0:2] lbl = np.asarray(d[2], dtype=np.int) rad = np.asarray([predict_pRF_radius(e, id2n[l]) if l > 0 else 0 for (e,l) in zip(ecc,lbl)]) d = {'polar_angle':ang, 'eccentricity':ecc, 'visual_area':lbl, 'radius':rad} # okay, put these on the mesh rpred = {} for (k,v) in six.iteritems(d): v.setflags(write=False) tmp = np.zeros(rmesh.vertex_count, dtype=v.dtype) tmp[registered_map.labels] = v tmp.setflags(write=False) rpred[k] = tmp rpred = pyr.pmap(rpred) rmesh = rmesh.with_prop(rpred) # next, do all of this for the native mesh.. if native_mesh is preregistration_mesh: pred = rpred pmesh = rmesh else: # we need to address the native coordinates in the prereg coordinates then unaddress them # in the registered coordinates; this will let us make a native-registered-map and repeat # the exercise above addr = preregistration_mesh.address(native_mesh.coordinates) natreg_mesh = native_mesh.copy(coordinates=rmesh.unaddress(addr)) d = model.cortex_to_angle(natreg_mesh) (ang,ecc) = d[0:2] lbl = np.asarray(d[2], dtype=np.int) rad = np.asarray([predict_pRF_radius(e, id2n[l]) if l > 0 else 0 for (e,l) in zip(ecc,lbl)]) pred = pyr.m(polar_angle=ang, eccentricity=ecc, radius=rad, visual_area=lbl) pmesh = natreg_mesh.with_prop(pred) return {'registered_mesh' : rmesh, 'registration_prediction': rpred, 'prediction' : pred, 'predicted_mesh' : pmesh}
python
def calc_prediction(registered_map, preregistration_mesh, native_mesh, model): ''' calc_registration_prediction is a pimms calculator that creates the both the prediction and the registration_prediction, both of which are pimms itables including the fields 'polar_angle', 'eccentricity', and 'visual_area'. The registration_prediction data describe the vertices for the registered_map, not necessarily of the native_mesh, while the prediction describes the native mesh. Provided efferent values: @ registered_mesh Will be a mesh object that is equivalent to the preregistration_mesh but with the coordinates and predicted fields (from the registration) filled in. Note that this mesh is still in the resampled configuration is resampling was performed. @ registration_prediction Will be a pimms ITable object with columns 'polar_angle', 'eccentricity', and 'visual_area'. For values outside of the model region, visual_area will be 0 and other values will be undefined (but are typically 0). The registration_prediction describes the values on the registrered_mesh. @ prediction will be a pimms ITable object with columns 'polar_angle', 'eccentricity', and 'visual_area'. For values outside of the model region, visual_area will be 0 and other values will be undefined (but are typically 0). The prediction describes the values on the native_mesh and the predicted_mesh. ''' # invert the map projection to make the registration map into a mesh coords3d = np.array(preregistration_mesh.coordinates) idcs = registered_map.labels coords3d[:,idcs] = registered_map.meta('projection').inverse(registered_map.coordinates) rmesh = preregistration_mesh.copy(coordinates=coords3d) # go ahead and get the model predictions... d = model.cortex_to_angle(registered_map.coordinates) id2n = model.area_id_to_name (ang, ecc) = d[0:2] lbl = np.asarray(d[2], dtype=np.int) rad = np.asarray([predict_pRF_radius(e, id2n[l]) if l > 0 else 0 for (e,l) in zip(ecc,lbl)]) d = {'polar_angle':ang, 'eccentricity':ecc, 'visual_area':lbl, 'radius':rad} # okay, put these on the mesh rpred = {} for (k,v) in six.iteritems(d): v.setflags(write=False) tmp = np.zeros(rmesh.vertex_count, dtype=v.dtype) tmp[registered_map.labels] = v tmp.setflags(write=False) rpred[k] = tmp rpred = pyr.pmap(rpred) rmesh = rmesh.with_prop(rpred) # next, do all of this for the native mesh.. if native_mesh is preregistration_mesh: pred = rpred pmesh = rmesh else: # we need to address the native coordinates in the prereg coordinates then unaddress them # in the registered coordinates; this will let us make a native-registered-map and repeat # the exercise above addr = preregistration_mesh.address(native_mesh.coordinates) natreg_mesh = native_mesh.copy(coordinates=rmesh.unaddress(addr)) d = model.cortex_to_angle(natreg_mesh) (ang,ecc) = d[0:2] lbl = np.asarray(d[2], dtype=np.int) rad = np.asarray([predict_pRF_radius(e, id2n[l]) if l > 0 else 0 for (e,l) in zip(ecc,lbl)]) pred = pyr.m(polar_angle=ang, eccentricity=ecc, radius=rad, visual_area=lbl) pmesh = natreg_mesh.with_prop(pred) return {'registered_mesh' : rmesh, 'registration_prediction': rpred, 'prediction' : pred, 'predicted_mesh' : pmesh}
[ "def", "calc_prediction", "(", "registered_map", ",", "preregistration_mesh", ",", "native_mesh", ",", "model", ")", ":", "# invert the map projection to make the registration map into a mesh", "coords3d", "=", "np", ".", "array", "(", "preregistration_mesh", ".", "coordina...
calc_registration_prediction is a pimms calculator that creates the both the prediction and the registration_prediction, both of which are pimms itables including the fields 'polar_angle', 'eccentricity', and 'visual_area'. The registration_prediction data describe the vertices for the registered_map, not necessarily of the native_mesh, while the prediction describes the native mesh. Provided efferent values: @ registered_mesh Will be a mesh object that is equivalent to the preregistration_mesh but with the coordinates and predicted fields (from the registration) filled in. Note that this mesh is still in the resampled configuration is resampling was performed. @ registration_prediction Will be a pimms ITable object with columns 'polar_angle', 'eccentricity', and 'visual_area'. For values outside of the model region, visual_area will be 0 and other values will be undefined (but are typically 0). The registration_prediction describes the values on the registrered_mesh. @ prediction will be a pimms ITable object with columns 'polar_angle', 'eccentricity', and 'visual_area'. For values outside of the model region, visual_area will be 0 and other values will be undefined (but are typically 0). The prediction describes the values on the native_mesh and the predicted_mesh.
[ "calc_registration_prediction", "is", "a", "pimms", "calculator", "that", "creates", "the", "both", "the", "prediction", "and", "the", "registration_prediction", "both", "of", "which", "are", "pimms", "itables", "including", "the", "fields", "polar_angle", "eccentrici...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/vision/retinotopy.py#L1276-L1338
train
Calculate the prediction for a given registration map.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazV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nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(111) + chr(0b11001 + 0o32) + chr(51) + chr(1043 - 990), 14968 - 14960), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + '\063' + '\x35', 8), nzTpIcepk0o8(chr(87 - 39) + chr(0b110011 + 0o74) + chr(0b110011) + '\062' + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b100101 + 0o13) + '\x6f' + chr(0b1 + 0o64) + chr(1887 - 1835), 0b1000), nzTpIcepk0o8(chr(624 - 576) + '\157' + chr(51) + chr(1349 - 1294), 48880 - 48872), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11100 + 0o26) + chr(48) + chr(0b11110 + 0o25), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b100 + 0o56) + chr(1443 - 1391) + chr(0b110000), 63888 - 63880), nzTpIcepk0o8(chr(1215 - 1167) + chr(111) + chr(404 - 354) + '\x30' + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\x6f' + '\x33' + '\x31' + chr(49), 49786 - 49778), nzTpIcepk0o8(chr(0b101111 + 0o1) + '\x6f' + '\061' + '\x34' + '\060', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b11101 + 0o24) + chr(0b100101 + 0o17) + chr(0b10001 + 0o45), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b10101 + 0o132) + chr(0b100111 + 0o12) + chr(2461 - 2411) + '\x35', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + chr(0b11101 + 0o27) + '\060', 8), nzTpIcepk0o8(chr(48) + chr(0b1010010 + 0o35) + '\063' + chr(1078 - 1025) + '\063', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + '\x37' + chr(1263 - 1212), 2412 - 2404), nzTpIcepk0o8('\060' + chr(5015 - 4904) + chr(405 - 354) + chr(51) + chr(49), 0b1000), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b1 + 0o156) + '\061' + chr(0b10100 + 0o40) + '\064', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b10011 + 0o40) + chr(49) + '\063', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b11111 + 0o120) + '\x31' + chr(0b11011 + 0o31) + chr(0b11000 + 0o35), 41917 - 41909), nzTpIcepk0o8(chr(2070 - 2022) + chr(0b101110 + 0o101) + chr(0b110011) + chr(0b110110) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(6786 - 6675) + chr(0b100110 + 0o14) + chr(427 - 373) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\062' + '\063' + '\060', 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b101111 + 0o6) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(1086 - 1038) + chr(2470 - 2359) + chr(0b100010 + 0o20) + chr(0b110001) + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(6675 - 6564) + chr(0b11 + 0o57) + chr(53) + '\x36', 0o10), nzTpIcepk0o8(chr(610 - 562) + chr(111) + chr(0b110010) + '\x32' + chr(849 - 794), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\061' + chr(48), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + chr(1101 - 1051) + '\x32', 43074 - 43066), nzTpIcepk0o8(chr(1158 - 1110) + chr(0b110011 + 0o74) + '\x32' + chr(54), 0o10), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b111010 + 0o65) + '\x31' + chr(0b101100 + 0o7) + chr(0b10111 + 0o34), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\x34' + chr(714 - 665), 63433 - 63425), nzTpIcepk0o8(chr(784 - 736) + chr(111) + chr(0b0 + 0o62) + chr(626 - 571) + chr(0b101001 + 0o7), 0b1000), nzTpIcepk0o8('\060' + chr(0b11111 + 0o120) + '\061' + chr(337 - 289) + chr(0b11011 + 0o31), 51379 - 51371), nzTpIcepk0o8('\x30' + chr(0b11011 + 0o124) + chr(0b110010) + chr(2330 - 2280) + '\x34', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + chr(0b110011) + '\066', 0b1000), nzTpIcepk0o8(chr(1920 - 1872) + chr(11198 - 11087) + chr(2434 - 2384) + chr(0b110110) + '\063', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + '\066' + chr(0b10010 + 0o43), 15389 - 15381), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11110 + 0o25) + chr(0b11011 + 0o31) + chr(0b11000 + 0o30), 63756 - 63748), nzTpIcepk0o8('\x30' + chr(0b1101101 + 0o2) + chr(50) + chr(0b110010), 44653 - 44645), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1101111) + '\x34' + chr(0b110010), 60456 - 60448)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b1010000 + 0o37) + chr(1058 - 1005) + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xf3'), chr(0b1100010 + 0o2) + '\145' + chr(0b1100011) + '\x6f' + chr(0b1100100) + chr(0b1100101))('\x75' + chr(0b11100 + 0o130) + chr(3150 - 3048) + chr(1477 - 1432) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def zPDkZIc7_Fxq(h_Fk9oIu0juy, IdFeewLArTwu, fmeJRzLnC4A3, KW0sEfjlgNpM): OUN3zrNigIQu = nDF4gVNx0u9Q.Tn6rGr7XTM7t(IdFeewLArTwu.r2wzacEY8Lls) oWFalk9jWbpc = h_Fk9oIu0juy.Ar0km3TBAurm OUN3zrNigIQu[:, oWFalk9jWbpc] = h_Fk9oIu0juy.meta(roI3spqORKae(ES5oEprVxulp(b'\xad\xaf\xb9Fz\xe0\xd4\xe8\xa6\x0e'), chr(0b11111 + 0o105) + '\x65' + chr(99) + chr(111) + chr(0b1000010 + 0o42) + chr(2131 - 2030))(chr(7602 - 7485) + '\164' + chr(102) + chr(0b1101 + 0o40) + '\x38')).inverse(h_Fk9oIu0juy.r2wzacEY8Lls) Q4yaBcfQnMfZ = IdFeewLArTwu.copy(coordinates=OUN3zrNigIQu) vPPlOXQgR3SM = KW0sEfjlgNpM.cortex_to_angle(h_Fk9oIu0juy.r2wzacEY8Lls) ZehFxnvcnMu1 = KW0sEfjlgNpM.area_id_to_name (Y54gViOryHfr, cRb7OGyXJeT1) = vPPlOXQgR3SM[nzTpIcepk0o8(chr(1396 - 1348) + chr(0b1101001 + 0o6) + chr(48), 0b1000):nzTpIcepk0o8('\x30' + '\157' + chr(898 - 848), ord("\x08"))] aYHSBMjZouVV = nDF4gVNx0u9Q.asarray(vPPlOXQgR3SM[nzTpIcepk0o8(chr(429 - 381) + '\157' + chr(0b110010), 8)], dtype=nDF4gVNx0u9Q.nzTpIcepk0o8) wJpOqKauo9id = nDF4gVNx0u9Q.asarray([AH_IuH1RaXuz(wgf0sgcu_xPL, ZehFxnvcnMu1[fPrVrKACaFCC]) if fPrVrKACaFCC > nzTpIcepk0o8(chr(0b110000) + '\157' + chr(48), 8) else nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(48), 8) for (wgf0sgcu_xPL, fPrVrKACaFCC) in TxMFWa_Xzviv(cRb7OGyXJeT1, aYHSBMjZouVV)]) vPPlOXQgR3SM = {roI3spqORKae(ES5oEprVxulp(b'\xad\xb2\xbaMm\xdc\xc1\xef\xae\x0c\x03'), chr(0b1100100) + '\145' + chr(0b1100011) + chr(111) + '\144' + '\145')('\165' + '\x74' + chr(102) + '\x2d' + chr(2283 - 2227)): Y54gViOryHfr, roI3spqORKae(ES5oEprVxulp(b'\xb8\xbe\xb5Iq\xf7\xd2\xe8\xaa\t\x12,'), '\x64' + chr(0b1100101) + '\x63' + '\x6f' + chr(4234 - 4134) + chr(101))(chr(0b1110101) + chr(7027 - 6911) + '\146' + '\055' + chr(56)): cRb7OGyXJeT1, roI3spqORKae(ES5oEprVxulp(b'\xab\xb4\xa5Y~\xef\xff\xe0\xbb\x05\x07'), chr(0b1100100) + chr(101) + chr(0b1100011) + chr(0b1000 + 0o147) + '\x64' + '\x65')(chr(117) + '\164' + chr(102) + chr(0b101101) + '\x38'): aYHSBMjZouVV, roI3spqORKae(ES5oEprVxulp(b'\xaf\xbc\xb2Ej\xf0'), '\x64' + chr(3650 - 3549) + chr(8302 - 8203) + '\x6f' + chr(0b1100100) + '\145')(chr(8222 - 8105) + '\164' + chr(6764 - 6662) + chr(1114 - 1069) + chr(0b101 + 0o63)): wJpOqKauo9id} XZTzK6kfgvJu = {} for (B6UAF1zReOyJ, r7AA1pbLjb44) in roI3spqORKae(YVS_F7_wWn_o, roI3spqORKae(ES5oEprVxulp(b'\xa9\xbe\x85Gu\xe0\xd2\xcd\xa2\x13\rd'), chr(0b1100100) + '\145' + '\143' + chr(0b1101111) + chr(100) + chr(0b1000110 + 0o37))(chr(0b1110101) + chr(0b101010 + 0o112) + chr(9296 - 9194) + '\x2d' + chr(0b111000)))(vPPlOXQgR3SM): roI3spqORKae(r7AA1pbLjb44, roI3spqORKae(ES5oEprVxulp(b'\xae\xb8\xa2Js\xe2\xc7\xf2'), '\144' + '\145' + chr(5444 - 5345) + chr(8769 - 8658) + chr(8922 - 8822) + chr(0b1100101))('\x75' + '\164' + chr(0b1100110) + '\055' + chr(0b111000)))(write=nzTpIcepk0o8('\x30' + chr(111) + '\060', 8)) PT32xG247TS3 = nDF4gVNx0u9Q.UmwwEp7MzR6q(Q4yaBcfQnMfZ.vertex_count, dtype=r7AA1pbLjb44.RcX9bbuOzh5L) PT32xG247TS3[h_Fk9oIu0juy.Ar0km3TBAurm] = r7AA1pbLjb44 roI3spqORKae(PT32xG247TS3, roI3spqORKae(ES5oEprVxulp(b'\xae\xb8\xa2Js\xe2\xc7\xf2'), '\144' + chr(8672 - 8571) + chr(99) + chr(0b1101111) + chr(100) + '\x65')('\x75' + '\164' + chr(0b1100110) + chr(45) + chr(56)))(write=nzTpIcepk0o8(chr(439 - 391) + chr(0b1101111) + chr(0b11 + 0o55), 8)) XZTzK6kfgvJu[B6UAF1zReOyJ] = PT32xG247TS3 XZTzK6kfgvJu = hFt7yOCw4gV2.pmap(XZTzK6kfgvJu) Q4yaBcfQnMfZ = Q4yaBcfQnMfZ.with_prop(XZTzK6kfgvJu) if fmeJRzLnC4A3 is IdFeewLArTwu: BkvcYpYRB6Zb = XZTzK6kfgvJu BmFxJV4xVvJI = Q4yaBcfQnMfZ else: _m0lLs6iTLa5 = IdFeewLArTwu.en8jF5h3sD4W(fmeJRzLnC4A3.r2wzacEY8Lls) PVdfahSN1bXR = fmeJRzLnC4A3.copy(coordinates=Q4yaBcfQnMfZ.unaddress(_m0lLs6iTLa5)) vPPlOXQgR3SM = KW0sEfjlgNpM.cortex_to_angle(PVdfahSN1bXR) (Y54gViOryHfr, cRb7OGyXJeT1) = vPPlOXQgR3SM[nzTpIcepk0o8('\x30' + chr(4529 - 4418) + chr(0b110000), 8):nzTpIcepk0o8('\x30' + chr(111) + chr(0b101001 + 0o11), 8)] aYHSBMjZouVV = nDF4gVNx0u9Q.asarray(vPPlOXQgR3SM[nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010), 8)], dtype=nDF4gVNx0u9Q.nzTpIcepk0o8) wJpOqKauo9id = nDF4gVNx0u9Q.asarray([AH_IuH1RaXuz(wgf0sgcu_xPL, ZehFxnvcnMu1[fPrVrKACaFCC]) if fPrVrKACaFCC > nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(5603 - 5492) + '\060', 8) else nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x30', 8) for (wgf0sgcu_xPL, fPrVrKACaFCC) in TxMFWa_Xzviv(cRb7OGyXJeT1, aYHSBMjZouVV)]) BkvcYpYRB6Zb = hFt7yOCw4gV2.tF75nqoNENFL(polar_angle=Y54gViOryHfr, eccentricity=cRb7OGyXJeT1, radius=wJpOqKauo9id, visual_area=aYHSBMjZouVV) BmFxJV4xVvJI = PVdfahSN1bXR.with_prop(BkvcYpYRB6Zb) return {roI3spqORKae(ES5oEprVxulp(b'\xaf\xb8\xb1El\xf7\xc5\xf3\xac\x0498\xc5\x98\x93'), '\144' + chr(0b1100101) + chr(99) + chr(0b11110 + 0o121) + '\x64' + chr(101))('\x75' + chr(116) + chr(102) + chr(0b10000 + 0o35) + chr(0b100101 + 0o23)): Q4yaBcfQnMfZ, roI3spqORKae(ES5oEprVxulp(b'\xaf\xb8\xb1El\xf7\xd2\xe0\xbd\t\t;\xff\x9b\x89\xbc\x00\xa2\x06\x81\xd9\xf7G'), '\144' + chr(0b1000111 + 0o36) + '\143' + chr(0b1101111) + chr(0b100100 + 0o100) + chr(0b11110 + 0o107))('\x75' + chr(1953 - 1837) + chr(102) + chr(0b101101) + chr(2051 - 1995)): XZTzK6kfgvJu, roI3spqORKae(ES5oEprVxulp(b'\xad\xaf\xb3Hv\xe0\xd4\xe8\xa6\x0e'), '\x64' + chr(0b1100101) + chr(99) + chr(0b100 + 0o153) + chr(100) + chr(0b1100101))('\x75' + chr(0b1011000 + 0o34) + chr(102) + '\055' + chr(56)): BkvcYpYRB6Zb, roI3spqORKae(ES5oEprVxulp(b'\xad\xaf\xb3Hv\xe0\xd4\xe4\xad?\x0b0\xd3\x83'), chr(3839 - 3739) + '\145' + '\143' + chr(0b1101011 + 0o4) + '\x64' + chr(0b11111 + 0o106))('\165' + '\164' + chr(102) + chr(45) + chr(0b111 + 0o61)): BmFxJV4xVvJI}
noahbenson/neuropythy
neuropythy/vision/retinotopy.py
register_retinotopy
def register_retinotopy(hemi, model='benson17', model_hemi=Ellipsis, polar_angle=None, eccentricity=None, weight=None, pRF_radius=None, weight_min=0.1, eccentricity_range=None, partial_voluming_correction=False, radius_weight=1, field_sign_weight=1, invert_rh_field_sign=False, scale=20.0, sigma=Ellipsis, select='close', prior=None, resample=Ellipsis, radius=np.pi/3, max_steps=2000, max_step_size=0.05, method='random', yield_imap=False): ''' register_retinotopy(hemi) registers the given hemisphere object, hemi, to a model of V1, V2, and V3 retinotopy, and yields a copy of hemi that is identical but additionally contains the registration 'retinotopy', whose coordinates are aligned with the model. Registration attempts to align the vertex positions of the hemisphere's spherical surface with a model of polar angle and eccentricity. This alignment proceeds through several steps and can be modified by several options. A description of these steps and options are provided here. For most cases, the default options should work relatively well. Method: (1) Prepare for registration by several intitialization substeps: a. Extract the polar angle, eccentricity and weight data from the hemisphere. These data are usually properties on the mesh and can be modifies by the options polar_angle, eccentricity, and weight, which can be either property names or list of property values. By default (None), a property is chosen using the functions neuropythy.vision.extract_retinotopy_argument with the default option set to 'empirical'. b. If partial voluming correction is enabled (via the option partial_voluming_correction), multiply the weight by (1 - p) where p is hemi.partial_volume_factor. c. If there is a prior that is specified as a belief about the retinotopy, then a Registration is created for the hemisphere such that its vertices are arranged according to that prior (see also the prior option). Note that because hemi's coordinates must always be projected into the registration specified by the model, the prior must be the name of a registration to which the model's specified subject is also registered. This is clear in the case of an example. The default value for this is 'retinotopy'; assuming that our model is specified on the fsaverage_sym, surface, the initial positions of the coordinates for the registration process would be the result of starting with hemi's fsaverage_sym-aligned coordinates then warping these coordinates in a way that is equivalent to the warping from fsaverage_sym's native spherical coordinates to fsaverage_sym's retinotopy registration coordinates. Note that the retinotopy registration would usually be specified in a file in the fsaverage_sym subject's surf directory: surf/lh.retinotopy.sphere.reg. If no prior is specified (option value None), then the vertices that are used are those aligned with the registration of the model, which will usually be 'fsaverage' or 'fsaverage_sym'. d. If the option resample is not None, then the vertex coordinates are resampled onto either the fsaverage or fsaverage_sym's native sphere surface. (The value of resample should be either 'fsaverage' or 'fsaverage_sym'.) Resampling can prevent vertices that have been rearranged by alignment with the model's specified registration or by application of a prior from beginning the alignment with very high initial gradients and is recommended for subject alignments. If resample is None then no changes are made. e. A 2D projection of the (possibly aligned, prior-warped, and resampled) cortical surface is made according to the projection parameters of the model. This map is the mesh that is warped to eventually fit the model. (2) Perform the registration by running neuropythy.registration.mesh_register. This step consists of two major components. a. Create the potential function, which we will minimize. The potential function is a complex function whose inputs are the coordinates of all of the vertices and whose output is a potential value that increases both as the mesh is warped and as the vertices with retinotopy predictions get farther away from the positions in the model that their retinotopy values would predict they should lie. The balance of these two forces is best controlled by the option functional_scale. The potential function fundamentally consists of four terms; the first three describe mesh deformations and the last describes the model fit. - The edge deformation term is described for any vertices u and v that are connected by an edge in the mesh; it's value is c/p (r(u,v) - r0(u,v))^2 where c is the edge_scale, p is the number of edges in the mesh, r(a,b) is the distance between vertices a and b, and r0(a,b) is the distance between a and b in the initial mesh. - The angle deformation term is described for any three vertices (u,v,w) that form an angle in the mesh; its value is c/m h(t(u,v,w), t0(u,v,w)) where c is the angle_scale argument, m is the number of angles in the mesh, t is the value of the angle (u,v,w), t0 is the value of the angle in the initial mesh, and h(t,t0) is an infinite-well function that asymptotes to positive infinity as t approaches both 0 and pi and is minimal when t = t0 (see the nben's nben.mesh.registration.InfiniteWell documentation for more details). - The perimeter term prevents the perimeter vertices form moving significantly; this primarily prevents the mesh from wrapping in on itself during registration. The form of this term is, for any vertex u on the mesh perimeter, (x(u) - x0(u))^2 where x and x0 are the position and initial position of the vertex. - Finally, the functional term is minimized when the vertices best align with the retinotopy model. b. Register the mesh vertices to the potential function using the nben Java library. The particular parameters of the registration are method, max_steps, and max_step_size. Options: * model specifies the instance of the retinotopy model to use; this must be an instance of the RegisteredRetinotopyModel class or a string that can be passed to the retinotopy_model() function (default: 'standard'). * model_hemi specifies the hemisphere of the model; generally you shouldn't have to set this unless you are using an fsaverage_sym model, in which case it should be set to None; in all other cases, the default value (Ellipsis) instructs the function to auto-detect the hemisphere. * polar_angle, eccentricity, pRF_radius, and weight specify the property names for the respective quantities; these may alternately be lists or numpy arrays of values. If weight is not given or found, then unity weight for all vertices is assumed. By default, each will check the hemisphere's properties for properties with compatible names; it will prefer the properties PRF_polar_angle, PRF_ecentricity, and PRF_variance_explained if possible. * weight_min (default: 0.1) specifies the minimum value a vertex must have in the weight property in order to be considered as retinotopically relevant. * eccentricity_range (default: None) specifies that any vertex whose eccentricity is too low or too high should be given a weight of 0 in the registration. * partial_voluming_correction (default: True), if True, specifies that the value (1 - hemi.partial_volume_factor) should be applied to all weight values (i.e., weights should be down-weighted when likely to be affected by a partial voluming error). * field_sign_weight (default: 1) indicates the relative weight (between 0 and 1) that should be given to the field-sign as a method of determining which anchors have the strongest springs. A value of 1 indicates that the effective weights of anchors should be the geometric mean of the empirical retinotopic weight and field-sign-based weight; a value of 0 indicates that no attention should be paid to the field sign weight. * radius_weight (default: 1) indicates the relative weight (between 0 and 1) that should be given to the pRF radius as a method of determining which anchors have the strongest springs. A value of 1 indicates that the effective weights of anchors should be the geometric mean of the empirical retinotopic weight and pRF-radius-based weight; a value of 0 indicates that no attention should be paid to the radius-based weight. * sigma specifies the standard deviation of the Gaussian shape for the Schira model anchors; see retinotopy_anchors for more information. * scale (default: 1.0) specifies the strength of the functional constraints (i.e. the anchors: the part of the minimization responsible for ensuring that retinotopic coordinates are aligned); the anatomical constraints (i.e. the edges and angles: the part of the minimization responsible for ensuring that the mesh is not overly deformed) are always held at a strength of 1.0. * select specifies the select option that should be passed to retinotopy_anchors. * max_steps (default 2,000) specifies the maximum number of registration steps to run. This may be a tuple (max_steps, stride) in which case the registered map that is returned will contain a piece of meta-data, 'trajectory' containing the vertex coordinates every stride steps of the registration. * max_step_size (default 0.05) specifies the maxmim distance a single vertex is allowed to move in a single step of the minimization. * method (default 'random') is the method argument passed to mesh_register. This should be 'random', 'pure', or 'nimble'. Generally, 'random' is recommended. * yield_imap (default: False) specifies whether the return value should be the new Mesh object or a pimms imap (i.e., a persistent mapping of the result of a pimms calculation) containing the meta-data that was used during the registration calculations. If this is True, then register_retinotopy will return immediately, and calculations will only be performed as the relevant data are requested from the returned imap. The item 'predicted_mesh' gives the return value when yield_imap is set to False. * radius (default: pi/3) specifies the radius, in radians, of the included portion of the map projection (projected about the occipital pole). * sigma (default Ellipsis) specifies the sigma argument to be passed onto the retinotopy_anchors function (see help(retinotopy_anchors)); the default value, Ellipsis, is interpreted as the default value of the retinotopy_anchors function's sigma option. * prior (default: None) specifies the prior that should be used, if found, in the topology registrations for the subject associated with the retinotopy_model's registration. * resample (default: Ellipsis) specifies that the data should be resampled to one of the uniform meshes, 'fsaverage' or 'fsaverage_sym', prior to registration; if None then no resampling is performed; if Ellipsis, then auto-detect either fsaverage or fsaverage_sym based on the model_hemi option (if it is None, fsaverage_sym, else fsaverage). ''' # create the imap m = retinotopy_registration( cortex=hemi, model_argument=model, model_hemi=model_hemi, polar_angle=polar_angle, eccentricity=eccentricity, weight=weight, pRF_radius=pRF_radius, weight_min=weight_min, eccentricity_range=eccentricity_range, partial_voluming_correction=partial_voluming_correction, radius_weight=radius_weight, field_sign_weight=field_sign_weight, invert_rh_field_sign=invert_rh_field_sign, scale=scale, sigma=sigma, select=select, prior=prior, resample=resample, radius=radius, max_steps=max_steps, max_step_size=max_step_size, method=method) return m if yield_imap else m['predicted_mesh']
python
def register_retinotopy(hemi, model='benson17', model_hemi=Ellipsis, polar_angle=None, eccentricity=None, weight=None, pRF_radius=None, weight_min=0.1, eccentricity_range=None, partial_voluming_correction=False, radius_weight=1, field_sign_weight=1, invert_rh_field_sign=False, scale=20.0, sigma=Ellipsis, select='close', prior=None, resample=Ellipsis, radius=np.pi/3, max_steps=2000, max_step_size=0.05, method='random', yield_imap=False): ''' register_retinotopy(hemi) registers the given hemisphere object, hemi, to a model of V1, V2, and V3 retinotopy, and yields a copy of hemi that is identical but additionally contains the registration 'retinotopy', whose coordinates are aligned with the model. Registration attempts to align the vertex positions of the hemisphere's spherical surface with a model of polar angle and eccentricity. This alignment proceeds through several steps and can be modified by several options. A description of these steps and options are provided here. For most cases, the default options should work relatively well. Method: (1) Prepare for registration by several intitialization substeps: a. Extract the polar angle, eccentricity and weight data from the hemisphere. These data are usually properties on the mesh and can be modifies by the options polar_angle, eccentricity, and weight, which can be either property names or list of property values. By default (None), a property is chosen using the functions neuropythy.vision.extract_retinotopy_argument with the default option set to 'empirical'. b. If partial voluming correction is enabled (via the option partial_voluming_correction), multiply the weight by (1 - p) where p is hemi.partial_volume_factor. c. If there is a prior that is specified as a belief about the retinotopy, then a Registration is created for the hemisphere such that its vertices are arranged according to that prior (see also the prior option). Note that because hemi's coordinates must always be projected into the registration specified by the model, the prior must be the name of a registration to which the model's specified subject is also registered. This is clear in the case of an example. The default value for this is 'retinotopy'; assuming that our model is specified on the fsaverage_sym, surface, the initial positions of the coordinates for the registration process would be the result of starting with hemi's fsaverage_sym-aligned coordinates then warping these coordinates in a way that is equivalent to the warping from fsaverage_sym's native spherical coordinates to fsaverage_sym's retinotopy registration coordinates. Note that the retinotopy registration would usually be specified in a file in the fsaverage_sym subject's surf directory: surf/lh.retinotopy.sphere.reg. If no prior is specified (option value None), then the vertices that are used are those aligned with the registration of the model, which will usually be 'fsaverage' or 'fsaverage_sym'. d. If the option resample is not None, then the vertex coordinates are resampled onto either the fsaverage or fsaverage_sym's native sphere surface. (The value of resample should be either 'fsaverage' or 'fsaverage_sym'.) Resampling can prevent vertices that have been rearranged by alignment with the model's specified registration or by application of a prior from beginning the alignment with very high initial gradients and is recommended for subject alignments. If resample is None then no changes are made. e. A 2D projection of the (possibly aligned, prior-warped, and resampled) cortical surface is made according to the projection parameters of the model. This map is the mesh that is warped to eventually fit the model. (2) Perform the registration by running neuropythy.registration.mesh_register. This step consists of two major components. a. Create the potential function, which we will minimize. The potential function is a complex function whose inputs are the coordinates of all of the vertices and whose output is a potential value that increases both as the mesh is warped and as the vertices with retinotopy predictions get farther away from the positions in the model that their retinotopy values would predict they should lie. The balance of these two forces is best controlled by the option functional_scale. The potential function fundamentally consists of four terms; the first three describe mesh deformations and the last describes the model fit. - The edge deformation term is described for any vertices u and v that are connected by an edge in the mesh; it's value is c/p (r(u,v) - r0(u,v))^2 where c is the edge_scale, p is the number of edges in the mesh, r(a,b) is the distance between vertices a and b, and r0(a,b) is the distance between a and b in the initial mesh. - The angle deformation term is described for any three vertices (u,v,w) that form an angle in the mesh; its value is c/m h(t(u,v,w), t0(u,v,w)) where c is the angle_scale argument, m is the number of angles in the mesh, t is the value of the angle (u,v,w), t0 is the value of the angle in the initial mesh, and h(t,t0) is an infinite-well function that asymptotes to positive infinity as t approaches both 0 and pi and is minimal when t = t0 (see the nben's nben.mesh.registration.InfiniteWell documentation for more details). - The perimeter term prevents the perimeter vertices form moving significantly; this primarily prevents the mesh from wrapping in on itself during registration. The form of this term is, for any vertex u on the mesh perimeter, (x(u) - x0(u))^2 where x and x0 are the position and initial position of the vertex. - Finally, the functional term is minimized when the vertices best align with the retinotopy model. b. Register the mesh vertices to the potential function using the nben Java library. The particular parameters of the registration are method, max_steps, and max_step_size. Options: * model specifies the instance of the retinotopy model to use; this must be an instance of the RegisteredRetinotopyModel class or a string that can be passed to the retinotopy_model() function (default: 'standard'). * model_hemi specifies the hemisphere of the model; generally you shouldn't have to set this unless you are using an fsaverage_sym model, in which case it should be set to None; in all other cases, the default value (Ellipsis) instructs the function to auto-detect the hemisphere. * polar_angle, eccentricity, pRF_radius, and weight specify the property names for the respective quantities; these may alternately be lists or numpy arrays of values. If weight is not given or found, then unity weight for all vertices is assumed. By default, each will check the hemisphere's properties for properties with compatible names; it will prefer the properties PRF_polar_angle, PRF_ecentricity, and PRF_variance_explained if possible. * weight_min (default: 0.1) specifies the minimum value a vertex must have in the weight property in order to be considered as retinotopically relevant. * eccentricity_range (default: None) specifies that any vertex whose eccentricity is too low or too high should be given a weight of 0 in the registration. * partial_voluming_correction (default: True), if True, specifies that the value (1 - hemi.partial_volume_factor) should be applied to all weight values (i.e., weights should be down-weighted when likely to be affected by a partial voluming error). * field_sign_weight (default: 1) indicates the relative weight (between 0 and 1) that should be given to the field-sign as a method of determining which anchors have the strongest springs. A value of 1 indicates that the effective weights of anchors should be the geometric mean of the empirical retinotopic weight and field-sign-based weight; a value of 0 indicates that no attention should be paid to the field sign weight. * radius_weight (default: 1) indicates the relative weight (between 0 and 1) that should be given to the pRF radius as a method of determining which anchors have the strongest springs. A value of 1 indicates that the effective weights of anchors should be the geometric mean of the empirical retinotopic weight and pRF-radius-based weight; a value of 0 indicates that no attention should be paid to the radius-based weight. * sigma specifies the standard deviation of the Gaussian shape for the Schira model anchors; see retinotopy_anchors for more information. * scale (default: 1.0) specifies the strength of the functional constraints (i.e. the anchors: the part of the minimization responsible for ensuring that retinotopic coordinates are aligned); the anatomical constraints (i.e. the edges and angles: the part of the minimization responsible for ensuring that the mesh is not overly deformed) are always held at a strength of 1.0. * select specifies the select option that should be passed to retinotopy_anchors. * max_steps (default 2,000) specifies the maximum number of registration steps to run. This may be a tuple (max_steps, stride) in which case the registered map that is returned will contain a piece of meta-data, 'trajectory' containing the vertex coordinates every stride steps of the registration. * max_step_size (default 0.05) specifies the maxmim distance a single vertex is allowed to move in a single step of the minimization. * method (default 'random') is the method argument passed to mesh_register. This should be 'random', 'pure', or 'nimble'. Generally, 'random' is recommended. * yield_imap (default: False) specifies whether the return value should be the new Mesh object or a pimms imap (i.e., a persistent mapping of the result of a pimms calculation) containing the meta-data that was used during the registration calculations. If this is True, then register_retinotopy will return immediately, and calculations will only be performed as the relevant data are requested from the returned imap. The item 'predicted_mesh' gives the return value when yield_imap is set to False. * radius (default: pi/3) specifies the radius, in radians, of the included portion of the map projection (projected about the occipital pole). * sigma (default Ellipsis) specifies the sigma argument to be passed onto the retinotopy_anchors function (see help(retinotopy_anchors)); the default value, Ellipsis, is interpreted as the default value of the retinotopy_anchors function's sigma option. * prior (default: None) specifies the prior that should be used, if found, in the topology registrations for the subject associated with the retinotopy_model's registration. * resample (default: Ellipsis) specifies that the data should be resampled to one of the uniform meshes, 'fsaverage' or 'fsaverage_sym', prior to registration; if None then no resampling is performed; if Ellipsis, then auto-detect either fsaverage or fsaverage_sym based on the model_hemi option (if it is None, fsaverage_sym, else fsaverage). ''' # create the imap m = retinotopy_registration( cortex=hemi, model_argument=model, model_hemi=model_hemi, polar_angle=polar_angle, eccentricity=eccentricity, weight=weight, pRF_radius=pRF_radius, weight_min=weight_min, eccentricity_range=eccentricity_range, partial_voluming_correction=partial_voluming_correction, radius_weight=radius_weight, field_sign_weight=field_sign_weight, invert_rh_field_sign=invert_rh_field_sign, scale=scale, sigma=sigma, select=select, prior=prior, resample=resample, radius=radius, max_steps=max_steps, max_step_size=max_step_size, method=method) return m if yield_imap else m['predicted_mesh']
[ "def", "register_retinotopy", "(", "hemi", ",", "model", "=", "'benson17'", ",", "model_hemi", "=", "Ellipsis", ",", "polar_angle", "=", "None", ",", "eccentricity", "=", "None", ",", "weight", "=", "None", ",", "pRF_radius", "=", "None", ",", "weight_min", ...
register_retinotopy(hemi) registers the given hemisphere object, hemi, to a model of V1, V2, and V3 retinotopy, and yields a copy of hemi that is identical but additionally contains the registration 'retinotopy', whose coordinates are aligned with the model. Registration attempts to align the vertex positions of the hemisphere's spherical surface with a model of polar angle and eccentricity. This alignment proceeds through several steps and can be modified by several options. A description of these steps and options are provided here. For most cases, the default options should work relatively well. Method: (1) Prepare for registration by several intitialization substeps: a. Extract the polar angle, eccentricity and weight data from the hemisphere. These data are usually properties on the mesh and can be modifies by the options polar_angle, eccentricity, and weight, which can be either property names or list of property values. By default (None), a property is chosen using the functions neuropythy.vision.extract_retinotopy_argument with the default option set to 'empirical'. b. If partial voluming correction is enabled (via the option partial_voluming_correction), multiply the weight by (1 - p) where p is hemi.partial_volume_factor. c. If there is a prior that is specified as a belief about the retinotopy, then a Registration is created for the hemisphere such that its vertices are arranged according to that prior (see also the prior option). Note that because hemi's coordinates must always be projected into the registration specified by the model, the prior must be the name of a registration to which the model's specified subject is also registered. This is clear in the case of an example. The default value for this is 'retinotopy'; assuming that our model is specified on the fsaverage_sym, surface, the initial positions of the coordinates for the registration process would be the result of starting with hemi's fsaverage_sym-aligned coordinates then warping these coordinates in a way that is equivalent to the warping from fsaverage_sym's native spherical coordinates to fsaverage_sym's retinotopy registration coordinates. Note that the retinotopy registration would usually be specified in a file in the fsaverage_sym subject's surf directory: surf/lh.retinotopy.sphere.reg. If no prior is specified (option value None), then the vertices that are used are those aligned with the registration of the model, which will usually be 'fsaverage' or 'fsaverage_sym'. d. If the option resample is not None, then the vertex coordinates are resampled onto either the fsaverage or fsaverage_sym's native sphere surface. (The value of resample should be either 'fsaverage' or 'fsaverage_sym'.) Resampling can prevent vertices that have been rearranged by alignment with the model's specified registration or by application of a prior from beginning the alignment with very high initial gradients and is recommended for subject alignments. If resample is None then no changes are made. e. A 2D projection of the (possibly aligned, prior-warped, and resampled) cortical surface is made according to the projection parameters of the model. This map is the mesh that is warped to eventually fit the model. (2) Perform the registration by running neuropythy.registration.mesh_register. This step consists of two major components. a. Create the potential function, which we will minimize. The potential function is a complex function whose inputs are the coordinates of all of the vertices and whose output is a potential value that increases both as the mesh is warped and as the vertices with retinotopy predictions get farther away from the positions in the model that their retinotopy values would predict they should lie. The balance of these two forces is best controlled by the option functional_scale. The potential function fundamentally consists of four terms; the first three describe mesh deformations and the last describes the model fit. - The edge deformation term is described for any vertices u and v that are connected by an edge in the mesh; it's value is c/p (r(u,v) - r0(u,v))^2 where c is the edge_scale, p is the number of edges in the mesh, r(a,b) is the distance between vertices a and b, and r0(a,b) is the distance between a and b in the initial mesh. - The angle deformation term is described for any three vertices (u,v,w) that form an angle in the mesh; its value is c/m h(t(u,v,w), t0(u,v,w)) where c is the angle_scale argument, m is the number of angles in the mesh, t is the value of the angle (u,v,w), t0 is the value of the angle in the initial mesh, and h(t,t0) is an infinite-well function that asymptotes to positive infinity as t approaches both 0 and pi and is minimal when t = t0 (see the nben's nben.mesh.registration.InfiniteWell documentation for more details). - The perimeter term prevents the perimeter vertices form moving significantly; this primarily prevents the mesh from wrapping in on itself during registration. The form of this term is, for any vertex u on the mesh perimeter, (x(u) - x0(u))^2 where x and x0 are the position and initial position of the vertex. - Finally, the functional term is minimized when the vertices best align with the retinotopy model. b. Register the mesh vertices to the potential function using the nben Java library. The particular parameters of the registration are method, max_steps, and max_step_size. Options: * model specifies the instance of the retinotopy model to use; this must be an instance of the RegisteredRetinotopyModel class or a string that can be passed to the retinotopy_model() function (default: 'standard'). * model_hemi specifies the hemisphere of the model; generally you shouldn't have to set this unless you are using an fsaverage_sym model, in which case it should be set to None; in all other cases, the default value (Ellipsis) instructs the function to auto-detect the hemisphere. * polar_angle, eccentricity, pRF_radius, and weight specify the property names for the respective quantities; these may alternately be lists or numpy arrays of values. If weight is not given or found, then unity weight for all vertices is assumed. By default, each will check the hemisphere's properties for properties with compatible names; it will prefer the properties PRF_polar_angle, PRF_ecentricity, and PRF_variance_explained if possible. * weight_min (default: 0.1) specifies the minimum value a vertex must have in the weight property in order to be considered as retinotopically relevant. * eccentricity_range (default: None) specifies that any vertex whose eccentricity is too low or too high should be given a weight of 0 in the registration. * partial_voluming_correction (default: True), if True, specifies that the value (1 - hemi.partial_volume_factor) should be applied to all weight values (i.e., weights should be down-weighted when likely to be affected by a partial voluming error). * field_sign_weight (default: 1) indicates the relative weight (between 0 and 1) that should be given to the field-sign as a method of determining which anchors have the strongest springs. A value of 1 indicates that the effective weights of anchors should be the geometric mean of the empirical retinotopic weight and field-sign-based weight; a value of 0 indicates that no attention should be paid to the field sign weight. * radius_weight (default: 1) indicates the relative weight (between 0 and 1) that should be given to the pRF radius as a method of determining which anchors have the strongest springs. A value of 1 indicates that the effective weights of anchors should be the geometric mean of the empirical retinotopic weight and pRF-radius-based weight; a value of 0 indicates that no attention should be paid to the radius-based weight. * sigma specifies the standard deviation of the Gaussian shape for the Schira model anchors; see retinotopy_anchors for more information. * scale (default: 1.0) specifies the strength of the functional constraints (i.e. the anchors: the part of the minimization responsible for ensuring that retinotopic coordinates are aligned); the anatomical constraints (i.e. the edges and angles: the part of the minimization responsible for ensuring that the mesh is not overly deformed) are always held at a strength of 1.0. * select specifies the select option that should be passed to retinotopy_anchors. * max_steps (default 2,000) specifies the maximum number of registration steps to run. This may be a tuple (max_steps, stride) in which case the registered map that is returned will contain a piece of meta-data, 'trajectory' containing the vertex coordinates every stride steps of the registration. * max_step_size (default 0.05) specifies the maxmim distance a single vertex is allowed to move in a single step of the minimization. * method (default 'random') is the method argument passed to mesh_register. This should be 'random', 'pure', or 'nimble'. Generally, 'random' is recommended. * yield_imap (default: False) specifies whether the return value should be the new Mesh object or a pimms imap (i.e., a persistent mapping of the result of a pimms calculation) containing the meta-data that was used during the registration calculations. If this is True, then register_retinotopy will return immediately, and calculations will only be performed as the relevant data are requested from the returned imap. The item 'predicted_mesh' gives the return value when yield_imap is set to False. * radius (default: pi/3) specifies the radius, in radians, of the included portion of the map projection (projected about the occipital pole). * sigma (default Ellipsis) specifies the sigma argument to be passed onto the retinotopy_anchors function (see help(retinotopy_anchors)); the default value, Ellipsis, is interpreted as the default value of the retinotopy_anchors function's sigma option. * prior (default: None) specifies the prior that should be used, if found, in the topology registrations for the subject associated with the retinotopy_model's registration. * resample (default: Ellipsis) specifies that the data should be resampled to one of the uniform meshes, 'fsaverage' or 'fsaverage_sym', prior to registration; if None then no resampling is performed; if Ellipsis, then auto-detect either fsaverage or fsaverage_sym based on the model_hemi option (if it is None, fsaverage_sym, else fsaverage).
[ "register_retinotopy", "(", "hemi", ")", "registers", "the", "given", "hemisphere", "object", "hemi", "to", "a", "model", "of", "V1", "V2", "and", "V3", "retinotopy", "and", "yields", "a", "copy", "of", "hemi", "that", "is", "identical", "but", "additionally...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/vision/retinotopy.py#L1349-L1516
train
This function registers a given hemisphere object with a model of V1 V2 and V3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0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + '\x6f' + chr(1442 - 1392) + chr(50) + chr(48), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x32' + chr(0b110010 + 0o1) + '\066', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(554 - 504) + '\067' + chr(117 - 63), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(2446 - 2393) + chr(49), 62288 - 62280), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b100000 + 0o22) + chr(0b1101 + 0o46), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b10001 + 0o42) + chr(2408 - 2354) + chr(416 - 361), ord("\x08")), nzTpIcepk0o8('\060' + chr(405 - 294) + chr(0b110001) + '\x36' + chr(1836 - 1784), 0o10), nzTpIcepk0o8('\060' + chr(158 - 47) + chr(51) + '\062' + chr(0b10111 + 0o37), 30651 - 30643), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49) + '\x32' + '\x35', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\067' + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\x6f' + chr(0b110001) + '\x30', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + '\062' + chr(0b11 + 0o60), 0b1000), nzTpIcepk0o8('\x30' + chr(5190 - 5079) + chr(0b0 + 0o61) + chr(0b110111) + chr(0b100000 + 0o26), 40861 - 40853), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49) + '\064', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011 + 0o0) + '\x34' + '\x36', 0b1000), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(0b1101111) + '\x31' + '\061' + chr(53), 0o10), nzTpIcepk0o8(chr(1414 - 1366) + chr(11856 - 11745) + chr(0b1110 + 0o44) + chr(2138 - 2083) + chr(503 - 455), 0b1000), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(111) + chr(175 - 122) + '\x34', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x36' + '\x34', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11101 + 0o26) + '\x34' + chr(0b101010 + 0o10), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101110 + 0o1) + chr(49) + chr(51) + chr(278 - 230), 30132 - 30124), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b1101111) + chr(51) + chr(0b110100) + '\061', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001) + chr(0b110110) + chr(50), 0o10), nzTpIcepk0o8(chr(1459 - 1411) + '\x6f' + chr(0b110011) + chr(0b110001) + chr(1283 - 1231), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(1966 - 1916) + chr(2286 - 2237) + chr(1329 - 1275), 2488 - 2480), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + chr(0b110001) + '\x36', 8), nzTpIcepk0o8(chr(1400 - 1352) + chr(111) + chr(0b110 + 0o54) + '\x37' + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(2924 - 2813) + chr(49) + chr(52) + chr(49), 2845 - 2837), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(457 - 408) + '\064' + '\061', 8), nzTpIcepk0o8('\060' + chr(0b1110 + 0o141) + chr(1143 - 1092) + chr(0b0 + 0o67) + chr(0b100111 + 0o17), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(961 - 912) + chr(53) + chr(0b110110), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(49) + '\062' + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b1101111) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(53) + chr(0b100 + 0o55), 8), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b1101111) + '\x34' + chr(235 - 187), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b1101 + 0o47) + chr(1363 - 1311), ord("\x08")), nzTpIcepk0o8(chr(0b101010 + 0o6) + '\157' + chr(2467 - 2417) + '\063' + '\x31', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b1000 + 0o52) + chr(2505 - 2453), 3429 - 3421), nzTpIcepk0o8(chr(0b10011 + 0o35) + '\x6f' + chr(1600 - 1546) + chr(2422 - 2372), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(50) + '\065' + chr(0b110011), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(5555 - 5444) + chr(53) + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xbe'), chr(0b1100100) + chr(101) + chr(0b1100011) + '\x6f' + '\144' + chr(0b1100101))(chr(0b1110101) + '\164' + chr(0b1100110) + chr(0b101101) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def LdwMCYNfjs5y(nRSX3HCpSIw0, KW0sEfjlgNpM=roI3spqORKae(ES5oEprVxulp(b'\xf2\xfb\xd0Z|\x99E\xe1'), chr(2654 - 2554) + chr(101) + chr(875 - 776) + '\157' + '\x64' + '\x65')(chr(12421 - 12304) + chr(0b1110100) + '\146' + '\x2d' + chr(0b1000 + 0o60)), R8QlNEoai_6G=RjQP07DYIdkf, ooKdxILblZqK=None, J0cNllQBMug7=None, iBxKYeMqq_Bt=None, qmG3MpnzJ4sd=None, Ln79tjAfkW3Z=0.1, rJrkFr9k00bC=None, SYQKh4x6Vvul=nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(48), ord("\x08")), iUYivoiUtGhn=nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31', 0o10), yeLIHjdeJh9t=nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001), 8), KasRFAbVbW37=nzTpIcepk0o8(chr(0b110000) + chr(11693 - 11582) + chr(0b10010 + 0o36), 8), r4zeu1khcH7g=20.0, uc4gGmjAvJP3=RjQP07DYIdkf, ioyOAbFuCaaE=roI3spqORKae(ES5oEprVxulp(b'\xf3\xf2\xd1Zv'), chr(0b1011 + 0o131) + '\145' + chr(0b1011 + 0o130) + chr(0b100000 + 0o117) + chr(100) + chr(613 - 512))('\165' + chr(0b1110100) + chr(0b101000 + 0o76) + '\x2d' + chr(0b111000)), kQ4qX8I6GVGJ=None, Rb9nsjAdIneG=RjQP07DYIdkf, qGhcQMWNyIbI=roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xfe\xd3\xccqx\xa5\x04\x82\x04\x07G\xfc'), '\x64' + chr(101) + chr(0b1100011) + chr(111) + chr(0b1100100) + '\145')(chr(3785 - 3668) + '\164' + '\x66' + '\x2d' + chr(56))) / nzTpIcepk0o8(chr(0b110000) + chr(0b1001000 + 0o47) + chr(0b110011), 14583 - 14575), F8LaVTjDyKEP=nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(1166 - 1111) + chr(50) + chr(0b110000), 39342 - 39334), nKaEsZFj5AKq=0.05, e5rcHW8hR5dL=roI3spqORKae(ES5oEprVxulp(b'\xe2\xff\xd0M|\x9a'), '\144' + chr(101) + chr(0b1001 + 0o132) + chr(0b1101111) + chr(0b1100100) + '\x65')(chr(10154 - 10037) + chr(0b1110100) + '\x66' + '\x2d' + chr(1992 - 1936)), WNlzYxSn24x3=nzTpIcepk0o8(chr(128 - 80) + '\157' + '\x30', 8)): tF75nqoNENFL = RjFMjJtbf6JP(cortex=nRSX3HCpSIw0, model_argument=KW0sEfjlgNpM, model_hemi=R8QlNEoai_6G, polar_angle=ooKdxILblZqK, eccentricity=J0cNllQBMug7, weight=iBxKYeMqq_Bt, pRF_radius=qmG3MpnzJ4sd, weight_min=Ln79tjAfkW3Z, eccentricity_range=rJrkFr9k00bC, partial_voluming_correction=SYQKh4x6Vvul, radius_weight=iUYivoiUtGhn, field_sign_weight=yeLIHjdeJh9t, invert_rh_field_sign=KasRFAbVbW37, scale=r4zeu1khcH7g, sigma=uc4gGmjAvJP3, select=ioyOAbFuCaaE, prior=kQ4qX8I6GVGJ, resample=Rb9nsjAdIneG, radius=qGhcQMWNyIbI, max_steps=F8LaVTjDyKEP, max_step_size=nKaEsZFj5AKq, method=e5rcHW8hR5dL) return tF75nqoNENFL if WNlzYxSn24x3 else tF75nqoNENFL[roI3spqORKae(ES5oEprVxulp(b'\xe0\xec\xdbMz\x94\x00\xb31ae\xf6\rd'), '\x64' + '\145' + chr(99) + '\x6f' + chr(0b110011 + 0o61) + '\x65')(chr(117) + '\x74' + '\x66' + '\055' + chr(56))]
noahbenson/neuropythy
neuropythy/vision/retinotopy.py
predict_retinotopy
def predict_retinotopy(sub, template='benson14', registration='fsaverage'): ''' predict_retinotopy(subject) yields a pair of dictionaries each with four keys: angle, eccen, sigma, and varea. Each of these keys maps to a numpy array with one entry per vertex. The first element of the yielded pair is the left hemisphere map and the second is the right hemisphere map. The values are obtained by resampling the Benson et al. 2014 anatomically defined template of retinotopy to the given subject. The following optional arguments may be given: * template (default: 'benson14') specifies the template to use. * registration (default: 'fsaverage') specifies the subject registration to use; generally can only be 'fsaverage' or 'fsaverage_sym'. ''' template = template.lower() retino_tmpls = predict_retinotopy.retinotopy_templates[registration] hemis = ['lh','rh'] if registration == 'fsaverage' else ['sym'] if template not in retino_tmpls: libdir = os.path.join(library_path(), 'data') search_paths = [libdir] # just hard-baked-in for now. suff = 'v4_0' if registration == 'fsaverage' else 'v3_0' filenames = {(hname, fnm): ('%s.%s_%s.%s.mgz' % (hname,template,fnm,suff)) for fnm in ['angle','eccen','varea','sigma'] for hname in hemis} # find an appropriate directory tmpl_path = next((os.path.join(path0, registration) for path0 in search_paths if all(os.path.isfile(os.path.join(path0, registration, 'surf', s)) for s in six.itervalues(filenames))), None) if tmpl_path is None: raise ValueError('No subject found with appropriate surf/*.%s_* files!' % template) tmpl_sub = nyfs.subject(registration) spath = os.path.join(tmpl_path, 'surf') retino_tmpls[template] = pimms.persist( {h:{k: pimms.imm_array(dat) for k in ['angle', 'eccen', 'varea', 'sigma'] for dat in [nyio.load(os.path.join(tmpl_path, 'surf', filenames[(h,k)]))]} for h in hemis}) # Okay, we just need to interpolate over to this subject tmpl = retino_tmpls[template] if not all(s in tmpl for s in hemis): raise ValueError('could not find matching template') if registration == 'fsaverage_sym': sym = nyfs.subject('fsaverage_sym') if isinstance(sub, mri.Subject): subj_hems = (sub.lh, sub.hemis['rhx']) tmpl_hems = (sym.lh, sym.lh) chrs_hems = ('lh','rh') else: subj_hems = (sub,) tmpl_hems = (sym.lh,) chrs_hems = (sub.chirality,) else: fsa = nyfs.subject('fsaverage') if isinstance(sub, mri.Subject): subj_hems = (sub.lh, sub.rh) tmpl_hems = (fsa.lh, fsa.rh) chrs_hems = ('lh','rh') else: subj_hems = (sub,) tmpl_hems = ((fsa.lh if sub.chirality == 'lh' else fsa.rh),) chrs_hems = (sub.chirality,) tpl = tuple([th.interpolate(sh, tmpl[h if registration == 'fsaverage' else 'sym']) for (sh,th,h) in zip(subj_hems, tmpl_hems, chrs_hems)]) return tpl[0] if len(tpl) == 1 else tpl
python
def predict_retinotopy(sub, template='benson14', registration='fsaverage'): ''' predict_retinotopy(subject) yields a pair of dictionaries each with four keys: angle, eccen, sigma, and varea. Each of these keys maps to a numpy array with one entry per vertex. The first element of the yielded pair is the left hemisphere map and the second is the right hemisphere map. The values are obtained by resampling the Benson et al. 2014 anatomically defined template of retinotopy to the given subject. The following optional arguments may be given: * template (default: 'benson14') specifies the template to use. * registration (default: 'fsaverage') specifies the subject registration to use; generally can only be 'fsaverage' or 'fsaverage_sym'. ''' template = template.lower() retino_tmpls = predict_retinotopy.retinotopy_templates[registration] hemis = ['lh','rh'] if registration == 'fsaverage' else ['sym'] if template not in retino_tmpls: libdir = os.path.join(library_path(), 'data') search_paths = [libdir] # just hard-baked-in for now. suff = 'v4_0' if registration == 'fsaverage' else 'v3_0' filenames = {(hname, fnm): ('%s.%s_%s.%s.mgz' % (hname,template,fnm,suff)) for fnm in ['angle','eccen','varea','sigma'] for hname in hemis} # find an appropriate directory tmpl_path = next((os.path.join(path0, registration) for path0 in search_paths if all(os.path.isfile(os.path.join(path0, registration, 'surf', s)) for s in six.itervalues(filenames))), None) if tmpl_path is None: raise ValueError('No subject found with appropriate surf/*.%s_* files!' % template) tmpl_sub = nyfs.subject(registration) spath = os.path.join(tmpl_path, 'surf') retino_tmpls[template] = pimms.persist( {h:{k: pimms.imm_array(dat) for k in ['angle', 'eccen', 'varea', 'sigma'] for dat in [nyio.load(os.path.join(tmpl_path, 'surf', filenames[(h,k)]))]} for h in hemis}) # Okay, we just need to interpolate over to this subject tmpl = retino_tmpls[template] if not all(s in tmpl for s in hemis): raise ValueError('could not find matching template') if registration == 'fsaverage_sym': sym = nyfs.subject('fsaverage_sym') if isinstance(sub, mri.Subject): subj_hems = (sub.lh, sub.hemis['rhx']) tmpl_hems = (sym.lh, sym.lh) chrs_hems = ('lh','rh') else: subj_hems = (sub,) tmpl_hems = (sym.lh,) chrs_hems = (sub.chirality,) else: fsa = nyfs.subject('fsaverage') if isinstance(sub, mri.Subject): subj_hems = (sub.lh, sub.rh) tmpl_hems = (fsa.lh, fsa.rh) chrs_hems = ('lh','rh') else: subj_hems = (sub,) tmpl_hems = ((fsa.lh if sub.chirality == 'lh' else fsa.rh),) chrs_hems = (sub.chirality,) tpl = tuple([th.interpolate(sh, tmpl[h if registration == 'fsaverage' else 'sym']) for (sh,th,h) in zip(subj_hems, tmpl_hems, chrs_hems)]) return tpl[0] if len(tpl) == 1 else tpl
[ "def", "predict_retinotopy", "(", "sub", ",", "template", "=", "'benson14'", ",", "registration", "=", "'fsaverage'", ")", ":", "template", "=", "template", ".", "lower", "(", ")", "retino_tmpls", "=", "predict_retinotopy", ".", "retinotopy_templates", "[", "reg...
predict_retinotopy(subject) yields a pair of dictionaries each with four keys: angle, eccen, sigma, and varea. Each of these keys maps to a numpy array with one entry per vertex. The first element of the yielded pair is the left hemisphere map and the second is the right hemisphere map. The values are obtained by resampling the Benson et al. 2014 anatomically defined template of retinotopy to the given subject. The following optional arguments may be given: * template (default: 'benson14') specifies the template to use. * registration (default: 'fsaverage') specifies the subject registration to use; generally can only be 'fsaverage' or 'fsaverage_sym'.
[ "predict_retinotopy", "(", "subject", ")", "yields", "a", "pair", "of", "dictionaries", "each", "with", "four", "keys", ":", "angle", "eccen", "sigma", "and", "varea", ".", "Each", "of", "these", "keys", "maps", "to", "a", "numpy", "array", "with", "one", ...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/vision/retinotopy.py#L1519-L1585
train
predict_retinotopy returns a pair of dictionaries each with four keys angle eccen sigma and varea and varea. Each key is a tuple of two elements each containing the angle eccen sigma and varea. The second element is a numpy array with one entry per vertex. The third element is the left hemisphere map and the third is the right hemisphere map.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedr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0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(4281 - 4170) + chr(0b11111 + 0o23) + '\x37' + chr(0b101110 + 0o4), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + chr(0b110110) + chr(0b110011), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\061' + chr(0b10000 + 0o42) + chr(0b11100 + 0o30), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + '\064' + '\063', 6662 - 6654), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b101 + 0o152) + chr(0b110000 + 0o2) + chr(2537 - 2482) + '\067', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(1248 - 1137) + chr(0b110001) + '\x37' + chr(54), 53996 - 53988), nzTpIcepk0o8(chr(249 - 201) + chr(111) + chr(49) + chr(0b110110) + chr(51), 8), nzTpIcepk0o8(chr(1574 - 1526) + '\x6f' + chr(2157 - 2107) + chr(695 - 642) + chr(0b10000 + 0o41), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1011010 + 0o25) + chr(0b11001 + 0o30) + chr(50), 0b1000), nzTpIcepk0o8(chr(1827 - 1779) + '\157' + chr(51) + chr(49) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b100001 + 0o22) + chr(52) + chr(0b110110), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + '\x34' + chr(0b101110 + 0o7), 13082 - 13074), nzTpIcepk0o8(chr(0b101110 + 0o2) + '\x6f' + chr(0b101100 + 0o5) + chr(1785 - 1735), 8), nzTpIcepk0o8('\x30' + chr(0b1011 + 0o144) + '\061' + '\060' + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b10010 + 0o135) + chr(49) + '\064' + '\064', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + chr(0b110100) + chr(0b11 + 0o57), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(687 - 638) + chr(0b110010) + chr(395 - 347), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100101 + 0o14) + chr(0b110000) + '\x35', 0b1000), nzTpIcepk0o8(chr(48) + chr(4968 - 4857) + chr(0b110001) + '\063' + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(4831 - 4720) + chr(0b11011 + 0o33) + chr(0b101111 + 0o6), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(2518 - 2467) + '\x31' + chr(0b101101 + 0o6), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(535 - 485) + chr(0b11100 + 0o30) + chr(0b11111 + 0o27), 14517 - 14509), nzTpIcepk0o8('\060' + '\x6f' + '\061' + chr(0b110 + 0o56), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + '\063' + '\x32', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b10011 + 0o37), 35564 - 35556), nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + '\065' + chr(49), 0o10), nzTpIcepk0o8('\060' + chr(11605 - 11494) + chr(813 - 763) + chr(2227 - 2172) + '\x35', 60676 - 60668), nzTpIcepk0o8(chr(48) + '\157' + chr(1505 - 1456) + chr(52) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(1206 - 1095) + chr(51) + chr(0b1001 + 0o52), 0o10), nzTpIcepk0o8(chr(48) + chr(0b100000 + 0o117) + chr(0b11010 + 0o27) + chr(0b110110) + chr(48), 0b1000), nzTpIcepk0o8(chr(2011 - 1963) + chr(0b1101111) + chr(51) + '\064' + chr(0b1110 + 0o45), 8), nzTpIcepk0o8(chr(48) + '\157' + chr(1269 - 1218) + chr(1033 - 983) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1001001 + 0o46) + chr(2434 - 2383) + chr(52) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b11110 + 0o22) + '\x6f' + chr(0b100001 + 0o21) + '\061' + '\x37', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\062' + chr(52) + '\x30', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b10000 + 0o43) + '\x31' + chr(0b110111), 0b1000), nzTpIcepk0o8('\060' + chr(6142 - 6031) + '\063' + '\x30' + chr(0b110100), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1010010 + 0o35) + '\x31' + chr(0b1100 + 0o44) + chr(0b1110 + 0o44), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b101011 + 0o7) + '\x31' + chr(51), ord("\x08")), nzTpIcepk0o8(chr(587 - 539) + '\x6f' + chr(0b110100) + chr(0b110010 + 0o5), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b10000 + 0o137) + chr(53) + '\x30', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x94'), chr(0b100010 + 0o102) + '\145' + chr(99) + chr(0b111110 + 0o61) + chr(5731 - 5631) + '\145')(chr(117) + '\x74' + '\x66' + '\x2d' + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def GbluLi0M7k5x(_zPndKq6xMgp, Pe8smzX7Gsur=roI3spqORKae(ES5oEprVxulp(b'\xd8\x16:\x90\xd0\x10B\x9d'), chr(0b10010 + 0o122) + '\x65' + '\143' + '\x6f' + chr(0b1100100) + '\145')(chr(0b1011111 + 0o26) + chr(116) + chr(0b1100110) + '\055' + chr(1487 - 1431)), DLbBU9_iMFpN=roI3spqORKae(ES5oEprVxulp(b'\xdc\x005\x95\xda\x0c\x12\xceo'), chr(0b1011001 + 0o13) + chr(2266 - 2165) + chr(0b1100011) + '\157' + chr(0b1001110 + 0o26) + '\x65')('\x75' + chr(0b1110100) + chr(102) + chr(224 - 179) + chr(2733 - 2677))): Pe8smzX7Gsur = Pe8smzX7Gsur.Xn8ENWMZdIRt() WjNw8UiIsqzy = GbluLi0M7k5x.retinotopy_templates[DLbBU9_iMFpN] Q59m8Szf27_x = [roI3spqORKae(ES5oEprVxulp(b'\xd6\x1b'), chr(2909 - 2809) + '\x65' + chr(0b111001 + 0o52) + chr(4576 - 4465) + '\x64' + chr(0b1100101))('\x75' + chr(0b1110100) + chr(102) + chr(0b11111 + 0o16) + chr(0b1000 + 0o60)), roI3spqORKae(ES5oEprVxulp(b'\xc8\x1b'), chr(100) + chr(0b1000 + 0o135) + chr(0b1100010 + 0o1) + chr(0b1101111) + chr(100) + chr(0b1100101))('\x75' + chr(0b100 + 0o160) + chr(2771 - 2669) + chr(0b1100 + 0o41) + chr(0b111000))] if DLbBU9_iMFpN == roI3spqORKae(ES5oEprVxulp(b'\xdc\x005\x95\xda\x0c\x12\xceo'), '\144' + chr(0b110101 + 0o60) + chr(8094 - 7995) + chr(0b1100011 + 0o14) + '\144' + '\x65')('\165' + chr(116) + chr(0b1100110) + chr(0b101101) + chr(0b111000)) else [roI3spqORKae(ES5oEprVxulp(b'\xc9\n9'), chr(0b1100011 + 0o1) + '\x65' + '\143' + chr(0b1000001 + 0o56) + chr(0b100000 + 0o104) + chr(6536 - 6435))(chr(117) + chr(0b11011 + 0o131) + '\146' + '\055' + chr(56))] if Pe8smzX7Gsur not in WjNw8UiIsqzy: P3Y0dD0RKV5u = aHUqKstZLeS6.path.Y4yM9BcfTCNq(jC9Q9n8cKIGN(), roI3spqORKae(ES5oEprVxulp(b'\xde\x12 \x82'), '\x64' + chr(101) + chr(4001 - 3902) + chr(111) + chr(0b10101 + 0o117) + chr(0b1100101))('\165' + chr(4690 - 4574) + '\x66' + chr(0b101101) + '\070')) yQl6OBjKB5Cn = [P3Y0dD0RKV5u] h2H92xP_GY5d = roI3spqORKae(ES5oEprVxulp(b'\xccG\x0b\xd3'), '\x64' + '\x65' + chr(0b1010011 + 0o20) + '\x6f' + chr(100) + chr(101))(chr(10011 - 9894) + '\164' + '\146' + chr(0b101101) + chr(0b11001 + 0o37)) if DLbBU9_iMFpN == roI3spqORKae(ES5oEprVxulp(b'\xdc\x005\x95\xda\x0c\x12\xceo'), '\x64' + chr(0b1010110 + 0o17) + chr(5919 - 5820) + chr(0b1100100 + 0o13) + chr(4969 - 4869) + chr(101))('\x75' + '\x74' + chr(8778 - 8676) + chr(2014 - 1969) + chr(56)) else roI3spqORKae(ES5oEprVxulp(b'\xcc@\x0b\xd3'), chr(0b1101 + 0o127) + chr(0b1100101) + chr(0b10010 + 0o121) + chr(0b11101 + 0o122) + '\x64' + chr(0b1001101 + 0o30))('\165' + chr(12918 - 12802) + chr(0b1100110) + '\055' + chr(56)) EXVYY4cgQiXQ = {(Op_f4ye9UiMq, bTRPjBR7GViM): roI3spqORKae(ES5oEprVxulp(b'\x9f\x00z\xc6\xcc!V\xda$\xe9\x95Kg&\x1e'), chr(1591 - 1491) + chr(0b1100101) + chr(6610 - 6511) + '\x6f' + chr(100) + '\145')(chr(9645 - 9528) + chr(0b1110100) + chr(0b100101 + 0o101) + chr(1373 - 1328) + chr(0b100 + 0o64)) % (Op_f4ye9UiMq, Pe8smzX7Gsur, bTRPjBR7GViM, h2H92xP_GY5d) for bTRPjBR7GViM in [roI3spqORKae(ES5oEprVxulp(b'\xdb\x1d3\x8f\xda'), '\144' + chr(0b100100 + 0o101) + chr(99) + chr(4849 - 4738) + chr(0b1010001 + 0o23) + chr(0b1100101))('\165' + '\x74' + '\146' + chr(45) + '\070'), roI3spqORKae(ES5oEprVxulp(b'\xdf\x107\x86\xd1'), chr(100) + '\x65' + chr(99) + chr(0b111011 + 0o64) + chr(0b1100100) + chr(101))('\165' + chr(0b1011011 + 0o31) + chr(228 - 126) + chr(45) + chr(2841 - 2785)), roI3spqORKae(ES5oEprVxulp(b'\xcc\x12&\x86\xde'), chr(8309 - 8209) + chr(101) + chr(99) + '\157' + chr(0b101001 + 0o73) + chr(0b1000000 + 0o45))('\x75' + chr(0b1110011 + 0o1) + '\x66' + chr(0b111 + 0o46) + chr(0b1001 + 0o57)), roI3spqORKae(ES5oEprVxulp(b'\xc9\x1a3\x8e\xde'), '\144' + chr(9606 - 9505) + chr(0b1100011) + chr(0b1101111) + chr(8875 - 8775) + chr(101))(chr(0b1110101) + '\164' + '\146' + chr(0b100101 + 0o10) + chr(0b101011 + 0o15))] for Op_f4ye9UiMq in Q59m8Szf27_x} FnTYwXLTPc96 = ltB3XhPy2rYf((aHUqKstZLeS6.path.Y4yM9BcfTCNq(mwczJr66hy5L, DLbBU9_iMFpN) for mwczJr66hy5L in yQl6OBjKB5Cn if qX60lO1lgHA5((aHUqKstZLeS6.path.isfile(aHUqKstZLeS6.path.Y4yM9BcfTCNq(mwczJr66hy5L, DLbBU9_iMFpN, roI3spqORKae(ES5oEprVxulp(b'\xc9\x06&\x85'), '\x64' + chr(2586 - 2485) + chr(0b1011000 + 0o13) + chr(0b1101100 + 0o3) + chr(0b1100100) + chr(7435 - 7334))('\165' + chr(0b1110100) + chr(0b1100110) + chr(1693 - 1648) + chr(0b111000)), PmE5_h409JAA)) for PmE5_h409JAA in YVS_F7_wWn_o.itervalues(EXVYY4cgQiXQ)))), None) if FnTYwXLTPc96 is None: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b"\xf4\x1ct\x90\xca\x1c\x19\xcci\xb8\xc6\x03e4\n\x86p22A\xa3\x86m\xaar\x9b\xd2\x12i\x19\x82\xa4\x80\xaf\xd3\xba\xb6$\xa4\r\x94V'\xbc\x95^\x15\xc0f\xa9\x95D"), chr(4963 - 4863) + chr(1770 - 1669) + chr(0b1100011) + chr(111) + chr(2742 - 2642) + chr(0b1001 + 0o134))('\165' + chr(0b1110100) + chr(102) + chr(613 - 568) + chr(56)) % Pe8smzX7Gsur) ACF5Rs7Yv4n1 = UPYDQKfXDmro.NybBYFIJq0hU(DLbBU9_iMFpN) IiUYerGqOzSS = aHUqKstZLeS6.path.Y4yM9BcfTCNq(FnTYwXLTPc96, roI3spqORKae(ES5oEprVxulp(b'\xc9\x06&\x85'), chr(0b1010 + 0o132) + chr(0b10011 + 0o122) + chr(0b100101 + 0o76) + chr(0b110011 + 0o74) + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(116) + chr(0b1100110) + '\x2d' + chr(0b111000))) WjNw8UiIsqzy[Pe8smzX7Gsur] = zAgo8354IlJ7.persist({_9ve2uheHd6a: {B6UAF1zReOyJ: zAgo8354IlJ7.imm_array(LMcCiF4czwpp) for B6UAF1zReOyJ in [roI3spqORKae(ES5oEprVxulp(b'\xdb\x1d3\x8f\xda'), '\x64' + chr(0b1100101) + chr(99) + chr(0b101011 + 0o104) + '\144' + chr(0b1100101))(chr(117) + chr(116) + '\x66' + chr(408 - 363) + chr(1823 - 1767)), roI3spqORKae(ES5oEprVxulp(b'\xdf\x107\x86\xd1'), chr(0b1100100) + chr(0b111110 + 0o47) + chr(99) + chr(0b1101111) + '\144' + chr(3753 - 3652))('\x75' + '\164' + chr(0b110110 + 0o60) + chr(1192 - 1147) + chr(505 - 449)), roI3spqORKae(ES5oEprVxulp(b'\xcc\x12&\x86\xde'), chr(5742 - 5642) + chr(0b1011001 + 0o14) + chr(2629 - 2530) + chr(111) + '\x64' + '\145')('\x75' + chr(116) + '\146' + chr(0b101101) + '\070'), roI3spqORKae(ES5oEprVxulp(b'\xc9\x1a3\x8e\xde'), chr(0b1100100) + chr(0b11000 + 0o115) + '\143' + '\157' + chr(6340 - 6240) + chr(101))(chr(0b1110101) + '\164' + '\x66' + chr(0b101101) + chr(695 - 639))] for LMcCiF4czwpp in [FtNJN3RgnJYj.ZERsdc7c1d8E(aHUqKstZLeS6.path.Y4yM9BcfTCNq(FnTYwXLTPc96, roI3spqORKae(ES5oEprVxulp(b'\xc9\x06&\x85'), '\144' + chr(0b1001000 + 0o35) + '\143' + '\157' + chr(0b11101 + 0o107) + '\145')('\165' + chr(0b1101011 + 0o11) + chr(0b10001 + 0o125) + '\x2d' + chr(1397 - 1341)), EXVYY4cgQiXQ[_9ve2uheHd6a, B6UAF1zReOyJ]))]} for _9ve2uheHd6a in Q59m8Szf27_x}) Tcj0xjZ6cBv2 = WjNw8UiIsqzy[Pe8smzX7Gsur] if not qX60lO1lgHA5((PmE5_h409JAA in Tcj0xjZ6cBv2 for PmE5_h409JAA in Q59m8Szf27_x)): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xd9\x1c!\x8f\xdb^\x1d\xc6~\xec\x80\x0cd%D\x8f118]\xa2\xc8k\xfav\x8c\xd0\x12w\x11\x97\xb5'), '\144' + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(0b110001 + 0o63) + '\x65')(chr(0b1010 + 0o153) + chr(0b1110100) + chr(102) + chr(1691 - 1646) + '\070')) if DLbBU9_iMFpN == roI3spqORKae(ES5oEprVxulp(b'\xdc\x005\x95\xda\x0c\x12\xceo\x93\x95\x1cg'), chr(100) + chr(1246 - 1145) + chr(99) + chr(0b1101111) + '\144' + chr(0b1100101))('\165' + '\164' + chr(7607 - 7505) + chr(1259 - 1214) + '\x38'): ap75Y_eaMZLk = UPYDQKfXDmro.NybBYFIJq0hU(roI3spqORKae(ES5oEprVxulp(b'\xdc\x005\x95\xda\x0c\x12\xceo\x93\x95\x1cg'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(0b11101 + 0o122) + '\144' + chr(101))('\165' + '\x74' + chr(102) + chr(431 - 386) + chr(0b11 + 0o65))) if suIjIS24Zkqw(_zPndKq6xMgp, roI3spqORKae(aTPvhHWf7rXC, roI3spqORKae(ES5oEprVxulp(b'\xe9\x066\x89\xda\x1d\x07'), chr(0b1100100) + chr(101) + '\x63' + '\157' + chr(0b10100 + 0o120) + chr(101))('\x75' + chr(0b1101110 + 0o6) + '\x66' + chr(2019 - 1974) + '\x38'))): g87D7l7eSJdR = (_zPndKq6xMgp.lh, _zPndKq6xMgp.hemis[roI3spqORKae(ES5oEprVxulp(b'\xc8\x1b,'), chr(0b1100100) + '\x65' + chr(99) + chr(2833 - 2722) + chr(3338 - 3238) + chr(101))('\x75' + '\x74' + '\146' + chr(0b100111 + 0o6) + chr(0b101010 + 0o16))]) DRwT6qImqVkq = (ap75Y_eaMZLk.lh, ap75Y_eaMZLk.lh) Rkhr_tYAvLbN = (roI3spqORKae(ES5oEprVxulp(b'\xd6\x1b'), chr(100) + chr(3135 - 3034) + '\x63' + '\x6f' + chr(100) + chr(1370 - 1269))(chr(9581 - 9464) + chr(0b1110100) + chr(102) + chr(45) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xc8\x1b'), chr(4780 - 4680) + chr(9288 - 9187) + chr(0b1000001 + 0o42) + '\157' + chr(0b1100100) + chr(0b1100000 + 0o5))(chr(0b1110101) + '\x74' + '\146' + '\055' + chr(3074 - 3018))) else: g87D7l7eSJdR = (_zPndKq6xMgp,) DRwT6qImqVkq = (ap75Y_eaMZLk.lh,) Rkhr_tYAvLbN = (_zPndKq6xMgp.chirality,) else: EMKJGSkS_3Vt = UPYDQKfXDmro.NybBYFIJq0hU(roI3spqORKae(ES5oEprVxulp(b'\xdc\x005\x95\xda\x0c\x12\xceo'), chr(6113 - 6013) + chr(9007 - 8906) + '\143' + chr(0b1101111) + '\x64' + chr(4237 - 4136))(chr(0b10110 + 0o137) + chr(4021 - 3905) + '\x66' + '\055' + chr(56))) if suIjIS24Zkqw(_zPndKq6xMgp, roI3spqORKae(aTPvhHWf7rXC, roI3spqORKae(ES5oEprVxulp(b'\xe9\x066\x89\xda\x1d\x07'), chr(6778 - 6678) + chr(0b1100101) + chr(0b1011110 + 0o5) + '\x6f' + chr(913 - 813) + '\x65')(chr(5999 - 5882) + '\164' + '\x66' + chr(45) + '\070'))): g87D7l7eSJdR = (_zPndKq6xMgp.lh, _zPndKq6xMgp.rh) DRwT6qImqVkq = (EMKJGSkS_3Vt.lh, EMKJGSkS_3Vt.rh) Rkhr_tYAvLbN = (roI3spqORKae(ES5oEprVxulp(b'\xd6\x1b'), chr(0b1100100) + '\x65' + chr(0b11001 + 0o112) + chr(111) + chr(4086 - 3986) + chr(101))(chr(117) + '\x74' + chr(0b1100110) + chr(1391 - 1346) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\xc8\x1b'), chr(7918 - 7818) + chr(4950 - 4849) + '\143' + chr(0b1101111) + chr(100) + '\x65')(chr(0b1110101) + chr(10541 - 10425) + chr(0b110100 + 0o62) + chr(0b11101 + 0o20) + chr(0b111000))) else: g87D7l7eSJdR = (_zPndKq6xMgp,) DRwT6qImqVkq = (EMKJGSkS_3Vt.lh if _zPndKq6xMgp.chirality == roI3spqORKae(ES5oEprVxulp(b'\xd6\x1b'), chr(100) + chr(0b110010 + 0o63) + '\x63' + chr(10488 - 10377) + chr(1526 - 1426) + '\x65')(chr(0b1110101) + chr(0b1110000 + 0o4) + chr(0b111 + 0o137) + chr(45) + chr(0b11 + 0o65)) else EMKJGSkS_3Vt.rh,) Rkhr_tYAvLbN = (_zPndKq6xMgp.chirality,) XEE_WbWc84EQ = nfNqtJL5aRaY([zW5xXJ77YZDm.wo2_AaefnPDo(s85aS56Nw7Iz, Tcj0xjZ6cBv2[_9ve2uheHd6a if DLbBU9_iMFpN == roI3spqORKae(ES5oEprVxulp(b'\xdc\x005\x95\xda\x0c\x12\xceo'), chr(100) + chr(0b1100101) + chr(99) + chr(10985 - 10874) + '\144' + chr(8062 - 7961))(chr(117) + '\164' + chr(0b101010 + 0o74) + chr(1284 - 1239) + chr(56)) else roI3spqORKae(ES5oEprVxulp(b'\xc9\n9'), chr(0b1100100) + '\145' + '\143' + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))('\165' + '\164' + '\x66' + '\055' + '\x38')]) for (s85aS56Nw7Iz, zW5xXJ77YZDm, _9ve2uheHd6a) in TxMFWa_Xzviv(g87D7l7eSJdR, DRwT6qImqVkq, Rkhr_tYAvLbN)]) return XEE_WbWc84EQ[nzTpIcepk0o8(chr(48) + chr(0b1001101 + 0o42) + '\060', ord("\x08"))] if ftfygxgFas5X(XEE_WbWc84EQ) == nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49), 65278 - 65270) else XEE_WbWc84EQ
noahbenson/neuropythy
neuropythy/vision/retinotopy.py
retinotopy_comparison
def retinotopy_comparison(arg1, arg2, arg3=None, eccentricity_range=None, polar_angle_range=None, visual_area_mask=None, weight=Ellipsis, weight_min=None, visual_area=Ellipsis, method='rmse', distance='scaled', gold=None): ''' retinotopy_comparison(dataset1, dataset2) yields a pimms itable comparing the two retinotopy datasets. retinotopy_error(obj, dataset1, dataset2) is equivalent to retinotopy_comparison(x, y) where x and y are retinotopy(obj, dataset1) and retinotopy_data(obj, dataset2). The datasets may be specified in a number of ways, some of which may be incompatible with certain options. The simplest way to specify a dataset is as a vector of complex numbers, which are taken to represent positions in the visual field with (a + bi) corresponding to the coordinate (a deg, b deg) in the visual field. Alternately, an n x 2 or 2 x n matrix will be interpreted as (polar angle, eccentricity) coordinates, in terms of visual degrees (see the as_retinotopy function: as_retinotopy(arg, 'visual') yields this input format). Alternately, the datasets may be mappings such as those retuend by the retinotopy_data function; in this case as_retinotopy is used to extract the visual coordinates (so they need not be specified in visual coordinates specifically in this case). In this last case, additional properties such as the variance explained and pRF size can be returned, making it valuable for more sophisticated error methods or distance metrics. The returned dataset will always have a row for each row in the two datasets (which must have the same number of rows). However, many rows may have a weight of 0 even if no weights were specified in the options; this is because other limitations may have been specified (such as in the eccentricity_range or visual_areas). The returned dataset will always contain the following columns: * 'weight' gives the weight assigned to this particular vertex; the weights will always sum to 1 unless all vertices have 0 weight. * 'polar_angle_1' and 'polar_angle_2', 'eccentricity_1', 'eccenticity_2', 'x_1', 'x_2', 'y_1', 'y_2', 'z_1', and 'z_2' all give the visual field coordinates in degrees; the z values give complex numbers equivalent to the x/y values. * 'radius_1' and 'radius_2' give the radii (sigma parameters) of the pRF gaussians. * 'polar_angle_error', 'eccentricity_error', and 'center_error' all give the difference between the visual field points in the two datasets; note that polar_angle_error in particular is an error measure of rotations around the visual field and not of visual field position. The 'center_error' is the distance between the centers of the visual field, in degrees. The 'radius_error' value is also given. * 'visual_area_1' and 'visual_area_2' specify the visual areas of the individual datasets; if either of the datasets did not have a visual area, it will be omitted. Additionally, the property 'visual_area' specifies the visual area suggested for use in analyses; this is chosen based on the following: (1) if there is a gold standard dataset specified that has a visual area, use it; (2) if only one of the datasets has a visual area, use it; (3) if both have a visual area, then use the (varea1 == varea2) * varea1 (the areas that agree are kept and all others are set to 0); (4) if neither has a visual area, then this property is omitted. In all cases where a 'visual_area' property is included, those vertices that do not overlap with the given visual_area_option option will be set to 0 along with the corresponding weights. * A variety of other lazily-calculated error metrics are included. The following options are accepted: * eccentricity_range (default: None) specifies the range of eccentricity to include in the calculation (in degrees). This may be specified as emax or (emin, emax). * polar_angle_range (default: None) specifies the range of polar angles to include in the calculation. Like eccentricity range it may be specified as (amin, amax) but amax alone is not allowed. Additionally the strings 'lh' and 'rvf' are equivalent to (0,180) and the strings 'rh' and 'lvf' are equivalent to (-180,0). * weight (default: Ellipsis) specifies the weights to be used in the calculation. This may be None to specify that no weights should be used, or a property name or an array of weight values. Alternately, it may be a tuple (w1, w2) of the weights for datasets 1 and 2. If the argument is Ellipsis, then it will use weights if they are found in the retinotopy dataset; both datasets may contain weights in which the product is used. * weight_min (default: None) specifies the minimum weight a vertex must have to be included in the calculation. * visual_area (default: Ellipsis) specifies the visual area labels to be used in the calculation. This may be None to specify that no labels should be used, or a property name or an array of labels. Alternately, it may be a tuple (l1, l2) of the labels for datasets 1 and 2. If the argument is Ellipsis, then it will use labels if they are found in the retinotopy dataset; both datasets may contain labels in which the gold standard's labels are used if there is a gold standard and the overlapping labels are used otherwise. * visual_area_mask (default: None) specifies a list of visual areas included in the calculation; this is applied to all datasets with a visual_area key; see the 'visual_area' columns above and the visual_area option. If None, then no visual areas are filtered; otherwise, arguments should like (1,2,3), which would usually specify that areas V1, V2, and V3, be included. * gold (default: None) specifies which dataset should be considered the gold standard; this should be either 1 or 2. If a gold-standard dataset is specified, then it is used in certain calculations; for example, when scaling an error by eccentricity, the gold-standard's eccentricity will be used unless there is no gold standard, in which case the mean of the two values are used. ''' if arg3 is not None: (obj, dsets) = (arg1, [retinotopy_data(arg1, aa) for aa in (arg2,arg3)]) else: (obj, dsets) = (None, [arg1, arg2]) (gi,gold) = (None,False) if not gold else (gold-1,True) # we'll build up this result as we go... result = {} # they must have a retinotopy representation: vis = [as_retinotopy(ds, 'visual') for ds in dsets] ps = (vis[0][0], vis[1][0]) es = (vis[0][1], vis[1][1]) rs = [ds['radius'] if 'radius' in ds else None for ds in dsets] for ii in (0,1): s = '_%d' % (ii + 1) (p,e) = (ps[ii],es[ii]) result['polar_angle' + s] = p result['eccentricity' + s] = e if rs[ii] is not None: result['radius' + s] = rs[ii] p = np.pi/180.0 * (90.0 - p) (x,y) = (e*np.cos(p), e*np.sin(p)) result['x' + s] = x result['y' + s] = y result['z' + s] = x + 1j * y n = len(ps[0]) # figure out the weight if pimms.is_vector(weight) and len(weight) == 2: ws = [(None if w is None else ds[w] if pimms.is_str(w) and w in ds else geo.to_property(obj, w)) for (w,ds) in zip(weight, dsets)] weight = Ellipsis else: ws = [next((ds[k] for k in ('weight','variance_explained') if k in ds), None) for ds in dsets] if pimms.is_vector(weight, 'real'): wgt = weight elif pimms.is_str(weight): if obj is None: raise ValueError('weight property name but no vertex-set given') wgt = geo.to_property(obj, weight) elif weight is Ellipsis: if gold: wgt = ws[gi] elif ws[0] is None and ws[1] is None: wgt = None elif ws[0] is None: wgt = ws[1] elif ws[1] is None: wgt = ws[0] else: wgt = ws[0] * ws[1] else: raise ValueError('Could not parse weight argument') if wgt is None: wgt = np.ones(n) if ws[0] is not None: result['weight_1'] = ws[0] if ws[1] is not None: result['weight_2'] = ws[1] # figure out the visual areas if is_tuple(visual_area) and len(visual_area) == 2: ls = [(None if l is None else ds[l] if pimms.is_str(l) and l in ds else geo.to_property(obj, l)) for (l,ds) in zip(visual_area, dsets)] visual_area = Ellipsis else: ls = [next((ds[k] for k in ('visual_area','label') if k in ds), None) for ds in dsets] if pimms.is_vector(visual_area): lbl = visual_area elif pimms.is_str(visual_area): if obj is None: raise ValueError('visual_area property name but no vertex-set given') lbl = geo.to_property(obj, visual_area) elif visual_area is None: lbl = None elif visual_area is Ellipsis: if gold: lbl = ls[gi] elif ls[0] is None and ls[1] is None: lbl = None elif ls[0] is None: lbl = ls[1] elif ls[1] is None: lbl = ls[0] else: lbl = l[0] * (l[0] == l[1]) else: raise ValueError('Could not parse visual_area argument') if ls[0] is not None: result['visual_area_1'] = ls[0] if ls[1] is not None: result['visual_area_2'] = ls[1] # Okay, now let's do some filtering; we clear weights as we go wgt = np.array(wgt) # Weight must be greater than the min if weight_min is not None: wgt[wgt < weight_min] = 0 # Visual areas must be in the mask lbl = None if lbl is None else np.array(lbl) if lbl is not None and visual_area_mask is not None: if pimms.is_int(visual_area_mask): visual_area_mask = [visual_area_mask] oomask = (0 == np.sum([lbl == va for va in visual_area_mask], axis=0)) wgt[oomask] = 0 lbl[oomask] = 0 if lbl is not None: result['visual_area'] = lbl # eccen must be in range if eccentricity_range is not None: er = eccentricity_range if pimms.is_real(er): er = (0,er) if gold: wgt[(es[gi] < er[0]) | (es[gi] > er[1])] = 0 else: wgt[(es[0] < er[0]) | (es[0] > er[1]) | (es[1] < er[0]) | (es[1] > er[1])] = 0 # angle must be in range if polar_angle_range is not None: pr = polar_angle_range if pimms.is_str(pr): pr = pr.lower() if pr in ['lh', 'rvf']: pr = ( 0, 180) elif pr in ['rh', 'lvf']: pr = (-180, 0) else: raise ValueError('unrecognized polar angle range argument: %s' % pr) if gold: wgt[(ps[gi] < pr[0]) | (ps[gi] > pr[1])] = 0 else: wgt[(ps[0] < pr[0]) | (ps[0] > pr[1]) | (ps[1] < pr[0]) | (ps[1] > pr[1])] = 0 # okay! Now we can add the weight into the result result['weight'] = wgt * zinv(np.sum(wgt)) # now we add a bunch of calculations we can perform on the data! # first: metrics of distance gsecc = es[gi] if gold else np.mean(es, axis=0) gsang = ps[gi] if gold else np.mean(ps, axis=0) gsrad = rs[gi] if gold else rs[0] if rs[1] is None else rs[1] if rs[0] is None else \ np.mean(rs, axis=0) gsecc_inv = zinv(gsecc) gsrad_inv = None if gsrad is None else zinv(gsrad) for (tag,resprop) in [('z', 'center'), ('polar_angle', 'polar_angle'), ('eccentricity', 'eccentricity'), ('x', 'x'), ('y', 'y')]: serr = result[tag + '_1'] - result[tag + '_2'] aerr = np.abs(serr) result[resprop + '_error'] = serr result[resprop + '_abs_error'] = aerr result[resprop + '_scaled_error'] = aerr * gsecc_inv if gsrad_inv is not None: result[resprop + '_radii_error'] = aerr * gsrad_inv return pimms.itable(result)
python
def retinotopy_comparison(arg1, arg2, arg3=None, eccentricity_range=None, polar_angle_range=None, visual_area_mask=None, weight=Ellipsis, weight_min=None, visual_area=Ellipsis, method='rmse', distance='scaled', gold=None): ''' retinotopy_comparison(dataset1, dataset2) yields a pimms itable comparing the two retinotopy datasets. retinotopy_error(obj, dataset1, dataset2) is equivalent to retinotopy_comparison(x, y) where x and y are retinotopy(obj, dataset1) and retinotopy_data(obj, dataset2). The datasets may be specified in a number of ways, some of which may be incompatible with certain options. The simplest way to specify a dataset is as a vector of complex numbers, which are taken to represent positions in the visual field with (a + bi) corresponding to the coordinate (a deg, b deg) in the visual field. Alternately, an n x 2 or 2 x n matrix will be interpreted as (polar angle, eccentricity) coordinates, in terms of visual degrees (see the as_retinotopy function: as_retinotopy(arg, 'visual') yields this input format). Alternately, the datasets may be mappings such as those retuend by the retinotopy_data function; in this case as_retinotopy is used to extract the visual coordinates (so they need not be specified in visual coordinates specifically in this case). In this last case, additional properties such as the variance explained and pRF size can be returned, making it valuable for more sophisticated error methods or distance metrics. The returned dataset will always have a row for each row in the two datasets (which must have the same number of rows). However, many rows may have a weight of 0 even if no weights were specified in the options; this is because other limitations may have been specified (such as in the eccentricity_range or visual_areas). The returned dataset will always contain the following columns: * 'weight' gives the weight assigned to this particular vertex; the weights will always sum to 1 unless all vertices have 0 weight. * 'polar_angle_1' and 'polar_angle_2', 'eccentricity_1', 'eccenticity_2', 'x_1', 'x_2', 'y_1', 'y_2', 'z_1', and 'z_2' all give the visual field coordinates in degrees; the z values give complex numbers equivalent to the x/y values. * 'radius_1' and 'radius_2' give the radii (sigma parameters) of the pRF gaussians. * 'polar_angle_error', 'eccentricity_error', and 'center_error' all give the difference between the visual field points in the two datasets; note that polar_angle_error in particular is an error measure of rotations around the visual field and not of visual field position. The 'center_error' is the distance between the centers of the visual field, in degrees. The 'radius_error' value is also given. * 'visual_area_1' and 'visual_area_2' specify the visual areas of the individual datasets; if either of the datasets did not have a visual area, it will be omitted. Additionally, the property 'visual_area' specifies the visual area suggested for use in analyses; this is chosen based on the following: (1) if there is a gold standard dataset specified that has a visual area, use it; (2) if only one of the datasets has a visual area, use it; (3) if both have a visual area, then use the (varea1 == varea2) * varea1 (the areas that agree are kept and all others are set to 0); (4) if neither has a visual area, then this property is omitted. In all cases where a 'visual_area' property is included, those vertices that do not overlap with the given visual_area_option option will be set to 0 along with the corresponding weights. * A variety of other lazily-calculated error metrics are included. The following options are accepted: * eccentricity_range (default: None) specifies the range of eccentricity to include in the calculation (in degrees). This may be specified as emax or (emin, emax). * polar_angle_range (default: None) specifies the range of polar angles to include in the calculation. Like eccentricity range it may be specified as (amin, amax) but amax alone is not allowed. Additionally the strings 'lh' and 'rvf' are equivalent to (0,180) and the strings 'rh' and 'lvf' are equivalent to (-180,0). * weight (default: Ellipsis) specifies the weights to be used in the calculation. This may be None to specify that no weights should be used, or a property name or an array of weight values. Alternately, it may be a tuple (w1, w2) of the weights for datasets 1 and 2. If the argument is Ellipsis, then it will use weights if they are found in the retinotopy dataset; both datasets may contain weights in which the product is used. * weight_min (default: None) specifies the minimum weight a vertex must have to be included in the calculation. * visual_area (default: Ellipsis) specifies the visual area labels to be used in the calculation. This may be None to specify that no labels should be used, or a property name or an array of labels. Alternately, it may be a tuple (l1, l2) of the labels for datasets 1 and 2. If the argument is Ellipsis, then it will use labels if they are found in the retinotopy dataset; both datasets may contain labels in which the gold standard's labels are used if there is a gold standard and the overlapping labels are used otherwise. * visual_area_mask (default: None) specifies a list of visual areas included in the calculation; this is applied to all datasets with a visual_area key; see the 'visual_area' columns above and the visual_area option. If None, then no visual areas are filtered; otherwise, arguments should like (1,2,3), which would usually specify that areas V1, V2, and V3, be included. * gold (default: None) specifies which dataset should be considered the gold standard; this should be either 1 or 2. If a gold-standard dataset is specified, then it is used in certain calculations; for example, when scaling an error by eccentricity, the gold-standard's eccentricity will be used unless there is no gold standard, in which case the mean of the two values are used. ''' if arg3 is not None: (obj, dsets) = (arg1, [retinotopy_data(arg1, aa) for aa in (arg2,arg3)]) else: (obj, dsets) = (None, [arg1, arg2]) (gi,gold) = (None,False) if not gold else (gold-1,True) # we'll build up this result as we go... result = {} # they must have a retinotopy representation: vis = [as_retinotopy(ds, 'visual') for ds in dsets] ps = (vis[0][0], vis[1][0]) es = (vis[0][1], vis[1][1]) rs = [ds['radius'] if 'radius' in ds else None for ds in dsets] for ii in (0,1): s = '_%d' % (ii + 1) (p,e) = (ps[ii],es[ii]) result['polar_angle' + s] = p result['eccentricity' + s] = e if rs[ii] is not None: result['radius' + s] = rs[ii] p = np.pi/180.0 * (90.0 - p) (x,y) = (e*np.cos(p), e*np.sin(p)) result['x' + s] = x result['y' + s] = y result['z' + s] = x + 1j * y n = len(ps[0]) # figure out the weight if pimms.is_vector(weight) and len(weight) == 2: ws = [(None if w is None else ds[w] if pimms.is_str(w) and w in ds else geo.to_property(obj, w)) for (w,ds) in zip(weight, dsets)] weight = Ellipsis else: ws = [next((ds[k] for k in ('weight','variance_explained') if k in ds), None) for ds in dsets] if pimms.is_vector(weight, 'real'): wgt = weight elif pimms.is_str(weight): if obj is None: raise ValueError('weight property name but no vertex-set given') wgt = geo.to_property(obj, weight) elif weight is Ellipsis: if gold: wgt = ws[gi] elif ws[0] is None and ws[1] is None: wgt = None elif ws[0] is None: wgt = ws[1] elif ws[1] is None: wgt = ws[0] else: wgt = ws[0] * ws[1] else: raise ValueError('Could not parse weight argument') if wgt is None: wgt = np.ones(n) if ws[0] is not None: result['weight_1'] = ws[0] if ws[1] is not None: result['weight_2'] = ws[1] # figure out the visual areas if is_tuple(visual_area) and len(visual_area) == 2: ls = [(None if l is None else ds[l] if pimms.is_str(l) and l in ds else geo.to_property(obj, l)) for (l,ds) in zip(visual_area, dsets)] visual_area = Ellipsis else: ls = [next((ds[k] for k in ('visual_area','label') if k in ds), None) for ds in dsets] if pimms.is_vector(visual_area): lbl = visual_area elif pimms.is_str(visual_area): if obj is None: raise ValueError('visual_area property name but no vertex-set given') lbl = geo.to_property(obj, visual_area) elif visual_area is None: lbl = None elif visual_area is Ellipsis: if gold: lbl = ls[gi] elif ls[0] is None and ls[1] is None: lbl = None elif ls[0] is None: lbl = ls[1] elif ls[1] is None: lbl = ls[0] else: lbl = l[0] * (l[0] == l[1]) else: raise ValueError('Could not parse visual_area argument') if ls[0] is not None: result['visual_area_1'] = ls[0] if ls[1] is not None: result['visual_area_2'] = ls[1] # Okay, now let's do some filtering; we clear weights as we go wgt = np.array(wgt) # Weight must be greater than the min if weight_min is not None: wgt[wgt < weight_min] = 0 # Visual areas must be in the mask lbl = None if lbl is None else np.array(lbl) if lbl is not None and visual_area_mask is not None: if pimms.is_int(visual_area_mask): visual_area_mask = [visual_area_mask] oomask = (0 == np.sum([lbl == va for va in visual_area_mask], axis=0)) wgt[oomask] = 0 lbl[oomask] = 0 if lbl is not None: result['visual_area'] = lbl # eccen must be in range if eccentricity_range is not None: er = eccentricity_range if pimms.is_real(er): er = (0,er) if gold: wgt[(es[gi] < er[0]) | (es[gi] > er[1])] = 0 else: wgt[(es[0] < er[0]) | (es[0] > er[1]) | (es[1] < er[0]) | (es[1] > er[1])] = 0 # angle must be in range if polar_angle_range is not None: pr = polar_angle_range if pimms.is_str(pr): pr = pr.lower() if pr in ['lh', 'rvf']: pr = ( 0, 180) elif pr in ['rh', 'lvf']: pr = (-180, 0) else: raise ValueError('unrecognized polar angle range argument: %s' % pr) if gold: wgt[(ps[gi] < pr[0]) | (ps[gi] > pr[1])] = 0 else: wgt[(ps[0] < pr[0]) | (ps[0] > pr[1]) | (ps[1] < pr[0]) | (ps[1] > pr[1])] = 0 # okay! Now we can add the weight into the result result['weight'] = wgt * zinv(np.sum(wgt)) # now we add a bunch of calculations we can perform on the data! # first: metrics of distance gsecc = es[gi] if gold else np.mean(es, axis=0) gsang = ps[gi] if gold else np.mean(ps, axis=0) gsrad = rs[gi] if gold else rs[0] if rs[1] is None else rs[1] if rs[0] is None else \ np.mean(rs, axis=0) gsecc_inv = zinv(gsecc) gsrad_inv = None if gsrad is None else zinv(gsrad) for (tag,resprop) in [('z', 'center'), ('polar_angle', 'polar_angle'), ('eccentricity', 'eccentricity'), ('x', 'x'), ('y', 'y')]: serr = result[tag + '_1'] - result[tag + '_2'] aerr = np.abs(serr) result[resprop + '_error'] = serr result[resprop + '_abs_error'] = aerr result[resprop + '_scaled_error'] = aerr * gsecc_inv if gsrad_inv is not None: result[resprop + '_radii_error'] = aerr * gsrad_inv return pimms.itable(result)
[ "def", "retinotopy_comparison", "(", "arg1", ",", "arg2", ",", "arg3", "=", "None", ",", "eccentricity_range", "=", "None", ",", "polar_angle_range", "=", "None", ",", "visual_area_mask", "=", "None", ",", "weight", "=", "Ellipsis", ",", "weight_min", "=", "...
retinotopy_comparison(dataset1, dataset2) yields a pimms itable comparing the two retinotopy datasets. retinotopy_error(obj, dataset1, dataset2) is equivalent to retinotopy_comparison(x, y) where x and y are retinotopy(obj, dataset1) and retinotopy_data(obj, dataset2). The datasets may be specified in a number of ways, some of which may be incompatible with certain options. The simplest way to specify a dataset is as a vector of complex numbers, which are taken to represent positions in the visual field with (a + bi) corresponding to the coordinate (a deg, b deg) in the visual field. Alternately, an n x 2 or 2 x n matrix will be interpreted as (polar angle, eccentricity) coordinates, in terms of visual degrees (see the as_retinotopy function: as_retinotopy(arg, 'visual') yields this input format). Alternately, the datasets may be mappings such as those retuend by the retinotopy_data function; in this case as_retinotopy is used to extract the visual coordinates (so they need not be specified in visual coordinates specifically in this case). In this last case, additional properties such as the variance explained and pRF size can be returned, making it valuable for more sophisticated error methods or distance metrics. The returned dataset will always have a row for each row in the two datasets (which must have the same number of rows). However, many rows may have a weight of 0 even if no weights were specified in the options; this is because other limitations may have been specified (such as in the eccentricity_range or visual_areas). The returned dataset will always contain the following columns: * 'weight' gives the weight assigned to this particular vertex; the weights will always sum to 1 unless all vertices have 0 weight. * 'polar_angle_1' and 'polar_angle_2', 'eccentricity_1', 'eccenticity_2', 'x_1', 'x_2', 'y_1', 'y_2', 'z_1', and 'z_2' all give the visual field coordinates in degrees; the z values give complex numbers equivalent to the x/y values. * 'radius_1' and 'radius_2' give the radii (sigma parameters) of the pRF gaussians. * 'polar_angle_error', 'eccentricity_error', and 'center_error' all give the difference between the visual field points in the two datasets; note that polar_angle_error in particular is an error measure of rotations around the visual field and not of visual field position. The 'center_error' is the distance between the centers of the visual field, in degrees. The 'radius_error' value is also given. * 'visual_area_1' and 'visual_area_2' specify the visual areas of the individual datasets; if either of the datasets did not have a visual area, it will be omitted. Additionally, the property 'visual_area' specifies the visual area suggested for use in analyses; this is chosen based on the following: (1) if there is a gold standard dataset specified that has a visual area, use it; (2) if only one of the datasets has a visual area, use it; (3) if both have a visual area, then use the (varea1 == varea2) * varea1 (the areas that agree are kept and all others are set to 0); (4) if neither has a visual area, then this property is omitted. In all cases where a 'visual_area' property is included, those vertices that do not overlap with the given visual_area_option option will be set to 0 along with the corresponding weights. * A variety of other lazily-calculated error metrics are included. The following options are accepted: * eccentricity_range (default: None) specifies the range of eccentricity to include in the calculation (in degrees). This may be specified as emax or (emin, emax). * polar_angle_range (default: None) specifies the range of polar angles to include in the calculation. Like eccentricity range it may be specified as (amin, amax) but amax alone is not allowed. Additionally the strings 'lh' and 'rvf' are equivalent to (0,180) and the strings 'rh' and 'lvf' are equivalent to (-180,0). * weight (default: Ellipsis) specifies the weights to be used in the calculation. This may be None to specify that no weights should be used, or a property name or an array of weight values. Alternately, it may be a tuple (w1, w2) of the weights for datasets 1 and 2. If the argument is Ellipsis, then it will use weights if they are found in the retinotopy dataset; both datasets may contain weights in which the product is used. * weight_min (default: None) specifies the minimum weight a vertex must have to be included in the calculation. * visual_area (default: Ellipsis) specifies the visual area labels to be used in the calculation. This may be None to specify that no labels should be used, or a property name or an array of labels. Alternately, it may be a tuple (l1, l2) of the labels for datasets 1 and 2. If the argument is Ellipsis, then it will use labels if they are found in the retinotopy dataset; both datasets may contain labels in which the gold standard's labels are used if there is a gold standard and the overlapping labels are used otherwise. * visual_area_mask (default: None) specifies a list of visual areas included in the calculation; this is applied to all datasets with a visual_area key; see the 'visual_area' columns above and the visual_area option. If None, then no visual areas are filtered; otherwise, arguments should like (1,2,3), which would usually specify that areas V1, V2, and V3, be included. * gold (default: None) specifies which dataset should be considered the gold standard; this should be either 1 or 2. If a gold-standard dataset is specified, then it is used in certain calculations; for example, when scaling an error by eccentricity, the gold-standard's eccentricity will be used unless there is no gold standard, in which case the mean of the two values are used.
[ "retinotopy_comparison", "(", "dataset1", "dataset2", ")", "yields", "a", "pimms", "itable", "comparing", "the", "two", "retinotopy", "datasets", ".", "retinotopy_error", "(", "obj", "dataset1", "dataset2", ")", "is", "equivalent", "to", "retinotopy_comparison", "("...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/vision/retinotopy.py#L1588-L1789
train
Returns a pimms itable comparing two datasets.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO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A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1032 - 984) + chr(581 - 470) + chr(0b110011) + chr(2037 - 1987) + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + '\x31' + chr(1574 - 1526), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(50) + '\065' + chr(48), 0b1000), nzTpIcepk0o8(chr(561 - 513) + chr(111) + '\063' + '\061' + chr(50), 65181 - 65173), nzTpIcepk0o8(chr(911 - 863) + chr(0b11001 + 0o126) + chr(0b110101) + chr(0b110000 + 0o4), 32161 - 32153), nzTpIcepk0o8(chr(0b10100 + 0o34) + '\157' + chr(51) + chr(362 - 312) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b1110 + 0o44) + chr(50) + '\062', 0o10), nzTpIcepk0o8('\x30' + chr(5328 - 5217) + chr(0b110001) + '\x35' + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b101 + 0o56) + chr(0b1110 + 0o46) + chr(51), 0b1000), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b1001111 + 0o40) + '\x31' + chr(0b110001) + chr(0b100110 + 0o21), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(8142 - 8031) + chr(0b110100) + '\x37', 0o10), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(0b1101111) + '\x31' + chr(1242 - 1187) + chr(0b110100), 58593 - 58585), nzTpIcepk0o8(chr(1995 - 1947) + '\x6f' + '\x34' + chr(2107 - 2054), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(1182 - 1130) + '\x36', 0b1000), nzTpIcepk0o8(chr(919 - 871) + chr(0b1001001 + 0o46) + chr(1735 - 1685) + chr(1916 - 1868) + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(50) + '\065', 0o10), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(0b111101 + 0o62) + '\x31' + chr(0b11100 + 0o24) + chr(1580 - 1532), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(5052 - 4941) + '\061' + chr(0b110001) + chr(48), 8), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1101111) + chr(0b1011 + 0o46) + '\066' + chr(1835 - 1783), 0o10), nzTpIcepk0o8(chr(1136 - 1088) + chr(0b10110 + 0o131) + chr(0b110011) + chr(0b110 + 0o61) + '\067', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b100100 + 0o22) + '\x37', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010 + 0o1) + '\061', 0o10), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(0b101110 + 0o101) + '\067' + chr(336 - 284), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\060', 0b1000), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\157' + chr(0b100010 + 0o17) + chr(0b110110) + chr(53), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + chr(679 - 630) + chr(905 - 850), 63699 - 63691), nzTpIcepk0o8('\x30' + '\157' + chr(50) + '\061' + chr(673 - 624), 0b1000), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(524 - 413) + chr(0b110111) + '\x30', 0b1000), nzTpIcepk0o8(chr(284 - 236) + '\x6f' + chr(0b10100 + 0o37) + chr(0b110111) + chr(0b11110 + 0o25), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010) + chr(1006 - 952) + '\x37', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001 + 0o2) + '\x33' + chr(0b110001), 24002 - 23994), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\157' + '\061' + chr(55) + chr(0b11101 + 0o24), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\062' + '\x33' + chr(727 - 677), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1571 - 1522) + chr(0b110110) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(9423 - 9312) + chr(0b110011) + chr(2904 - 2849) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + '\x32' + chr(53), 0b1000), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(7709 - 7598) + '\x33' + chr(51) + '\x32', 62670 - 62662), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(54), 0o10), nzTpIcepk0o8(chr(1141 - 1093) + chr(0b1101111) + chr(50) + chr(485 - 435) + chr(0b110011), 62202 - 62194), nzTpIcepk0o8(chr(1580 - 1532) + chr(0b100110 + 0o111) + chr(50) + '\x34' + '\x32', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x35' + chr(1283 - 1235), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xf9'), chr(0b1100100) + chr(101) + chr(3977 - 3878) + chr(0b101110 + 0o101) + chr(5363 - 5263) + '\145')('\165' + chr(0b101011 + 0o111) + chr(102) + chr(0b101101) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def v6lk4awN7d6m(texRk7K7b0aP, p4jAtrBdQIep, b1sPHHJghmx8=None, rJrkFr9k00bC=None, wmGCHLgyETp_=None, iOKs47934myq=None, iBxKYeMqq_Bt=RjQP07DYIdkf, Ln79tjAfkW3Z=None, sGYgOtU0jgXU=RjQP07DYIdkf, e5rcHW8hR5dL=roI3spqORKae(ES5oEprVxulp(b'\xa5%\xdb\xaf'), chr(0b1100100) + chr(4923 - 4822) + chr(99) + chr(0b111010 + 0o65) + '\x64' + chr(101))('\165' + '\x74' + chr(10035 - 9933) + chr(0b101101) + chr(0b111000)), cWxJ9qIyBuTI=roI3spqORKae(ES5oEprVxulp(b'\xa4+\xc9\xa6I\xb0'), '\x64' + chr(9223 - 9122) + chr(961 - 862) + chr(10031 - 9920) + chr(3071 - 2971) + chr(101))(chr(4920 - 4803) + chr(116) + chr(3275 - 3173) + '\055' + chr(56)), tJ8QbGBe3yju=None): if b1sPHHJghmx8 is not None: (kIMfkyypPTcC, DRcpD46Irqn1) = (texRk7K7b0aP, [CTw69XTnIqxx(texRk7K7b0aP, fy6epjHXMeZ_) for fy6epjHXMeZ_ in (p4jAtrBdQIep, b1sPHHJghmx8)]) else: (kIMfkyypPTcC, DRcpD46Irqn1) = (None, [texRk7K7b0aP, p4jAtrBdQIep]) (dR2f6t670coL, tJ8QbGBe3yju) = (None, nzTpIcepk0o8('\x30' + '\x6f' + '\x30', 8)) if not tJ8QbGBe3yju else (tJ8QbGBe3yju - nzTpIcepk0o8(chr(2092 - 2044) + chr(834 - 723) + chr(0b110001), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061', 8)) POx95m7SPOVy = {} boGS5qf78vC1 = [q6MpE4pm_hbK(whH1_Jq0RGiI, roI3spqORKae(ES5oEprVxulp(b'\xa1!\xdb\xbfM\xb8'), '\x64' + chr(6546 - 6445) + chr(0b1100011) + chr(111) + chr(0b10010 + 0o122) + chr(1127 - 1026))(chr(117) + chr(7997 - 7881) + chr(0b111111 + 0o47) + chr(0b1110 + 0o37) + chr(56))) for whH1_Jq0RGiI in DRcpD46Irqn1] gh5RZvFlfJ36 = (boGS5qf78vC1[nzTpIcepk0o8('\060' + '\157' + chr(0b11101 + 0o23), 8)][nzTpIcepk0o8(chr(279 - 231) + '\x6f' + chr(0b1 + 0o57), 8)], boGS5qf78vC1[nzTpIcepk0o8('\060' + '\157' + '\x31', 8)][nzTpIcepk0o8('\060' + chr(111) + '\x30', 8)]) FvMIJ0iZPnr4 = (boGS5qf78vC1[nzTpIcepk0o8('\060' + chr(111) + chr(1118 - 1070), 8)][nzTpIcepk0o8('\060' + chr(0b1001 + 0o146) + '\061', 8)], boGS5qf78vC1[nzTpIcepk0o8('\x30' + chr(2261 - 2150) + chr(0b110001), 8)][nzTpIcepk0o8('\x30' + chr(12242 - 12131) + chr(0b110001), 8)]) HI6BdQqJMt95 = [whH1_Jq0RGiI[roI3spqORKae(ES5oEprVxulp(b'\xa5)\xcc\xa3Y\xa7'), chr(100) + chr(0b1100101) + '\x63' + '\157' + chr(0b1100100) + '\145')('\x75' + '\164' + chr(0b1100110) + chr(0b101101) + chr(56))] if roI3spqORKae(ES5oEprVxulp(b'\xa5)\xcc\xa3Y\xa7'), chr(0b1100100) + chr(101) + chr(99) + chr(4099 - 3988) + chr(3775 - 3675) + '\x65')(chr(117) + chr(116) + chr(102) + chr(457 - 412) + chr(0b111000)) in whH1_Jq0RGiI else None for whH1_Jq0RGiI in DRcpD46Irqn1] for p8Ou2emaDF7Z in (nzTpIcepk0o8(chr(48) + chr(0b1101110 + 0o1) + chr(48), 8), nzTpIcepk0o8(chr(48) + chr(7116 - 7005) + '\x31', 8)): PmE5_h409JAA = roI3spqORKae(ES5oEprVxulp(b'\x88m\xcc'), chr(100) + chr(0b1000101 + 0o40) + '\x63' + chr(0b110100 + 0o73) + chr(6800 - 6700) + '\145')('\x75' + '\164' + chr(102) + chr(782 - 737) + chr(0b111000)) % (p8Ou2emaDF7Z + nzTpIcepk0o8('\060' + chr(1763 - 1652) + chr(0b111 + 0o52), 8)) (fSdw5wwLo9MO, wgf0sgcu_xPL) = (gh5RZvFlfJ36[p8Ou2emaDF7Z], FvMIJ0iZPnr4[p8Ou2emaDF7Z]) POx95m7SPOVy[roI3spqORKae(ES5oEprVxulp(b"\xa7'\xc4\xab^\x8b\xf3\x03\x84#B"), chr(9497 - 9397) + chr(0b1100101) + chr(0b100000 + 0o103) + chr(0b1101111) + '\x64' + '\x65')('\x75' + chr(116) + chr(102) + chr(0b1110 + 0o37) + '\x38') + PmE5_h409JAA] = fSdw5wwLo9MO POx95m7SPOVy[roI3spqORKae(ES5oEprVxulp(b'\xb2+\xcb\xafB\xa0\xe0\x04\x80&S\x05'), chr(0b1100100) + chr(101) + chr(0b1001110 + 0o25) + chr(111) + chr(0b11001 + 0o113) + chr(101))('\x75' + chr(0b1011100 + 0o30) + '\146' + chr(0b101101) + chr(0b101110 + 0o12)) + PmE5_h409JAA] = wgf0sgcu_xPL if HI6BdQqJMt95[p8Ou2emaDF7Z] is not None: POx95m7SPOVy[roI3spqORKae(ES5oEprVxulp(b'\xa5)\xcc\xa3Y\xa7'), chr(0b1100100) + chr(0b101110 + 0o67) + '\143' + chr(0b1011101 + 0o22) + '\144' + chr(0b111110 + 0o47))('\165' + '\x74' + chr(102) + chr(607 - 562) + chr(0b100100 + 0o24)) + PmE5_h409JAA] = HI6BdQqJMt95[p8Ou2emaDF7Z] fSdw5wwLo9MO = nDF4gVNx0u9Q.nMrXkRpTQ9Oo / 180.0 * (90.0 - fSdw5wwLo9MO) (bI5jsQ9OkQtj, Fi3yzxctM1zW) = (wgf0sgcu_xPL * nDF4gVNx0u9Q.mLriLohwQ9NU(fSdw5wwLo9MO), wgf0sgcu_xPL * nDF4gVNx0u9Q.TMleLVztqSLZ(fSdw5wwLo9MO)) POx95m7SPOVy[roI3spqORKae(ES5oEprVxulp(b'\xaf'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(101))('\x75' + '\164' + '\x66' + '\x2d' + chr(0b111000)) + PmE5_h409JAA] = bI5jsQ9OkQtj POx95m7SPOVy[roI3spqORKae(ES5oEprVxulp(b'\xae'), chr(0b1011000 + 0o14) + chr(0b1100101) + chr(99) + chr(4796 - 4685) + chr(0b1100100) + '\x65')('\x75' + chr(0b1001111 + 0o45) + chr(0b1100110) + chr(0b101101) + chr(2613 - 2557)) + PmE5_h409JAA] = Fi3yzxctM1zW POx95m7SPOVy[roI3spqORKae(ES5oEprVxulp(b'\xad'), chr(0b111010 + 0o52) + chr(101) + '\x63' + '\x6f' + chr(9341 - 9241) + chr(101))(chr(11708 - 11591) + '\164' + chr(5335 - 5233) + chr(1240 - 1195) + '\x38') + PmE5_h409JAA] = bI5jsQ9OkQtj + 1j * Fi3yzxctM1zW NoZxuO7wjArS = ftfygxgFas5X(gh5RZvFlfJ36[nzTpIcepk0o8(chr(48) + chr(111) + '\060', 8)]) if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xbe;\xf7\xbcI\xb7\xe6\x02\x91'), chr(100) + '\145' + chr(99) + '\x6f' + chr(100) + chr(101))(chr(0b1110101) + chr(12995 - 12879) + chr(0b1100110) + '\055' + chr(0b111000)))(iBxKYeMqq_Bt) and ftfygxgFas5X(iBxKYeMqq_Bt) == nzTpIcepk0o8('\x30' + '\157' + chr(76 - 26), 0b1000): i_EO7JFAVLSs = [None if sm7_CLmeWGR7 is None else whH1_Jq0RGiI[sm7_CLmeWGR7] if zAgo8354IlJ7.is_str(sm7_CLmeWGR7) and sm7_CLmeWGR7 in whH1_Jq0RGiI else GZNMH8A4U3yp.to_property(kIMfkyypPTcC, sm7_CLmeWGR7) for (sm7_CLmeWGR7, whH1_Jq0RGiI) in TxMFWa_Xzviv(iBxKYeMqq_Bt, DRcpD46Irqn1)] iBxKYeMqq_Bt = RjQP07DYIdkf else: i_EO7JFAVLSs = [ltB3XhPy2rYf((whH1_Jq0RGiI[B6UAF1zReOyJ] for B6UAF1zReOyJ in (roI3spqORKae(ES5oEprVxulp(b'\xa0-\xc1\xadD\xa0'), chr(0b111101 + 0o47) + chr(0b1100101) + chr(4948 - 4849) + '\157' + chr(0b1100010 + 0o2) + chr(0b1100101))('\165' + chr(116) + chr(102) + chr(0b100110 + 0o7) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xa1)\xda\xa3M\xba\xf1\x08\xbc*_\x0cIG\xe9{%,'), chr(0b111100 + 0o50) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(8144 - 8044) + '\145')('\x75' + '\164' + chr(0b10011 + 0o123) + chr(1023 - 978) + '\070')) if B6UAF1zReOyJ in whH1_Jq0RGiI), None) for whH1_Jq0RGiI in DRcpD46Irqn1] if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xbe;\xf7\xbcI\xb7\xe6\x02\x91'), '\x64' + '\145' + '\x63' + chr(8417 - 8306) + '\144' + '\x65')(chr(0b1000001 + 0o64) + '\x74' + chr(102) + chr(0b101101) + chr(0b110 + 0o62)))(iBxKYeMqq_Bt, roI3spqORKae(ES5oEprVxulp(b'\xa5-\xc9\xa6'), chr(100) + chr(0b1000110 + 0o37) + chr(8874 - 8775) + chr(111) + '\x64' + '\145')(chr(117) + '\164' + chr(0b1011101 + 0o11) + chr(1469 - 1424) + '\070')): xmp6v1QmXZwR = iBxKYeMqq_Bt elif roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xbe;\xf7\xb9X\xa6'), chr(0b101101 + 0o67) + '\145' + chr(0b111110 + 0o45) + '\x6f' + chr(0b1100100) + chr(0b1101 + 0o130))('\x75' + '\164' + chr(9579 - 9477) + chr(45) + '\070'))(iBxKYeMqq_Bt): if kIMfkyypPTcC is None: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xa0-\xc1\xadD\xa0\xb2\x1d\x91 W\x19WR\xf95.)\x19\x9a\x17{ItU\xe1\xe6\x18\x8d\xd2\xab\r\xff\t\xd7\xe6\xbfr\xb3\xc5\xbe>\xcd\xa4'), chr(0b101011 + 0o71) + chr(0b1100101) + chr(0b1100011) + '\157' + chr(0b11011 + 0o111) + '\145')(chr(0b1110101) + chr(0b101000 + 0o114) + '\146' + '\055' + chr(0b11 + 0o65))) xmp6v1QmXZwR = GZNMH8A4U3yp.to_property(kIMfkyypPTcC, iBxKYeMqq_Bt) elif iBxKYeMqq_Bt is RjQP07DYIdkf: if tJ8QbGBe3yju: xmp6v1QmXZwR = i_EO7JFAVLSs[dR2f6t670coL] elif i_EO7JFAVLSs[nzTpIcepk0o8(chr(1798 - 1750) + chr(111) + chr(48), 8)] is None and i_EO7JFAVLSs[nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31', 8)] is None: xmp6v1QmXZwR = None elif i_EO7JFAVLSs[nzTpIcepk0o8(chr(396 - 348) + chr(111) + '\060', 8)] is None: xmp6v1QmXZwR = i_EO7JFAVLSs[nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b11011 + 0o26), 8)] elif i_EO7JFAVLSs[nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(5014 - 4903) + chr(49), 8)] is None: xmp6v1QmXZwR = i_EO7JFAVLSs[nzTpIcepk0o8(chr(1066 - 1018) + chr(111) + chr(48), 8)] else: xmp6v1QmXZwR = i_EO7JFAVLSs[nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x30', 8)] * i_EO7JFAVLSs[nzTpIcepk0o8('\x30' + '\157' + chr(0b101110 + 0o3), 8)] else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b"\x94'\xdd\xa6H\xf4\xfc\x02\x97oW\x1dWU\xe557-\x1d\x98_m\x1ca\x07\xe8\xfcU\x9e\xd9\xad"), chr(100) + chr(101) + chr(99) + chr(111) + chr(0b1100100) + chr(0b0 + 0o145))(chr(0b1110101) + chr(7722 - 7606) + chr(102) + chr(45) + '\x38')) if xmp6v1QmXZwR is None: xmp6v1QmXZwR = nDF4gVNx0u9Q.rYPkZ8_2D0X1(NoZxuO7wjArS) if i_EO7JFAVLSs[nzTpIcepk0o8('\060' + chr(10330 - 10219) + '\060', 8)] is not None: POx95m7SPOVy[roI3spqORKae(ES5oEprVxulp(b'\xa0-\xc1\xadD\xa0\xcd\\'), chr(0b1011 + 0o131) + chr(6699 - 6598) + chr(0b1100011) + chr(0b1101111) + chr(0b101011 + 0o71) + chr(3824 - 3723))(chr(117) + '\x74' + chr(6643 - 6541) + '\x2d' + chr(56))] = i_EO7JFAVLSs[nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b11101 + 0o23), 8)] if i_EO7JFAVLSs[nzTpIcepk0o8(chr(48) + chr(111) + chr(1542 - 1493), 8)] is not None: POx95m7SPOVy[roI3spqORKae(ES5oEprVxulp(b'\xa0-\xc1\xadD\xa0\xcd_'), '\144' + chr(0b1100101) + chr(0b1101 + 0o126) + chr(0b1101111) + '\x64' + '\x65')(chr(117) + chr(0b1100000 + 0o24) + chr(0b111111 + 0o47) + chr(1442 - 1397) + '\070')] = i_EO7JFAVLSs[nzTpIcepk0o8('\060' + '\x6f' + '\x31', 8)] if kBeKB4Df6Zrm(sGYgOtU0jgXU) and ftfygxgFas5X(sGYgOtU0jgXU) == nzTpIcepk0o8(chr(1424 - 1376) + '\x6f' + '\062', 8): l6PDAoAbh2Y9 = [None if fPrVrKACaFCC is None else whH1_Jq0RGiI[fPrVrKACaFCC] if zAgo8354IlJ7.is_str(fPrVrKACaFCC) and fPrVrKACaFCC in whH1_Jq0RGiI else GZNMH8A4U3yp.to_property(kIMfkyypPTcC, fPrVrKACaFCC) for (fPrVrKACaFCC, whH1_Jq0RGiI) in TxMFWa_Xzviv(sGYgOtU0jgXU, DRcpD46Irqn1)] sGYgOtU0jgXU = RjQP07DYIdkf else: l6PDAoAbh2Y9 = [ltB3XhPy2rYf((whH1_Jq0RGiI[B6UAF1zReOyJ] for B6UAF1zReOyJ in (roI3spqORKae(ES5oEprVxulp(b'\xa1!\xdb\xbfM\xb8\xcd\x0c\x91*F'), '\144' + chr(9531 - 9430) + chr(0b1100010 + 0o1) + chr(111) + '\x64' + '\145')('\165' + '\164' + chr(9724 - 9622) + chr(0b100100 + 0o11) + chr(1921 - 1865)), roI3spqORKae(ES5oEprVxulp(b'\xbb)\xca\xaf@'), '\x64' + chr(101) + chr(99) + chr(0b100011 + 0o114) + '\x64' + chr(101))('\165' + '\164' + '\146' + chr(0b10000 + 0o35) + '\070')) if B6UAF1zReOyJ in whH1_Jq0RGiI), None) for whH1_Jq0RGiI in DRcpD46Irqn1] if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xbe;\xf7\xbcI\xb7\xe6\x02\x91'), '\144' + chr(3405 - 3304) + chr(0b111000 + 0o53) + chr(0b1011010 + 0o25) + chr(100) + '\x65')(chr(5914 - 5797) + chr(116) + chr(0b10010 + 0o124) + '\x2d' + chr(0b111000)))(sGYgOtU0jgXU): aYHSBMjZouVV = sGYgOtU0jgXU elif roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xbe;\xf7\xb9X\xa6'), '\x64' + '\145' + '\143' + chr(3121 - 3010) + chr(0b1100100) + '\x65')('\165' + chr(0b101111 + 0o105) + chr(0b101101 + 0o71) + '\x2d' + chr(56)))(sGYgOtU0jgXU): if kIMfkyypPTcC is None: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xa1!\xdb\xbfM\xb8\xcd\x0c\x91*F\\UT\xefe%:\x00\x86\x17w]m\x10\xaf\xebM\x8f\x97\xb7\x16\xba\x07\x9f\xe7\xaec\xeb\x8f\xa4-\xdc\xeaK\xbd\xe4\x08\x8d'), '\x64' + chr(4628 - 4527) + chr(4876 - 4777) + '\x6f' + '\144' + chr(0b10 + 0o143))(chr(2120 - 2003) + '\x74' + chr(102) + chr(45) + chr(56))) aYHSBMjZouVV = GZNMH8A4U3yp.to_property(kIMfkyypPTcC, sGYgOtU0jgXU) elif sGYgOtU0jgXU is None: aYHSBMjZouVV = None elif sGYgOtU0jgXU is RjQP07DYIdkf: if tJ8QbGBe3yju: aYHSBMjZouVV = l6PDAoAbh2Y9[dR2f6t670coL] elif l6PDAoAbh2Y9[nzTpIcepk0o8(chr(48) + chr(0b111001 + 0o66) + chr(0b11010 + 0o26), 8)] is None and l6PDAoAbh2Y9[nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061', 8)] is None: aYHSBMjZouVV = None elif l6PDAoAbh2Y9[nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(48), 8)] is None: aYHSBMjZouVV = l6PDAoAbh2Y9[nzTpIcepk0o8('\060' + '\157' + '\x31', 8)] elif l6PDAoAbh2Y9[nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1460 - 1411), 8)] is None: aYHSBMjZouVV = l6PDAoAbh2Y9[nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(2088 - 1977) + chr(0b11010 + 0o26), 8)] else: aYHSBMjZouVV = fPrVrKACaFCC[nzTpIcepk0o8(chr(0b110000) + chr(0b1001100 + 0o43) + '\060', 8)] * (fPrVrKACaFCC[nzTpIcepk0o8(chr(1204 - 1156) + chr(111) + '\060', 8)] == fPrVrKACaFCC[nzTpIcepk0o8('\x30' + '\157' + chr(0b110001), 8)]) else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b"\x94'\xdd\xa6H\xf4\xfc\x02\x97oW\x1dWU\xe556!\x07\x8aVuca\x07\xea\xe8\x18\x9a\xc5\xbe\x0c\xf7\x14\x94\xe1"), '\144' + '\x65' + chr(99) + chr(0b1101111) + '\144' + '\x65')(chr(212 - 95) + chr(6088 - 5972) + chr(102) + '\x2d' + chr(2273 - 2217))) if l6PDAoAbh2Y9[nzTpIcepk0o8(chr(0b110000) + chr(0b1100101 + 0o12) + chr(48), 8)] is not None: POx95m7SPOVy[roI3spqORKae(ES5oEprVxulp(b'\xa1!\xdb\xbfM\xb8\xcd\x0c\x91*F#\x14'), chr(1587 - 1487) + '\145' + chr(99) + chr(11118 - 11007) + '\144' + '\x65')(chr(0b110101 + 0o100) + '\164' + chr(3534 - 3432) + chr(0b11001 + 0o24) + '\070')] = l6PDAoAbh2Y9[nzTpIcepk0o8(chr(2238 - 2190) + chr(8193 - 8082) + chr(48), 8)] if l6PDAoAbh2Y9[nzTpIcepk0o8('\x30' + '\x6f' + '\x31', 8)] is not None: POx95m7SPOVy[roI3spqORKae(ES5oEprVxulp(b'\xa1!\xdb\xbfM\xb8\xcd\x0c\x91*F#\x17'), chr(0b1000001 + 0o43) + '\x65' + chr(0b1100011) + '\157' + '\x64' + chr(627 - 526))(chr(0b1110101) + chr(116) + '\x66' + chr(1887 - 1842) + chr(0b111000))] = l6PDAoAbh2Y9[nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1010 + 0o47), 8)] xmp6v1QmXZwR = nDF4gVNx0u9Q.Tn6rGr7XTM7t(xmp6v1QmXZwR) if Ln79tjAfkW3Z is not None: xmp6v1QmXZwR[xmp6v1QmXZwR < Ln79tjAfkW3Z] = nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110000), 8) aYHSBMjZouVV = None if aYHSBMjZouVV is None else nDF4gVNx0u9Q.Tn6rGr7XTM7t(aYHSBMjZouVV) if aYHSBMjZouVV is not None and iOKs47934myq is not None: if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xbe;\xf7\xa3B\xa0'), '\144' + chr(0b1100101) + chr(0b1000011 + 0o40) + chr(0b1001000 + 0o47) + '\144' + chr(0b1010010 + 0o23))('\165' + '\x74' + chr(102) + chr(0b11 + 0o52) + '\x38'))(iOKs47934myq): iOKs47934myq = [iOKs47934myq] D4U2y3B8cDX0 = nzTpIcepk0o8('\x30' + chr(5551 - 5440) + chr(0b1100 + 0o44), 8) == nDF4gVNx0u9Q.oclC8DLjA_lV([aYHSBMjZouVV == FJQ1vd_iil9s for FJQ1vd_iil9s in iOKs47934myq], axis=nzTpIcepk0o8(chr(48) + '\157' + chr(48), 8)) xmp6v1QmXZwR[D4U2y3B8cDX0] = nzTpIcepk0o8(chr(712 - 664) + chr(10727 - 10616) + '\x30', 8) aYHSBMjZouVV[D4U2y3B8cDX0] = nzTpIcepk0o8(chr(2099 - 2051) + chr(5568 - 5457) + chr(48), 8) if aYHSBMjZouVV is not None: POx95m7SPOVy[roI3spqORKae(ES5oEprVxulp(b'\xa1!\xdb\xbfM\xb8\xcd\x0c\x91*F'), chr(0b1100100) + chr(101) + chr(99) + chr(111) + chr(0b1100100) + chr(0b110110 + 0o57))(chr(117) + chr(0b1011011 + 0o31) + '\x66' + chr(1945 - 1900) + chr(0b100001 + 0o27))] = aYHSBMjZouVV if rJrkFr9k00bC is not None: QU7kIa1BaEeN = rJrkFr9k00bC if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xbe;\xf7\xb8I\xb5\xfe'), '\x64' + chr(0b1010100 + 0o21) + chr(99) + '\x6f' + chr(849 - 749) + '\x65')('\x75' + chr(7574 - 7458) + chr(5512 - 5410) + chr(0b101101) + '\070'))(QU7kIa1BaEeN): QU7kIa1BaEeN = (nzTpIcepk0o8(chr(1668 - 1620) + chr(111) + '\x30', 8), QU7kIa1BaEeN) if tJ8QbGBe3yju: xmp6v1QmXZwR[(FvMIJ0iZPnr4[dR2f6t670coL] < QU7kIa1BaEeN[nzTpIcepk0o8(chr(197 - 149) + chr(111) + chr(48), 8)]) | (FvMIJ0iZPnr4[dR2f6t670coL] > QU7kIa1BaEeN[nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001), 8)])] = nzTpIcepk0o8(chr(524 - 476) + chr(111) + chr(48), 8) else: xmp6v1QmXZwR[(FvMIJ0iZPnr4[nzTpIcepk0o8(chr(1348 - 1300) + '\x6f' + chr(929 - 881), 8)] < QU7kIa1BaEeN[nzTpIcepk0o8(chr(48) + chr(0b1001101 + 0o42) + '\x30', 8)]) | (FvMIJ0iZPnr4[nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(0b1000001 + 0o56) + chr(48), 8)] > QU7kIa1BaEeN[nzTpIcepk0o8('\x30' + chr(0b11101 + 0o122) + chr(0b110001), 8)]) | (FvMIJ0iZPnr4[nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b100010 + 0o17), 8)] < QU7kIa1BaEeN[nzTpIcepk0o8('\060' + chr(5502 - 5391) + '\060', 8)]) | (FvMIJ0iZPnr4[nzTpIcepk0o8(chr(903 - 855) + chr(0b1100000 + 0o17) + chr(0b110001), 8)] > QU7kIa1BaEeN[nzTpIcepk0o8(chr(332 - 284) + chr(0b100101 + 0o112) + chr(1508 - 1459), 8)])] = nzTpIcepk0o8(chr(917 - 869) + chr(0b1101111) + chr(48), 8) if wmGCHLgyETp_ is not None: FRkhMNj4RQb_ = wmGCHLgyETp_ if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xbe;\xf7\xb9X\xa6'), chr(0b1001000 + 0o34) + chr(101) + chr(0b1100011) + chr(0b1001001 + 0o46) + '\144' + '\x65')('\x75' + chr(0b1100010 + 0o22) + '\146' + chr(0b11100 + 0o21) + chr(0b1000 + 0o60)))(FRkhMNj4RQb_): FRkhMNj4RQb_ = FRkhMNj4RQb_.Xn8ENWMZdIRt() if FRkhMNj4RQb_ in [roI3spqORKae(ES5oEprVxulp(b'\xbb '), chr(0b1100100) + chr(0b1100101) + chr(4005 - 3906) + chr(0b1101111) + chr(100) + chr(5032 - 4931))('\x75' + chr(116) + '\146' + '\055' + chr(3044 - 2988)), roI3spqORKae(ES5oEprVxulp(b'\xa5>\xce'), chr(100) + chr(0b10100 + 0o121) + '\143' + chr(6099 - 5988) + chr(7742 - 7642) + chr(0b10110 + 0o117))(chr(11645 - 11528) + '\164' + chr(1237 - 1135) + chr(0b11 + 0o52) + chr(0b111000))]: FRkhMNj4RQb_ = (nzTpIcepk0o8(chr(0b10010 + 0o36) + '\x6f' + chr(48), 8), nzTpIcepk0o8('\x30' + chr(7847 - 7736) + chr(0b110010) + chr(54) + '\x34', 0b1000)) elif FRkhMNj4RQb_ in [roI3spqORKae(ES5oEprVxulp(b'\xa5 '), chr(2001 - 1901) + chr(0b1111 + 0o126) + chr(0b1100011) + chr(0b1101111) + '\x64' + '\x65')('\165' + chr(0b1110100) + chr(0b1100110) + chr(45) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\xbb>\xce'), '\x64' + '\145' + chr(0b1100011) + chr(0b1101111) + chr(4489 - 4389) + '\145')('\x75' + chr(116) + chr(102) + '\055' + '\070')]: FRkhMNj4RQb_ = (-nzTpIcepk0o8('\060' + chr(0b11000 + 0o127) + chr(0b1000 + 0o52) + chr(0b100000 + 0o26) + chr(904 - 852), 8), nzTpIcepk0o8('\x30' + chr(0b11010 + 0o125) + '\x30', 8)) else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xa2&\xda\xafO\xbb\xf5\x03\x8a5B\x18\x05V\xefy!:T\x9eY~PeU\xfd\xe8V\x9c\xd2\xf9\x18\xe8\x16\x8f\xf8\xbfh\xe7\x98\xf7m\xdb'), chr(1648 - 1548) + chr(8110 - 8009) + chr(0b11101 + 0o106) + chr(10759 - 10648) + '\144' + chr(101))('\165' + chr(0b1110100) + chr(2753 - 2651) + chr(45) + chr(2653 - 2597)) % FRkhMNj4RQb_) if tJ8QbGBe3yju: xmp6v1QmXZwR[(gh5RZvFlfJ36[dR2f6t670coL] < FRkhMNj4RQb_[nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\060', 8)]) | (gh5RZvFlfJ36[dR2f6t670coL] > FRkhMNj4RQb_[nzTpIcepk0o8(chr(0b1100 + 0o44) + '\157' + chr(0b101000 + 0o11), 8)])] = nzTpIcepk0o8('\x30' + chr(111) + chr(0b110000), 8) else: xmp6v1QmXZwR[(gh5RZvFlfJ36[nzTpIcepk0o8(chr(0b111 + 0o51) + chr(0b1100111 + 0o10) + '\x30', 8)] < FRkhMNj4RQb_[nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(0b11011 + 0o124) + chr(0b110000), 8)]) | (gh5RZvFlfJ36[nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(10930 - 10819) + chr(0b110000 + 0o0), 8)] > FRkhMNj4RQb_[nzTpIcepk0o8('\x30' + chr(0b101101 + 0o102) + chr(0b1101 + 0o44), 8)]) | (gh5RZvFlfJ36[nzTpIcepk0o8(chr(0b100111 + 0o11) + '\157' + chr(0b111 + 0o52), 8)] < FRkhMNj4RQb_[nzTpIcepk0o8(chr(245 - 197) + chr(8942 - 8831) + '\060', 8)]) | (gh5RZvFlfJ36[nzTpIcepk0o8(chr(0b11011 + 0o25) + '\157' + chr(0b110001), 8)] > FRkhMNj4RQb_[nzTpIcepk0o8(chr(329 - 281) + '\157' + chr(49), 8)])] = nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b11010 + 0o26), 8) POx95m7SPOVy[roI3spqORKae(ES5oEprVxulp(b'\xa0-\xc1\xadD\xa0'), chr(0b1010100 + 0o20) + chr(0b1100101) + chr(0b1100011) + chr(8732 - 8621) + '\144' + chr(0b1100101))('\x75' + chr(0b1110100) + chr(0b11001 + 0o115) + chr(45) + chr(785 - 729))] = xmp6v1QmXZwR * a4E8KpNcqtD5(nDF4gVNx0u9Q.oclC8DLjA_lV(xmp6v1QmXZwR)) yFnNVXKoKS4i = FvMIJ0iZPnr4[dR2f6t670coL] if tJ8QbGBe3yju else nDF4gVNx0u9Q.JE1frtxECu3x(FvMIJ0iZPnr4, axis=nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110000), 8)) zbhwTczJ1nNq = gh5RZvFlfJ36[dR2f6t670coL] if tJ8QbGBe3yju else nDF4gVNx0u9Q.JE1frtxECu3x(gh5RZvFlfJ36, axis=nzTpIcepk0o8(chr(1798 - 1750) + chr(111) + chr(48), 8)) SrvVXq2owEIB = HI6BdQqJMt95[dR2f6t670coL] if tJ8QbGBe3yju else HI6BdQqJMt95[nzTpIcepk0o8('\060' + chr(0b1101111) + '\x30', 8)] if HI6BdQqJMt95[nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31', 8)] is None else HI6BdQqJMt95[nzTpIcepk0o8('\060' + chr(111) + chr(0b101110 + 0o3), 8)] if HI6BdQqJMt95[nzTpIcepk0o8(chr(1638 - 1590) + chr(3985 - 3874) + chr(0b110000), 8)] is None else nDF4gVNx0u9Q.JE1frtxECu3x(HI6BdQqJMt95, axis=nzTpIcepk0o8('\x30' + '\157' + '\x30', 8)) rNYDoPRL02dn = a4E8KpNcqtD5(yFnNVXKoKS4i) wVQZf_PlNoIU = None if SrvVXq2owEIB is None else a4E8KpNcqtD5(SrvVXq2owEIB) for (A0gVABhHjc3L, OSAM9ilb2t5B) in [(roI3spqORKae(ES5oEprVxulp(b'\xad'), chr(0b1000110 + 0o36) + '\x65' + '\x63' + chr(2370 - 2259) + '\144' + chr(0b1010 + 0o133))(chr(0b1110101) + '\x74' + '\146' + chr(0b100101 + 0o10) + '\070'), roI3spqORKae(ES5oEprVxulp(b'\xb4-\xc6\xbeI\xa6'), '\144' + chr(0b1100101) + chr(0b1000000 + 0o43) + chr(0b1101111) + chr(0b1000110 + 0o36) + '\145')('\x75' + chr(0b1000100 + 0o60) + chr(0b110111 + 0o57) + chr(0b10110 + 0o27) + chr(814 - 758))), (roI3spqORKae(ES5oEprVxulp(b"\xa7'\xc4\xab^\x8b\xf3\x03\x84#B"), chr(0b100000 + 0o104) + chr(0b11010 + 0o113) + chr(0b1100011) + chr(11034 - 10923) + chr(100) + chr(0b1000000 + 0o45))('\165' + chr(116) + '\x66' + chr(45) + chr(1133 - 1077)), roI3spqORKae(ES5oEprVxulp(b"\xa7'\xc4\xab^\x8b\xf3\x03\x84#B"), '\144' + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(0b101101 + 0o67) + chr(101))('\x75' + '\x74' + chr(9942 - 9840) + chr(45) + chr(0b111000))), (roI3spqORKae(ES5oEprVxulp(b'\xb2+\xcb\xafB\xa0\xe0\x04\x80&S\x05'), '\144' + chr(101) + chr(7700 - 7601) + chr(3696 - 3585) + '\144' + chr(0b1001111 + 0o26))(chr(9345 - 9228) + chr(355 - 239) + chr(102) + '\055' + chr(0b111000 + 0o0)), roI3spqORKae(ES5oEprVxulp(b'\xb2+\xcb\xafB\xa0\xe0\x04\x80&S\x05'), chr(738 - 638) + '\145' + '\143' + chr(1978 - 1867) + chr(0b110001 + 0o63) + chr(0b1001000 + 0o35))(chr(0b1110101) + chr(0b1110100) + '\146' + chr(45) + chr(0b110 + 0o62))), (roI3spqORKae(ES5oEprVxulp(b'\xaf'), '\x64' + '\x65' + '\143' + '\157' + chr(0b1100100) + '\145')('\x75' + chr(8405 - 8289) + chr(0b111 + 0o137) + chr(1137 - 1092) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\xaf'), chr(0b10101 + 0o117) + chr(0b1100101) + chr(0b1100011) + chr(0b1011 + 0o144) + chr(0b1100100) + chr(4316 - 4215))('\x75' + chr(0b1110100) + '\x66' + chr(0b101101) + '\x38')), (roI3spqORKae(ES5oEprVxulp(b'\xae'), chr(0b1100100) + chr(3535 - 3434) + chr(0b1100011) + chr(0b1101111) + chr(100) + chr(0b1100101))('\x75' + chr(0b1110100) + chr(0b1000111 + 0o37) + '\x2d' + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\xae'), chr(0b100011 + 0o101) + '\145' + chr(99) + chr(111) + chr(8601 - 8501) + chr(0b10001 + 0o124))(chr(0b1110101) + chr(6921 - 6805) + chr(5346 - 5244) + '\x2d' + '\070'))]: qBboiYwx5RyK = POx95m7SPOVy[A0gVABhHjc3L + roI3spqORKae(ES5oEprVxulp(b'\x88y'), chr(0b1100100) + chr(101) + '\143' + chr(0b1101111) + '\x64' + '\145')('\165' + chr(0b1110100) + '\x66' + chr(821 - 776) + '\x38')] - POx95m7SPOVy[A0gVABhHjc3L + roI3spqORKae(ES5oEprVxulp(b'\x88z'), '\144' + chr(0b1100101) + chr(0b1100011) + '\x6f' + chr(0b101101 + 0o67) + chr(9856 - 9755))(chr(0b11100 + 0o131) + chr(12519 - 12403) + '\146' + chr(0b101101) + '\070')] T9jLovnrI9gT = nDF4gVNx0u9Q.zQBGwUT7UU8L(qBboiYwx5RyK) POx95m7SPOVy[OSAM9ilb2t5B + roI3spqORKae(ES5oEprVxulp(b'\x88-\xda\xb8C\xa6'), '\144' + chr(3178 - 3077) + chr(99) + chr(0b1000111 + 0o50) + chr(0b111110 + 0o46) + chr(101))(chr(10021 - 9904) + '\164' + '\x66' + chr(1739 - 1694) + '\070')] = qBboiYwx5RyK POx95m7SPOVy[OSAM9ilb2t5B + roI3spqORKae(ES5oEprVxulp(b'\x88)\xca\xb9s\xb1\xe0\x1f\x8c='), chr(0b10100 + 0o120) + chr(9781 - 9680) + '\x63' + '\157' + chr(0b1000001 + 0o43) + chr(0b1100101))(chr(117) + chr(4702 - 4586) + chr(0b1100110) + chr(0b101101) + chr(0b111000))] = T9jLovnrI9gT POx95m7SPOVy[OSAM9ilb2t5B + roI3spqORKae(ES5oEprVxulp(b'\x88;\xcb\xab@\xb1\xf62\x86=U\x13W'), chr(100) + chr(5338 - 5237) + chr(0b1100011) + chr(5272 - 5161) + '\144' + chr(101))(chr(0b1110101) + chr(363 - 247) + '\146' + chr(0b10101 + 0o30) + chr(0b111000))] = T9jLovnrI9gT * rNYDoPRL02dn if wVQZf_PlNoIU is not None: POx95m7SPOVy[OSAM9ilb2t5B + roI3spqORKae(ES5oEprVxulp(b'\x88:\xc9\xaeE\xbd\xcd\x08\x91=H\x0e'), chr(0b1011000 + 0o14) + '\145' + chr(6138 - 6039) + chr(111) + chr(0b10010 + 0o122) + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(8626 - 8524) + chr(0b101101) + chr(0b111000))] = T9jLovnrI9gT * wVQZf_PlNoIU return roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xbe<\xc9\xa8@\xb1'), chr(100) + chr(0b1100101) + chr(99) + '\157' + '\x64' + '\x65')(chr(5931 - 5814) + chr(0b1110100) + chr(6783 - 6681) + chr(0b10111 + 0o26) + chr(56)))(POx95m7SPOVy)
noahbenson/neuropythy
neuropythy/vision/retinotopy.py
visual_isolines
def visual_isolines(hemi, retinotopy='any', visual_area=Ellipsis, mask=None, surface='midgray', weights=Ellipsis, min_weight=0.05, eccentricity_range=None, polar_angle_range=None, eccentricity_lines=8, polar_angle_lines=8, max_step_scale=1.0/16.0): ''' visual_isolines(hemi) yields a dictionary of the iso-angle and iso-eccentricity lines for the given hemisphere hemi. The returned structure depends on the optional arguments and is documented below. visual_isolines(hemi, retino) uses the retinotopy found by retinotopy_data(hemi, retino). The following optional arguments may be given: * visual_area (default: Ellipsis) specifies the property that should be used as the visual area labels; if Ellipsis, then uses any visual area property found in the retinotopy data and otherwise uses none; if set to None, then the visual area is always ignored. Note that visual area values of 0 are ignored as well. * mask (default: None) specifies an additional mask that should be applied; when visual_area is None or not found, then this is the only masking that is performed. * weights (default: Ellipsis) specifies the property that should be used as the weights on the polar angle and eccentricity data; if Ellipsis, indicates that the variance explained or weight property found in the retinotopy data should be used if any. * min_weight (default: 0.05) specifies the minimum weight that should be included. * polar_angle_range (default: None) may speficy the (min,max) polar angle to include. * eccentricity_range (default: None) may specify the max or (min,max) eccentricity to include. * eccentricity_lines (default: 8) specifies the eccentricity values at which to draw iso-eccentricity lines. If this is an integer, it specifies that these should be chosen using even spacing along the inverse CDF of the eccentricity values above the weight threshold. * polar_angle_lines (default: 8) specifies the polar angle values at which to draw the iso-angular lines. If this is an integer, it specifies that these should be chosen using even spacing along the inverse CDF of the eccentricity values above the weight threshold. * surface (default: 'midgray') specifies the surface to use for calculating surface coordinates if hemi is a topology and not a mesh. Return value: The return value of this function is a nested dictionary structure. If a visual area property is used, then the first level of keys are the visual areas (excluding 0) that are found. After this level, the next level's keys are 'polar_angle' and 'eccentricity' with the following level's keys indicating the polar angle or eccentricity value that was used. These internal dicts of iso-angle keys map to values that are lists of lines (there may be many contiguous lines at one angle); each line is given by a map of addresses and other meta-data about the line. ''' from neuropythy import (to_mask, retinotopy_data, isolines, is_cortex, to_mesh) from neuropythy.util import curry # first off, apply the mask if specified: if mask is not None: mask = to_mask(hemi, mask) else: mask = hemi.tess.indices # now, get the retinotopy retino = retinotopy_data(hemi, retinotopy) if visual_area is Ellipsis: visual_area = retino.get('visual_area', None) elif visual_area is not None: visual_area = hemi.property(visual_area, mask=mask, null=0) # if there is a visual area, we just recurse setting these values as a mask if visual_area is not None: vas = np.unique(visual_area) kw = dict(weights=weights, min_weight=min_weight, surface=surface, visual_area=None, eccentricity_lines=eccentricity_lines, polar_angle_lines=polar_angle_lines, eccentricity_range=eccentricity_range, polar_angle_range=polar_angle_range, max_step_scale=max_step_scale) def recurse(va): vamask = to_mask(hemi, (visual_area, va)) return visual_isolines(hemi, retinotopy, mask=np.intersect1d(mask, vamask), **kw) return pimms.lazy_map({va:curry(recurse, va) for va in vas if va != 0}) # If there are weights, figure them out and apply them to the mask ve = 'variance_explained' weights = (retino[ve] if weights is Ellipsis and ve in retino else None if weights is Ellipsis or weights is None else hemi.property(weights)) if weights is not None and min_weight is not None: mask = np.intersect1d(mask, np.where(weights >= min_weight)[0]) # make sure polar angle and eccen are in retino: (ang,ecc) = as_retinotopy(retino, 'visual') retino['polar_angle'] = ang retino['eccentricity'] = ecc # if there's a surface to get... mesh = to_mesh((hemi, surface)) # when we calculate the isolines we use this function which also adds in the polar angles and # eccentricities of the addressed lines def calc_isolines(hemi, dat, ln, mask=None): addrs = isolines(hemi, dat, ln, mask=mask, yield_addresses=True) (angs,eccs) = [[hemi.interpolate(addr, retino[nm]) for addr in addrs] for nm in ('polar_angle', 'eccentricity')] vxys = [np.asarray([e*np.cos(t), e*np.sin(t)]) for (a,e) in zip(angs,eccs) for t in [np.pi/180.0*(90.0 - a)]] sxys = [mesh.unaddress(addr) for addr in addrs] # trim/cut where needed if max_step_scale is not None: iiss = [] for (vxy,ecc) in zip(vxys, eccs): dists = np.sqrt(np.sum((vxy[:,:-1] - vxy[:,1:])**2, 0)) es = np.mean([ecc[:-1], ecc[1:]], 0) mx = max_step_scale * es bd = dists > mx ok = np.where(~bd)[0] bd = np.where(bd)[0] (oi,bi) = (0,0) iis = [] while True: if oi >= len(ok): break elif bi >= len(bd): iis.append(ok[oi:]) break elif ok[oi] < bd[bi]: n = bd[bi] - ok[oi] iis.append(ok[oi:(oi+n)]) oi += n else: bi += ok[oi] - bd[bi] iiss.append(iis) # okay, fix all the lists... (angs,eccs) = [[u[ii] for (u,iis) in zip(q,iiss) for ii in iis] for q in (angs,eccs)] (vxys,sxys) = [[u[:,ii] for (u,iis) in zip(q,iiss) for ii in iis] for q in (vxys,sxys)] addrs = [{k:addr[k][:,ii] for k in ('faces','coordinates')} for (addr,iis) in zip(addrs,iiss) for ii in iis] return pimms.persist({'addresses': addrs, 'polar_angles': angs, 'eccentricities':eccs, 'visual_coordinates': vxys, 'surface_coordinates': sxys}) # okay, we are operating over just the mask we have plus polar angle/eccentricity ranges r = {} (ang,ecc) = as_retinotopy(retino, 'visual') if eccentricity_range is not None: rng = eccentricity_range (mn,mx) = rng if pimms.is_vector(rng) else (np.min(ecc), rng) mask = np.setdiff1d(mask, np.where((ecc < mn) | (ecc > mx))[0]) if polar_angle_range is not None: rng = polar_angle_range (mn,mx) = rng if pimms.is_vector(rng) else (np.min(ang), rng) # we need to center the angle on this range here aa = np.mean(rng) aa = np.mod(ang + aa, 360) - aa mask = np.setdiff1d(mask, np.where((aa < mn) | (aa > mx))[0]) for (p,dat,lns,rng) in zip(['polar_angle','eccentricity'], [ang,ecc], [polar_angle_lines, eccentricity_lines], [polar_angle_range, eccentricity_range]): # first, figure out the lines themselves if pimms.is_int(lns): lns = np.percentile(dat[mask], np.linspace(0, 100, 2*lns + 1)[1::2]) # now grab them from the hemisphere... r[p] = pimms.lazy_map({ln:curry(calc_isolines, hemi, dat, ln, mask=mask) for ln in lns}) return pyr.pmap(r)
python
def visual_isolines(hemi, retinotopy='any', visual_area=Ellipsis, mask=None, surface='midgray', weights=Ellipsis, min_weight=0.05, eccentricity_range=None, polar_angle_range=None, eccentricity_lines=8, polar_angle_lines=8, max_step_scale=1.0/16.0): ''' visual_isolines(hemi) yields a dictionary of the iso-angle and iso-eccentricity lines for the given hemisphere hemi. The returned structure depends on the optional arguments and is documented below. visual_isolines(hemi, retino) uses the retinotopy found by retinotopy_data(hemi, retino). The following optional arguments may be given: * visual_area (default: Ellipsis) specifies the property that should be used as the visual area labels; if Ellipsis, then uses any visual area property found in the retinotopy data and otherwise uses none; if set to None, then the visual area is always ignored. Note that visual area values of 0 are ignored as well. * mask (default: None) specifies an additional mask that should be applied; when visual_area is None or not found, then this is the only masking that is performed. * weights (default: Ellipsis) specifies the property that should be used as the weights on the polar angle and eccentricity data; if Ellipsis, indicates that the variance explained or weight property found in the retinotopy data should be used if any. * min_weight (default: 0.05) specifies the minimum weight that should be included. * polar_angle_range (default: None) may speficy the (min,max) polar angle to include. * eccentricity_range (default: None) may specify the max or (min,max) eccentricity to include. * eccentricity_lines (default: 8) specifies the eccentricity values at which to draw iso-eccentricity lines. If this is an integer, it specifies that these should be chosen using even spacing along the inverse CDF of the eccentricity values above the weight threshold. * polar_angle_lines (default: 8) specifies the polar angle values at which to draw the iso-angular lines. If this is an integer, it specifies that these should be chosen using even spacing along the inverse CDF of the eccentricity values above the weight threshold. * surface (default: 'midgray') specifies the surface to use for calculating surface coordinates if hemi is a topology and not a mesh. Return value: The return value of this function is a nested dictionary structure. If a visual area property is used, then the first level of keys are the visual areas (excluding 0) that are found. After this level, the next level's keys are 'polar_angle' and 'eccentricity' with the following level's keys indicating the polar angle or eccentricity value that was used. These internal dicts of iso-angle keys map to values that are lists of lines (there may be many contiguous lines at one angle); each line is given by a map of addresses and other meta-data about the line. ''' from neuropythy import (to_mask, retinotopy_data, isolines, is_cortex, to_mesh) from neuropythy.util import curry # first off, apply the mask if specified: if mask is not None: mask = to_mask(hemi, mask) else: mask = hemi.tess.indices # now, get the retinotopy retino = retinotopy_data(hemi, retinotopy) if visual_area is Ellipsis: visual_area = retino.get('visual_area', None) elif visual_area is not None: visual_area = hemi.property(visual_area, mask=mask, null=0) # if there is a visual area, we just recurse setting these values as a mask if visual_area is not None: vas = np.unique(visual_area) kw = dict(weights=weights, min_weight=min_weight, surface=surface, visual_area=None, eccentricity_lines=eccentricity_lines, polar_angle_lines=polar_angle_lines, eccentricity_range=eccentricity_range, polar_angle_range=polar_angle_range, max_step_scale=max_step_scale) def recurse(va): vamask = to_mask(hemi, (visual_area, va)) return visual_isolines(hemi, retinotopy, mask=np.intersect1d(mask, vamask), **kw) return pimms.lazy_map({va:curry(recurse, va) for va in vas if va != 0}) # If there are weights, figure them out and apply them to the mask ve = 'variance_explained' weights = (retino[ve] if weights is Ellipsis and ve in retino else None if weights is Ellipsis or weights is None else hemi.property(weights)) if weights is not None and min_weight is not None: mask = np.intersect1d(mask, np.where(weights >= min_weight)[0]) # make sure polar angle and eccen are in retino: (ang,ecc) = as_retinotopy(retino, 'visual') retino['polar_angle'] = ang retino['eccentricity'] = ecc # if there's a surface to get... mesh = to_mesh((hemi, surface)) # when we calculate the isolines we use this function which also adds in the polar angles and # eccentricities of the addressed lines def calc_isolines(hemi, dat, ln, mask=None): addrs = isolines(hemi, dat, ln, mask=mask, yield_addresses=True) (angs,eccs) = [[hemi.interpolate(addr, retino[nm]) for addr in addrs] for nm in ('polar_angle', 'eccentricity')] vxys = [np.asarray([e*np.cos(t), e*np.sin(t)]) for (a,e) in zip(angs,eccs) for t in [np.pi/180.0*(90.0 - a)]] sxys = [mesh.unaddress(addr) for addr in addrs] # trim/cut where needed if max_step_scale is not None: iiss = [] for (vxy,ecc) in zip(vxys, eccs): dists = np.sqrt(np.sum((vxy[:,:-1] - vxy[:,1:])**2, 0)) es = np.mean([ecc[:-1], ecc[1:]], 0) mx = max_step_scale * es bd = dists > mx ok = np.where(~bd)[0] bd = np.where(bd)[0] (oi,bi) = (0,0) iis = [] while True: if oi >= len(ok): break elif bi >= len(bd): iis.append(ok[oi:]) break elif ok[oi] < bd[bi]: n = bd[bi] - ok[oi] iis.append(ok[oi:(oi+n)]) oi += n else: bi += ok[oi] - bd[bi] iiss.append(iis) # okay, fix all the lists... (angs,eccs) = [[u[ii] for (u,iis) in zip(q,iiss) for ii in iis] for q in (angs,eccs)] (vxys,sxys) = [[u[:,ii] for (u,iis) in zip(q,iiss) for ii in iis] for q in (vxys,sxys)] addrs = [{k:addr[k][:,ii] for k in ('faces','coordinates')} for (addr,iis) in zip(addrs,iiss) for ii in iis] return pimms.persist({'addresses': addrs, 'polar_angles': angs, 'eccentricities':eccs, 'visual_coordinates': vxys, 'surface_coordinates': sxys}) # okay, we are operating over just the mask we have plus polar angle/eccentricity ranges r = {} (ang,ecc) = as_retinotopy(retino, 'visual') if eccentricity_range is not None: rng = eccentricity_range (mn,mx) = rng if pimms.is_vector(rng) else (np.min(ecc), rng) mask = np.setdiff1d(mask, np.where((ecc < mn) | (ecc > mx))[0]) if polar_angle_range is not None: rng = polar_angle_range (mn,mx) = rng if pimms.is_vector(rng) else (np.min(ang), rng) # we need to center the angle on this range here aa = np.mean(rng) aa = np.mod(ang + aa, 360) - aa mask = np.setdiff1d(mask, np.where((aa < mn) | (aa > mx))[0]) for (p,dat,lns,rng) in zip(['polar_angle','eccentricity'], [ang,ecc], [polar_angle_lines, eccentricity_lines], [polar_angle_range, eccentricity_range]): # first, figure out the lines themselves if pimms.is_int(lns): lns = np.percentile(dat[mask], np.linspace(0, 100, 2*lns + 1)[1::2]) # now grab them from the hemisphere... r[p] = pimms.lazy_map({ln:curry(calc_isolines, hemi, dat, ln, mask=mask) for ln in lns}) return pyr.pmap(r)
[ "def", "visual_isolines", "(", "hemi", ",", "retinotopy", "=", "'any'", ",", "visual_area", "=", "Ellipsis", ",", "mask", "=", "None", ",", "surface", "=", "'midgray'", ",", "weights", "=", "Ellipsis", ",", "min_weight", "=", "0.05", ",", "eccentricity_range...
visual_isolines(hemi) yields a dictionary of the iso-angle and iso-eccentricity lines for the given hemisphere hemi. The returned structure depends on the optional arguments and is documented below. visual_isolines(hemi, retino) uses the retinotopy found by retinotopy_data(hemi, retino). The following optional arguments may be given: * visual_area (default: Ellipsis) specifies the property that should be used as the visual area labels; if Ellipsis, then uses any visual area property found in the retinotopy data and otherwise uses none; if set to None, then the visual area is always ignored. Note that visual area values of 0 are ignored as well. * mask (default: None) specifies an additional mask that should be applied; when visual_area is None or not found, then this is the only masking that is performed. * weights (default: Ellipsis) specifies the property that should be used as the weights on the polar angle and eccentricity data; if Ellipsis, indicates that the variance explained or weight property found in the retinotopy data should be used if any. * min_weight (default: 0.05) specifies the minimum weight that should be included. * polar_angle_range (default: None) may speficy the (min,max) polar angle to include. * eccentricity_range (default: None) may specify the max or (min,max) eccentricity to include. * eccentricity_lines (default: 8) specifies the eccentricity values at which to draw iso-eccentricity lines. If this is an integer, it specifies that these should be chosen using even spacing along the inverse CDF of the eccentricity values above the weight threshold. * polar_angle_lines (default: 8) specifies the polar angle values at which to draw the iso-angular lines. If this is an integer, it specifies that these should be chosen using even spacing along the inverse CDF of the eccentricity values above the weight threshold. * surface (default: 'midgray') specifies the surface to use for calculating surface coordinates if hemi is a topology and not a mesh. Return value: The return value of this function is a nested dictionary structure. If a visual area property is used, then the first level of keys are the visual areas (excluding 0) that are found. After this level, the next level's keys are 'polar_angle' and 'eccentricity' with the following level's keys indicating the polar angle or eccentricity value that was used. These internal dicts of iso-angle keys map to values that are lists of lines (there may be many contiguous lines at one angle); each line is given by a map of addresses and other meta-data about the line.
[ "visual_isolines", "(", "hemi", ")", "yields", "a", "dictionary", "of", "the", "iso", "-", "angle", "and", "iso", "-", "eccentricity", "lines", "for", "the", "given", "hemisphere", "hemi", ".", "The", "returned", "structure", "depends", "on", "the", "optiona...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/vision/retinotopy.py#L1791-L1927
train
Generates a dictionary of iso - angle and iso - eccentricity lines for the given hemisphere hemisphere.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m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dKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(849 - 801) + chr(0b1101111) + '\x33' + chr(51) + '\x36', 0b1000), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b1101111) + chr(0b11101 + 0o25) + '\064' + '\066', 0o10), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(1705 - 1594) + '\064' + chr(55), 0b1000), nzTpIcepk0o8(chr(691 - 643) + chr(0b1101111) + '\061' + chr(622 - 570) + chr(177 - 129), 60067 - 60059), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50) + chr(0b110100) + '\x36', 8), nzTpIcepk0o8('\060' + chr(943 - 832) + '\x30', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + chr(2260 - 2205), 0o10), nzTpIcepk0o8('\x30' + chr(0b10100 + 0o133) + chr(0b110111) + chr(0b101111 + 0o5), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010) + chr(2539 - 2485) + '\x33', 50110 - 50102), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b111111 + 0o60) + chr(2306 - 2253) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + chr(0b10000 + 0o42) + '\x36', 0o10), nzTpIcepk0o8(chr(0b1110 + 0o42) + '\157' + chr(0b100000 + 0o23) + chr(53) + chr(0b11111 + 0o26), 18226 - 18218), nzTpIcepk0o8(chr(48) + chr(3294 - 3183) + chr(50) + chr(50) + '\x32', 47198 - 47190), nzTpIcepk0o8(chr(277 - 229) + chr(0b1101111) + chr(50) + chr(0b110101) + '\060', 0b1000), nzTpIcepk0o8(chr(1143 - 1095) + '\157' + '\062' + '\x32', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010) + chr(437 - 387) + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b100101 + 0o13) + '\x6f' + '\062' + '\066' + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1100110 + 0o11) + chr(51) + '\061' + '\065', 0o10), nzTpIcepk0o8(chr(0b101110 + 0o2) + '\x6f' + chr(0b1000 + 0o53) + chr(0b110000) + chr(0b1110 + 0o42), 0o10), nzTpIcepk0o8(chr(1280 - 1232) + chr(0b1101111) + '\062' + chr(0b101001 + 0o16) + chr(0b101101 + 0o11), 28057 - 28049), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(111) + chr(0b110010) + '\062' + chr(55), 0o10), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b1101111) + chr(50) + chr(0b110110) + chr(1026 - 971), 0o10), nzTpIcepk0o8(chr(0b101110 + 0o2) + '\x6f' + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(0b100100 + 0o113) + chr(349 - 298) + '\x32' + '\x35', 0o10), nzTpIcepk0o8('\x30' + chr(10088 - 9977) + chr(2413 - 2362) + chr(0b100011 + 0o16) + '\064', 0b1000), nzTpIcepk0o8(chr(0b11110 + 0o22) + '\157' + '\061' + '\064' + chr(0b110000 + 0o5), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1011000 + 0o27) + '\x35' + chr(1337 - 1287), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(50) + chr(0b110111) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(1626 - 1578) + chr(0b101000 + 0o107) + '\062' + chr(489 - 436) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\x6f' + chr(0b10100 + 0o35) + chr(0b110101) + '\x34', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(49) + chr(0b110011) + chr(0b110110), 0o10), nzTpIcepk0o8('\060' + chr(9501 - 9390) + chr(0b110011) + '\061' + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(465 - 417) + '\x6f' + chr(0b1110 + 0o45) + chr(0b110100) + chr(236 - 181), 0b1000), nzTpIcepk0o8(chr(1910 - 1862) + chr(111) + '\x33' + chr(1348 - 1294) + '\067', ord("\x08")), nzTpIcepk0o8(chr(608 - 560) + chr(111) + chr(49) + '\x32' + chr(53), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1011 + 0o144) + chr(173 - 124) + chr(0b1010 + 0o54) + '\x31', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + chr(55) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b1010011 + 0o34) + '\x32' + chr(50) + '\067', 8), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110011) + '\067' + '\064', 0o10), nzTpIcepk0o8('\060' + chr(5589 - 5478) + '\062' + chr(0b10011 + 0o42) + chr(54), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\x6f' + chr(2662 - 2609) + chr(0b1010 + 0o46), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xf0'), '\144' + chr(1966 - 1865) + '\143' + chr(111) + '\144' + chr(0b1100101))('\165' + '\164' + chr(0b1100110) + chr(0b10000 + 0o35) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def zQj8I_jHLcfY(nRSX3HCpSIw0, Ud8JOD1j6kPi=roI3spqORKae(ES5oEprVxulp(b'\xbf\xc8^'), chr(0b111 + 0o135) + '\x65' + '\x63' + '\157' + '\144' + chr(0b111011 + 0o52))('\x75' + chr(0b10101 + 0o137) + chr(0b1001 + 0o135) + chr(68 - 23) + chr(56)), sGYgOtU0jgXU=RjQP07DYIdkf, BBM8dxm7YWge=None, EE4YQNLOwx18=roI3spqORKae(ES5oEprVxulp(b'\xb3\xcfC\x07\xd4av'), '\x64' + chr(0b1 + 0o144) + chr(0b1000111 + 0o34) + chr(0b1101111) + '\x64' + chr(101))(chr(4603 - 4486) + chr(0b0 + 0o164) + chr(0b1100110) + chr(0b101101) + chr(56)), TtzqJLqe_ecy=RjQP07DYIdkf, jh05iVmeM9Oa=0.05, rJrkFr9k00bC=None, wmGCHLgyETp_=None, FJl_CDYBhASH=nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + chr(1881 - 1833), 0o10), wsfBijKDDiRm=nzTpIcepk0o8('\060' + '\x6f' + '\x31' + '\060', 8), V_dBHEj9PC8r=1.0 / 16.0): (lKC_czfSBtVT, CTw69XTnIqxx, l6Enx3F5RXhW, Cg2wtTEv8idq, vp8E7Zmk7FEu) = (roI3spqORKae(rFFUeiYWzOhx(roI3spqORKae(ES5oEprVxulp(b'\xb0\xc3R\x12\xc9pvH\xdbQ'), '\144' + chr(0b1100101) + '\x63' + '\x6f' + chr(0b1011 + 0o131) + chr(101))(chr(0b1110101) + chr(116) + chr(0b1010000 + 0o26) + chr(0b101101) + '\070'), roI3spqORKae(ES5oEprVxulp(b'\xaa\xc9x\r\xc7sd'), '\144' + '\x65' + chr(99) + chr(111) + chr(100) + '\145')('\165' + '\164' + chr(0b1100110) + chr(380 - 335) + '\x38')), roI3spqORKae(ES5oEprVxulp(b'\xaa\xc9x\r\xc7sd'), chr(0b1100001 + 0o3) + chr(0b1000010 + 0o43) + chr(0b1011 + 0o130) + '\x6f' + chr(0b100011 + 0o101) + chr(2735 - 2634))('\165' + chr(0b1110100) + chr(0b1100110) + '\055' + '\070')), roI3spqORKae(rFFUeiYWzOhx(roI3spqORKae(ES5oEprVxulp(b'\xb0\xc3R\x12\xc9pvH\xdbQ'), '\144' + chr(0b1011111 + 0o6) + chr(99) + chr(0b1101111) + chr(100) + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(1515 - 1470) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xac\xc3S\t\xc8o{S\xc3Q\xc9\x89\xf3\xdcs'), chr(100) + chr(0b1100101) + '\143' + chr(0b100110 + 0o111) + chr(100) + chr(7849 - 7748))('\165' + '\x74' + chr(408 - 306) + chr(0b101101) + '\070')), roI3spqORKae(ES5oEprVxulp(b'\xac\xc3S\t\xc8o{S\xc3Q\xc9\x89\xf3\xdcs'), chr(0b1100100) + chr(0b1100101) + chr(99) + chr(0b1101111) + '\x64' + '\145')(chr(0b1010110 + 0o37) + chr(452 - 336) + chr(102) + '\x2d' + '\x38')), roI3spqORKae(rFFUeiYWzOhx(roI3spqORKae(ES5oEprVxulp(b'\xb0\xc3R\x12\xc9pvH\xdbQ'), chr(0b1100100) + chr(0b1010100 + 0o21) + chr(0b1010 + 0o131) + '\157' + chr(8648 - 8548) + chr(101))(chr(0b1010000 + 0o45) + '\164' + chr(0b1100110) + '\x2d' + chr(2334 - 2278)), roI3spqORKae(ES5oEprVxulp(b'\xb7\xd5H\x0c\xcfnjO'), chr(6879 - 6779) + chr(0b111001 + 0o54) + chr(0b1001100 + 0o27) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))('\165' + chr(116) + chr(0b1100110) + chr(45) + chr(56))), roI3spqORKae(ES5oEprVxulp(b'\xb7\xd5H\x0c\xcfnjO'), '\144' + '\x65' + '\x63' + chr(0b100101 + 0o112) + chr(6680 - 6580) + '\x65')(chr(6897 - 6780) + chr(0b110010 + 0o102) + chr(0b1100110) + chr(0b101101) + chr(1392 - 1336))), roI3spqORKae(rFFUeiYWzOhx(roI3spqORKae(ES5oEprVxulp(b'\xb0\xc3R\x12\xc9pvH\xdbQ'), '\x64' + chr(5448 - 5347) + chr(99) + chr(111) + chr(0b1100100) + '\x65')('\x75' + '\164' + chr(0b1100110) + '\055' + chr(0b10101 + 0o43)), roI3spqORKae(ES5oEprVxulp(b'\xb7\xd5x\x03\xc9r{Y\xcb'), '\144' + chr(0b1100101) + '\143' + '\x6f' + chr(8589 - 8489) + chr(5134 - 5033))(chr(117) + '\x74' + chr(0b1001111 + 0o27) + chr(1920 - 1875) + chr(56))), roI3spqORKae(ES5oEprVxulp(b'\xb7\xd5x\x03\xc9r{Y\xcb'), '\x64' + chr(101) + chr(0b10100 + 0o117) + chr(10024 - 9913) + chr(100) + chr(0b1100101))(chr(0b11101 + 0o130) + chr(10048 - 9932) + chr(2103 - 2001) + '\x2d' + '\070')), roI3spqORKae(rFFUeiYWzOhx(roI3spqORKae(ES5oEprVxulp(b'\xb0\xc3R\x12\xc9pvH\xdbQ'), chr(100) + chr(0b1011101 + 0o10) + chr(0b111110 + 0o45) + chr(111) + chr(100) + '\x65')(chr(117) + chr(0b10100 + 0o140) + chr(102) + chr(0b1100 + 0o41) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xaa\xc9x\r\xc3sg'), '\x64' + '\145' + chr(99) + '\x6f' + '\144' + chr(101))(chr(3027 - 2910) + chr(3339 - 3223) + chr(7202 - 7100) + chr(620 - 575) + chr(56))), roI3spqORKae(ES5oEprVxulp(b'\xaa\xc9x\r\xc3sg'), chr(0b1100001 + 0o3) + chr(1954 - 1853) + chr(7909 - 7810) + '\x6f' + chr(0b1100100) + '\x65')(chr(2978 - 2861) + chr(0b1110100) + '\x66' + chr(0b11100 + 0o21) + chr(0b101101 + 0o13)))) (BoZcxPaOCjhS,) = (roI3spqORKae(roI3spqORKae(rFFUeiYWzOhx(roI3spqORKae(ES5oEprVxulp(b'\xb0\xc3R\x12\xc9pvH\xdbQ\xb8\x98\xe6\xc1~'), chr(9285 - 9185) + '\145' + chr(3869 - 3770) + '\157' + '\x64' + '\x65')(chr(117) + '\164' + '\146' + chr(348 - 303) + '\070'), roI3spqORKae(ES5oEprVxulp(b'\xbd\xd3U\x12\xdf'), chr(4952 - 4852) + chr(0b1100101) + chr(0b1100011) + '\157' + chr(0b1011111 + 0o5) + chr(101))(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(358 - 313) + '\x38')), roI3spqORKae(ES5oEprVxulp(b'\xab\xd2N\x0c'), '\x64' + chr(7906 - 7805) + chr(0b1100011) + chr(0b10000 + 0o137) + chr(0b1100100) + '\145')(chr(0b1010 + 0o153) + chr(0b1110100) + '\x66' + '\055' + '\x38')), roI3spqORKae(ES5oEprVxulp(b'\xbd\xd3U\x12\xdf'), chr(0b1100100) + chr(0b11111 + 0o106) + chr(6639 - 6540) + chr(0b1101111) + '\144' + chr(0b111101 + 0o50))(chr(117) + chr(11676 - 11560) + chr(403 - 301) + '\055' + chr(497 - 441))),) if BBM8dxm7YWge is not None: BBM8dxm7YWge = lKC_czfSBtVT(nRSX3HCpSIw0, BBM8dxm7YWge) else: BBM8dxm7YWge = nRSX3HCpSIw0.tess.eQBPfEuGz7C1 ZEpNFOAGwkw1 = CTw69XTnIqxx(nRSX3HCpSIw0, Ud8JOD1j6kPi) if sGYgOtU0jgXU is RjQP07DYIdkf: sGYgOtU0jgXU = ZEpNFOAGwkw1.GUKetu4xaGsJ(roI3spqORKae(ES5oEprVxulp(b'\xa8\xcfT\x15\xc7lP]\xc1M\xf7'), chr(100) + chr(0b1011100 + 0o11) + '\143' + chr(0b1100010 + 0o15) + chr(2729 - 2629) + '\x65')(chr(0b111011 + 0o72) + chr(116) + chr(543 - 441) + chr(0b101101) + '\x38'), None) elif sGYgOtU0jgXU is not None: sGYgOtU0jgXU = nRSX3HCpSIw0.property(sGYgOtU0jgXU, mask=BBM8dxm7YWge, null=nzTpIcepk0o8('\x30' + '\x6f' + '\x30', 8)) if sGYgOtU0jgXU is not None: vk8F4sVxDtAX = nDF4gVNx0u9Q.G3de2eWQaS0D(sGYgOtU0jgXU) n_DqV9fOWrXc = znjnJWK64FDT(weights=TtzqJLqe_ecy, min_weight=jh05iVmeM9Oa, surface=EE4YQNLOwx18, visual_area=None, eccentricity_lines=FJl_CDYBhASH, polar_angle_lines=wsfBijKDDiRm, eccentricity_range=rJrkFr9k00bC, polar_angle_range=wmGCHLgyETp_, max_step_scale=V_dBHEj9PC8r) def w2xgm1neLvkh(FJQ1vd_iil9s): rUNQm039KhXj = lKC_czfSBtVT(nRSX3HCpSIw0, (sGYgOtU0jgXU, FJQ1vd_iil9s)) return zQj8I_jHLcfY(nRSX3HCpSIw0, Ud8JOD1j6kPi, mask=roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xb7\xc8S\x05\xd4sj_\xc7\x19\xf2'), chr(0b1010 + 0o132) + '\145' + chr(0b1100011) + chr(111) + chr(3913 - 3813) + chr(0b1100101))(chr(10539 - 10422) + '\x74' + '\146' + '\x2d' + '\070'))(BBM8dxm7YWge, rUNQm039KhXj), **n_DqV9fOWrXc) return roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xb2\xc7]\x19\xf9mnL'), chr(0b1100100) + '\145' + '\x63' + chr(111) + chr(0b100 + 0o140) + chr(5316 - 5215))(chr(0b1110101) + chr(0b10110 + 0o136) + chr(102) + chr(355 - 310) + chr(0b10010 + 0o46)))({FJQ1vd_iil9s: BoZcxPaOCjhS(w2xgm1neLvkh, FJQ1vd_iil9s) for FJQ1vd_iil9s in vk8F4sVxDtAX if FJQ1vd_iil9s != nzTpIcepk0o8('\x30' + '\157' + '\060', 8)}) TqFne36_XnKy = roI3spqORKae(ES5oEprVxulp(b'\xa8\xc7U\t\xc7nlY\xecM\xee\x9d\xfe\xc9{\xff\xd3\xa9'), '\x64' + '\x65' + chr(5221 - 5122) + '\x6f' + '\144' + '\145')(chr(0b100010 + 0o123) + '\x74' + '\x66' + chr(45) + chr(56)) TtzqJLqe_ecy = ZEpNFOAGwkw1[TqFne36_XnKy] if TtzqJLqe_ecy is RjQP07DYIdkf and TqFne36_XnKy in ZEpNFOAGwkw1 else None if TtzqJLqe_ecy is RjQP07DYIdkf or TtzqJLqe_ecy is None else nRSX3HCpSIw0.property(TtzqJLqe_ecy) if TtzqJLqe_ecy is not None and jh05iVmeM9Oa is not None: BBM8dxm7YWge = nDF4gVNx0u9Q.intersect1d(BBM8dxm7YWge, nDF4gVNx0u9Q.xWH4M7K6Qbd3(TtzqJLqe_ecy >= jh05iVmeM9Oa)[nzTpIcepk0o8(chr(1654 - 1606) + chr(0b1001110 + 0o41) + '\x30', 8)]) (Y54gViOryHfr, cRb7OGyXJeT1) = q6MpE4pm_hbK(ZEpNFOAGwkw1, roI3spqORKae(ES5oEprVxulp(b'\xa8\xcfT\x15\xc7l'), chr(100) + chr(0b10011 + 0o122) + chr(0b1100011) + chr(111) + chr(100) + chr(0b10010 + 0o123))(chr(0b1110101) + chr(0b100011 + 0o121) + chr(0b1100110) + chr(0b11010 + 0o23) + '\070')) ZEpNFOAGwkw1[roI3spqORKae(ES5oEprVxulp(b'\xae\xc9K\x01\xd4_nR\xd4D\xf3'), chr(100) + chr(8015 - 7914) + chr(0b1100011) + chr(111) + chr(847 - 747) + '\x65')(chr(0b1110101) + chr(0b1001110 + 0o46) + chr(434 - 332) + chr(873 - 828) + chr(539 - 483))] = Y54gViOryHfr ZEpNFOAGwkw1[roI3spqORKae(ES5oEprVxulp(b'\xbb\xc5D\x05\xc8t}U\xd0A\xe2\x94'), chr(0b1100100) + '\x65' + '\x63' + '\157' + '\144' + chr(101))(chr(2998 - 2881) + '\164' + chr(10152 - 10050) + chr(45) + '\x38')] = cRb7OGyXJeT1 olfRNjSgvQh6 = vp8E7Zmk7FEu((nRSX3HCpSIw0, EE4YQNLOwx18)) def SQ4ZVSKWwn2j(nRSX3HCpSIw0, LMcCiF4czwpp, bF7MZDoBjTzJ, BBM8dxm7YWge=None): QjAGNOA0Tdrm = l6Enx3F5RXhW(nRSX3HCpSIw0, LMcCiF4czwpp, bF7MZDoBjTzJ, mask=BBM8dxm7YWge, yield_addresses=nzTpIcepk0o8(chr(495 - 447) + '\157' + chr(49), 17450 - 17442)) (s1BtCO3_k64X, gQL4TJPGyvCP) = [[nRSX3HCpSIw0.wo2_AaefnPDo(_m0lLs6iTLa5, ZEpNFOAGwkw1[p06CG6wGLjN1]) for _m0lLs6iTLa5 in QjAGNOA0Tdrm] for p06CG6wGLjN1 in (roI3spqORKae(ES5oEprVxulp(b'\xae\xc9K\x01\xd4_nR\xd4D\xf3'), chr(4522 - 4422) + '\x65' + '\x63' + chr(0b110101 + 0o72) + '\x64' + chr(355 - 254))(chr(117) + chr(0b1110100) + chr(8751 - 8649) + '\x2d' + '\070'), roI3spqORKae(ES5oEprVxulp(b'\xbb\xc5D\x05\xc8t}U\xd0A\xe2\x94'), chr(100) + '\145' + chr(2556 - 2457) + chr(0b100010 + 0o115) + chr(0b111101 + 0o47) + '\145')(chr(0b1010111 + 0o36) + chr(0b1010110 + 0o36) + chr(3343 - 3241) + chr(0b100000 + 0o15) + chr(56)))] Z1rL3WFIEDS4 = [nDF4gVNx0u9Q.asarray([wgf0sgcu_xPL * nDF4gVNx0u9Q.mLriLohwQ9NU(h3Vc_4wxEbgd), wgf0sgcu_xPL * nDF4gVNx0u9Q.TMleLVztqSLZ(h3Vc_4wxEbgd)]) for (AQ9ceR9AaoT1, wgf0sgcu_xPL) in TxMFWa_Xzviv(s1BtCO3_k64X, gQL4TJPGyvCP) for h3Vc_4wxEbgd in [nDF4gVNx0u9Q.nMrXkRpTQ9Oo / 180.0 * (90.0 - AQ9ceR9AaoT1)]] gjSdSz2dk78F = [olfRNjSgvQh6.unaddress(_m0lLs6iTLa5) for _m0lLs6iTLa5 in QjAGNOA0Tdrm] if V_dBHEj9PC8r is not None: Zh99imxhascU = [] for (ZDqGCzFmWY13, cRb7OGyXJeT1) in TxMFWa_Xzviv(Z1rL3WFIEDS4, gQL4TJPGyvCP): g30pVubIDFeG = nDF4gVNx0u9Q.sqrt(nDF4gVNx0u9Q.oclC8DLjA_lV((ZDqGCzFmWY13[:, :-nzTpIcepk0o8(chr(923 - 875) + chr(0b100001 + 0o116) + chr(1589 - 1540), 8)] - ZDqGCzFmWY13[:, nzTpIcepk0o8(chr(671 - 623) + chr(0b10 + 0o155) + chr(0b110001), 8):]) ** nzTpIcepk0o8('\x30' + chr(0b10001 + 0o136) + chr(0b110 + 0o54), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(7051 - 6940) + '\x30', 8))) FvMIJ0iZPnr4 = nDF4gVNx0u9Q.JE1frtxECu3x([cRb7OGyXJeT1[:-nzTpIcepk0o8('\x30' + chr(111) + '\061', 8)], cRb7OGyXJeT1[nzTpIcepk0o8(chr(48) + '\x6f' + chr(1848 - 1799), 8):]], nzTpIcepk0o8(chr(0b1101 + 0o43) + '\157' + chr(0b110000), 8)) rzXix6Xb5Ko2 = V_dBHEj9PC8r * FvMIJ0iZPnr4 hJyqh9gWZdPF = g30pVubIDFeG > rzXix6Xb5Ko2 arcyz8y9ckuT = nDF4gVNx0u9Q.xWH4M7K6Qbd3(~hJyqh9gWZdPF)[nzTpIcepk0o8('\060' + '\x6f' + '\060', 8)] hJyqh9gWZdPF = nDF4gVNx0u9Q.xWH4M7K6Qbd3(hJyqh9gWZdPF)[nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x30', 8)] (e5h1xafRywHV, Bm59fX0zXbot) = (nzTpIcepk0o8(chr(0b110000) + chr(7191 - 7080) + chr(48), 8), nzTpIcepk0o8(chr(1851 - 1803) + '\157' + chr(1206 - 1158), 8)) FdkICBlkBXAN = [] while nzTpIcepk0o8('\060' + '\157' + chr(1540 - 1491), 8): if e5h1xafRywHV >= ftfygxgFas5X(arcyz8y9ckuT): break elif Bm59fX0zXbot >= ftfygxgFas5X(hJyqh9gWZdPF): roI3spqORKae(FdkICBlkBXAN, roI3spqORKae(ES5oEprVxulp(b'\x96\xf2tT\xdegHS\xd9G\xc3\xd8'), chr(9737 - 9637) + chr(9182 - 9081) + chr(0b101001 + 0o72) + chr(111) + '\144' + '\145')(chr(117) + chr(0b1110100) + chr(4967 - 4865) + chr(1496 - 1451) + '\070'))(arcyz8y9ckuT[e5h1xafRywHV:]) break elif arcyz8y9ckuT[e5h1xafRywHV] < hJyqh9gWZdPF[Bm59fX0zXbot]: NoZxuO7wjArS = hJyqh9gWZdPF[Bm59fX0zXbot] - arcyz8y9ckuT[e5h1xafRywHV] roI3spqORKae(FdkICBlkBXAN, roI3spqORKae(ES5oEprVxulp(b'\x96\xf2tT\xdegHS\xd9G\xc3\xd8'), '\x64' + '\145' + '\x63' + chr(0b1101111) + '\144' + chr(9171 - 9070))(chr(7854 - 7737) + chr(0b1010010 + 0o42) + chr(6180 - 6078) + '\055' + '\070'))(arcyz8y9ckuT[e5h1xafRywHV:e5h1xafRywHV + NoZxuO7wjArS]) e5h1xafRywHV += NoZxuO7wjArS else: Bm59fX0zXbot += arcyz8y9ckuT[e5h1xafRywHV] - hJyqh9gWZdPF[Bm59fX0zXbot] roI3spqORKae(Zh99imxhascU, roI3spqORKae(ES5oEprVxulp(b'\x96\xf2tT\xdegHS\xd9G\xc3\xd8'), '\144' + chr(101) + chr(8492 - 8393) + chr(111) + '\x64' + chr(6998 - 6897))(chr(0b1110101) + chr(4340 - 4224) + chr(7368 - 7266) + chr(45) + chr(0b111000)))(FdkICBlkBXAN) (s1BtCO3_k64X, gQL4TJPGyvCP) = [[GRbsaHW8BT5I[p8Ou2emaDF7Z] for (GRbsaHW8BT5I, FdkICBlkBXAN) in TxMFWa_Xzviv(P1yWu4gF7vxH, Zh99imxhascU) for p8Ou2emaDF7Z in FdkICBlkBXAN] for P1yWu4gF7vxH in (s1BtCO3_k64X, gQL4TJPGyvCP)] (Z1rL3WFIEDS4, gjSdSz2dk78F) = [[GRbsaHW8BT5I[:, p8Ou2emaDF7Z] for (GRbsaHW8BT5I, FdkICBlkBXAN) in TxMFWa_Xzviv(P1yWu4gF7vxH, Zh99imxhascU) for p8Ou2emaDF7Z in FdkICBlkBXAN] for P1yWu4gF7vxH in (Z1rL3WFIEDS4, gjSdSz2dk78F)] QjAGNOA0Tdrm = [{B6UAF1zReOyJ: _m0lLs6iTLa5[B6UAF1zReOyJ][:, p8Ou2emaDF7Z] for B6UAF1zReOyJ in (roI3spqORKae(ES5oEprVxulp(b'\xb8\xc7D\x05\xd5'), chr(180 - 80) + '\x65' + '\143' + chr(111) + chr(0b10100 + 0o120) + chr(101))(chr(6422 - 6305) + chr(0b1110100) + '\x66' + '\055' + '\070'), roI3spqORKae(ES5oEprVxulp(b'\xbd\xc9H\x12\xc2ia]\xc7M\xe5'), chr(0b1100100) + chr(101) + chr(2351 - 2252) + chr(0b1101111) + '\144' + chr(971 - 870))('\x75' + chr(10395 - 10279) + chr(0b10011 + 0o123) + '\x2d' + chr(56)))} for (_m0lLs6iTLa5, FdkICBlkBXAN) in TxMFWa_Xzviv(QjAGNOA0Tdrm, Zh99imxhascU) for p8Ou2emaDF7Z in FdkICBlkBXAN] return roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xae\xc3U\x13\xcfs{'), chr(0b11111 + 0o105) + chr(101) + '\143' + chr(111) + chr(0b1010011 + 0o21) + chr(101))('\x75' + chr(6327 - 6211) + chr(0b11100 + 0o112) + chr(0b101101) + '\070'))({roI3spqORKae(ES5oEprVxulp(b'\xbf\xc2C\x12\xc3s|Y\xc0'), '\x64' + chr(101) + chr(7383 - 7284) + '\157' + '\x64' + chr(0b10000 + 0o125))('\x75' + chr(116) + chr(0b1100110) + '\055' + '\x38'): QjAGNOA0Tdrm, roI3spqORKae(ES5oEprVxulp(b'\xae\xc9K\x01\xd4_nR\xd4D\xf3\x9e'), chr(100) + chr(0b1100101 + 0o0) + '\x63' + chr(0b111110 + 0o61) + chr(0b1000001 + 0o43) + '\x65')(chr(117) + '\164' + chr(3860 - 3758) + '\055' + chr(0b111000)): s1BtCO3_k64X, roI3spqORKae(ES5oEprVxulp(b'\xbb\xc5D\x05\xc8t}U\xd0A\xe2\x84\xf7\xdb'), chr(0b1 + 0o143) + '\145' + '\143' + chr(7104 - 6993) + chr(0b101011 + 0o71) + chr(101))(chr(0b1110101) + chr(9824 - 9708) + '\146' + chr(45) + '\x38'): gQL4TJPGyvCP, roI3spqORKae(ES5oEprVxulp(b'\xa8\xcfT\x15\xc7lP_\xdcG\xe4\x89\xfb\xc6s\xe5\xd3\xbe'), '\144' + '\145' + chr(99) + chr(0b1011011 + 0o24) + '\x64' + '\145')('\165' + chr(7428 - 7312) + chr(0b1001011 + 0o33) + chr(0b101101) + '\x38'): Z1rL3WFIEDS4, roI3spqORKae(ES5oEprVxulp(b'\xad\xd3U\x06\xc7cjc\xd0G\xf9\x9f\xf6\xc1|\xf0\xc2\xa8\xb3'), '\x64' + '\x65' + chr(0b1100011) + chr(3654 - 3543) + chr(9270 - 9170) + chr(0b10110 + 0o117))(chr(117) + '\164' + '\146' + chr(0b100001 + 0o14) + chr(56)): gjSdSz2dk78F}) LCrwg7lcbmU9 = {} (Y54gViOryHfr, cRb7OGyXJeT1) = q6MpE4pm_hbK(ZEpNFOAGwkw1, roI3spqORKae(ES5oEprVxulp(b'\xa8\xcfT\x15\xc7l'), '\x64' + chr(101) + '\x63' + chr(0b1001101 + 0o42) + chr(6639 - 6539) + chr(0b111111 + 0o46))(chr(0b1110101) + chr(0b1110100) + chr(0b11111 + 0o107) + '\055' + '\x38')) if rJrkFr9k00bC is not None: x_UFAccWeIYv = rJrkFr9k00bC (xpUs4tvMHGTW, rzXix6Xb5Ko2) = x_UFAccWeIYv if zAgo8354IlJ7.is_vector(x_UFAccWeIYv) else (nDF4gVNx0u9Q.XURpmPuEWCNF(cRb7OGyXJeT1), x_UFAccWeIYv) BBM8dxm7YWge = nDF4gVNx0u9Q.setdiff1d(BBM8dxm7YWge, nDF4gVNx0u9Q.xWH4M7K6Qbd3((cRb7OGyXJeT1 < xpUs4tvMHGTW) | (cRb7OGyXJeT1 > rzXix6Xb5Ko2))[nzTpIcepk0o8('\060' + '\x6f' + chr(48), 8)]) if wmGCHLgyETp_ is not None: x_UFAccWeIYv = wmGCHLgyETp_ (xpUs4tvMHGTW, rzXix6Xb5Ko2) = x_UFAccWeIYv if zAgo8354IlJ7.is_vector(x_UFAccWeIYv) else (nDF4gVNx0u9Q.XURpmPuEWCNF(Y54gViOryHfr), x_UFAccWeIYv) fy6epjHXMeZ_ = nDF4gVNx0u9Q.JE1frtxECu3x(x_UFAccWeIYv) fy6epjHXMeZ_ = nDF4gVNx0u9Q.mod(Y54gViOryHfr + fy6epjHXMeZ_, nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(6891 - 6780) + chr(0b1111 + 0o46) + chr(0b110101) + '\x30', 0o10)) - fy6epjHXMeZ_ BBM8dxm7YWge = nDF4gVNx0u9Q.setdiff1d(BBM8dxm7YWge, nDF4gVNx0u9Q.xWH4M7K6Qbd3((fy6epjHXMeZ_ < xpUs4tvMHGTW) | (fy6epjHXMeZ_ > rzXix6Xb5Ko2))[nzTpIcepk0o8('\060' + chr(9368 - 9257) + chr(48), 8)]) for (fSdw5wwLo9MO, LMcCiF4czwpp, n3sh9UGr5i2w, x_UFAccWeIYv) in TxMFWa_Xzviv([roI3spqORKae(ES5oEprVxulp(b'\xae\xc9K\x01\xd4_nR\xd4D\xf3'), '\x64' + chr(0b110010 + 0o63) + chr(8414 - 8315) + '\x6f' + '\144' + chr(0b101010 + 0o73))(chr(117) + chr(0b1110100) + chr(0b1001111 + 0o27) + chr(45) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\xbb\xc5D\x05\xc8t}U\xd0A\xe2\x94'), chr(0b100110 + 0o76) + chr(0b110110 + 0o57) + chr(0b111 + 0o134) + chr(111) + chr(100) + '\145')(chr(0b110111 + 0o76) + '\164' + '\x66' + chr(1386 - 1341) + chr(0b1011 + 0o55))], [Y54gViOryHfr, cRb7OGyXJeT1], [wsfBijKDDiRm, FJl_CDYBhASH], [wmGCHLgyETp_, rJrkFr9k00bC]): if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xb7\xd5x\t\xc8t'), '\144' + '\145' + chr(0b1100011) + chr(0b1101111) + '\144' + '\145')('\165' + chr(116) + chr(102) + chr(1003 - 958) + chr(0b1111 + 0o51)))(n3sh9UGr5i2w): n3sh9UGr5i2w = nDF4gVNx0u9Q.percentile(LMcCiF4czwpp[BBM8dxm7YWge], nDF4gVNx0u9Q.G2CdtdchVPQE(nzTpIcepk0o8(chr(48) + chr(0b1111 + 0o140) + chr(48), 8), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1101111) + chr(1653 - 1604) + '\x34' + chr(0b110100), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2177 - 2127), 8) * n3sh9UGr5i2w + nzTpIcepk0o8(chr(0b100110 + 0o12) + '\157' + chr(49), 8))[nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1101111) + chr(1077 - 1028), 8)::nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010), 8)]) LCrwg7lcbmU9[fSdw5wwLo9MO] = zAgo8354IlJ7.lazy_map({bF7MZDoBjTzJ: BoZcxPaOCjhS(SQ4ZVSKWwn2j, nRSX3HCpSIw0, LMcCiF4czwpp, bF7MZDoBjTzJ, mask=BBM8dxm7YWge) for bF7MZDoBjTzJ in n3sh9UGr5i2w}) return roI3spqORKae(hFt7yOCw4gV2, roI3spqORKae(ES5oEprVxulp(b'\xae\xcbF\x10'), chr(0b1100100) + chr(0b101 + 0o140) + '\143' + chr(0b1101111) + chr(5060 - 4960) + chr(101))('\165' + '\164' + chr(0b11010 + 0o114) + '\055' + '\070'))(LCrwg7lcbmU9)
noahbenson/neuropythy
neuropythy/vision/retinotopy.py
clean_retinotopy_potential
def clean_retinotopy_potential(hemi, retinotopy=Ellipsis, mask=Ellipsis, weight=Ellipsis, surface='midgray', min_weight=Ellipsis, min_eccentricity=0.75, visual_area=None, map_visual_areas=Ellipsis, visual_area_field_signs=Ellipsis, measurement_uncertainty=0.3, measurement_knob=1, magnification_knob=0, fieldsign_knob=6, edge_knob=0): ''' clean_retinotopy_potential(hemi) yields a retinotopic potential function for the given hemisphere that, when minimized, should yeild a cleaned/smoothed version of the retinotopic maps. The potential function f returned by clean_retinotopy_potential() is a PotentialFunction object, as defined in neuropythy.optimize. The potential function consists of four terms that are summed with weights derived from the four '*_knob' options (see below). The function f as well as the three terms that it comprises require as input a matrix X of the pRF centers of mesh or the masked part of the mesh (X0 is the initial measurement matrix). These four potential terms are: * The measurement potential. The retinotopic map that is being minimized is referred to as the measured map, and the measurement potential function, fm(X), increases as X becomes farther from X0. Explicitly, fm(X) is the sum over all pRF centers (x,y) in X (with initial position (x0,y0) in X0) of exp(-0.5 * ((x - x0)**2 + (y - y0)**2) / s**2). The parameter s is the initial eccentricity (sqrt(x0**2 + y0**2)) times the measurement_uncertainty option. * The magnification potential. The retinotopy cleaning is performed in part by attempting to smooth the visual magnification (the inverse of cortical magnification: deg**2 / mm**2) across the cortical surface; the magnification potential fg(X) specifies how the visual magnification contributes to the overall potential: it decreases as the magnification becomes smoother and increases as it becomes less smooth. Explicitly, fg(X) is equal to the sum over all pairs of faces (s,t) sharing one edge e of (vmag(s) - sgn(vmag(t))*vmag(e))**2 + (vmag(t) - sgn(vmag(s))*vmag(e))**2. Note that the function vmag(s) yields the areal visual magnification (deg**2 / mm**2) of any face s and vmag(e) is the square of the linear magnification of any edge e; additionally, the sign of vmag(s) for a face s is always equal to the fieldsign of the face (while for edges vmag(e) is always positive). * The fieldsign potential. The next way in which the potential function attempts to clean the retinotopy is via the use of fieldsign: adjacent faces should have the same fieldsign under most circumstanced. This is modeled by the function fs(X), which is 0 for any pair of faces that have the same fieldsign and non-zero for faces that have different fieldsigns. The form of fs(X) is the sum over all pairs of adjacent triangles (s,t) of -vmag(s)*vmag(t) if vmag(s) and vmag(t) have different fieldsigns, otherwise 0. * The edge potential. Finally, the potential function attempts to force edges to be smooth by penalizing edges whose endpoints are far apart in the visual field. The edge potential function fe(X) is equal to the sum for all edges (u,v) of (x[u] - x[v])**2 + (y[u] - y[v])**2 / mean(eccen(u), eccen(v)). Note additionally that all four potential functions are normalized by a factor intended to keep them on similar scales (this factor is not mentioned above or below, but it is automatically applied to all potential terms). For the magnification, fieldsign, and edge potential terms, the normalization factor is 1/m where m is the number of non-perimeter edges (or, alternately, the number of adjacent face pairs) in the mesh. For the measurement potential term, the normalization factor is 1/W where W is the sum of the weights on the measurement vertices (if no weights are given, they are considered to be 1 for each vertex). The following options may be given: * retinotopy (default: Ellipsis) specifies the retinotopy data to use for the hemisphere; the argument may be a map from retinotopy_data or a valid argument to it. The default indicates that the result of calling retinotopy_data(hemi) is used. * mask (default: Ellipsis) specifies that the specific mask should be used; by default, the mask is made using the vertices kept in to_flatmap('occipital_pole', hemi, radius=pi/2.75). * weight (default: Ellipsis) specifies the weight to use; the default indicates that the weight found in the retinotopy data, if any, should be used. If None, then all values in the mask are equally weighted. * visual_area (default: Ellipsis) specifies the visual area labels to use; the default indicates that the visual area property found in the retinotopy data should be used, if any. If None then no visual area splitting is done. This property is only important if map_visual_areas is not False or None; otherwise it is ignored. * map_visual_areas (default: Ellipsis) specifies whether the return value should be a lazy map whose keys are visual area labels and whose values are recursed calls to this function for only the subset of the mesh with the associated label. May be False or None to specify that a single potential should be yielded. May be a list of labels to specify that only those visual areas should be mapped; the default value (Ellipsis) uses all labels in visual_areas except for 0. * min_weight (default: Ellipsis) specifies the minimum weight to include, after the weights have been normalized such that sum(weights) == 1. If the value is a list or tuple containing a single item [p] then p is taken to be a percentile below which vertices should be excluded. The default, Ellipsis, is equivalent to [5]. * min_eccentricity (default: 0.75) specifies the eccentricity below which no measurement-based potential is applied; i.e., by default, vertices with eccentricity below 0.75 degrees will be considered as having 0 weight. * surface (default: 'midgray') specifies which surface should be used to establish cortical magnification; may be 'pial', 'midgray', or 'white'. * measurement_uncertainty (default: 0.3) is used to determine the standard deviation of the Gaussian potential well used to prevent individual vertices with valid retinotopic measurements from straying too far from their initial measured positions. In other words, if a vertex has a weight that is above threshold and a pRF center of (x0,y0), then the measurement-potential for that vertex is exp(-0.5 * ((x - x0)**2 + (y - y0)**2)/s**2) where (x,y) is the center of the pRF during minimization and s is equal to measurement_uncertainty * sqrt(x0**2 + y0**2). * measurement_knob, magnification_knob, fieldsign_knob, and edge_knob (defaults: 1, 0, 12, 0, respectively) specify the relative weights of the terms of the potential function on a log2 scale. In other words, if the measurement, magnification, fieldsign, and edge potential terms are fm, fg, fs, and fe while the knobs are km, kg, ks, and ke, then the overall potential function f is equal to: f(X) = (2**km * fm(X) + 2**kg * fg(X) + 2**ks * fs(X) + 2**ke * fe(X)) / q where w = (2**km + 2**kg + 2**ks + 2**ke) If any knob is set to None, then its value is 0 instead of 2**k. ''' from neuropythy.util import curry import neuropythy.optimize as op # first, get the mesh and the retinotopy data mesh = geo.to_mesh((hemi, surface)) rdat = (retinotopy_data(mesh) if retinotopy is Ellipsis else retinotopy if pimms.is_map(retinotopy) else retinotopy_data(mesh, retinotopy)) lbls = (rdat.get('visual_area') if visual_area is Ellipsis else None if visual_area is None else hemi.property(visual_area)) wght = (rdat.get('variance_explained') if weight is Ellipsis else weight if pimms.is_vector(weight) else rdat.get(weight) if pimms.is_str(weight) and weight in rdat else hemi.property(weight) if weight is not None else None) # figure out the mask if mask is Ellipsis: if mesh.coordinates.shape[0] == 2: mask = mesh.indices else: mask = geo.to_flatmap('occipital_pole', hemi, radius=np.pi/2.75).labels else: mask = hemi.mask(mask, indices=True) global_field_sign = None # if we are splitting on visual area, we should do that here: if map_visual_areas and lbls is not None: # get the visual areas vas = (np.unique(lbls) if map_visual_areas == 'all' else np.setdiff1d(np.unique(lbls), [0]) if map_visual_areas in [True,Ellipsis] else np.unique(map_visual_areas)) # we also want to have the field-sign map handy if provided if visual_area_field_signs is None: visual_area_field_signs = {} elif visual_area_field_signs is Ellipsis: visual_area_field_signs = {1:-1, 2:1, 3:-1, 4:1} # special case when map_visual_areas is an integer/string (label) if pimms.is_int(map_visual_areas) or pimms.is_str(map_visual_areas): mask = np.intersect1d(mask, np.where(lbls == map_visual_areas)[0]) global_field_sign = visual_area_field_signs.get(map_visual_areas) else: # otherwise we return a lazy map kw = dict(retinotopy=rdat, mask=mask, weight=wght, surface=surface, min_weight=min_weight, min_eccentricity=min_eccentricity, visual_area=lbls, measurement_uncertainty=measurement_uncertainty, measurement_knob=measurement_knob, magnification_knob=magnification_knob, fieldsign_knob=fieldsign_knob, edge_knob=edge_knob, visual_area_field_signs=visual_area_field_signs) return pimms.lazy_map( {lbl: curry(clean_retinotopy_potential, hemi, map_visual_areas=lbl, **kw) for lbl in vas}) # fix rdat, weight, and mesh to match the mask (supermesh, orig_mask) = (mesh, mask) rdat = {k:(v[mask] if len(v) > len(mask) else v) for (k,v) in six.iteritems(rdat)} mesh = supermesh.submesh(mask) # possible that the mask got further downsampled: mask = supermesh.tess.index(mesh.labels) if len(mask) == len(orig_mask): smsk = np.arange(len(mask)) else: tmp = set(mask) smsk = np.asarray([k for (k,u) in enumerate(orig_mask) if u in tmp]) n = mesh.vertex_count # number vertices N = 2*n # number parameters if wght is None: wght = np.ones(n) elif len(wght) == len(orig_mask): wght = np.array(wght)[smsk] elif len(wght) > n: wght = np.array(wght)[mask] else: wght = np.array(wght) wght[~np.isfinite(wght)] = 0 if min_eccentricity < 0 or np.isclose(min_eccentricity, 0): raise ValueError('min_eccentricity should be small but must be > 0') # we'll need a potential function... # The input to the potential function will be a 2 x N matrix of (x,y) visual field coordinates: xy = op.identity (x,y) = (xy[np.arange(0,N,2)],xy[np.arange(1,N,2)]) # We have a few components to the potential function # [1] Deviation from measurements: # These are the initial measurements we will use xy0 = np.array(as_retinotopy(rdat, 'geographical')).T if len(xy0) == len(orig_mask): xy0 = xy0[smsk] elif len(xy0) > n: xy0 = xy0[mask] (x0,y0) = xy0.T xy0 = xy0.flatten() ecc0 = np.sqrt(x0**2 + y0**2) ii = np.where(ecc0 > min_eccentricity)[0] minw = (0 if min_weight is None else np.percentile(wght[ii], 5) if min_weight is Ellipsis else min_weight if pimms.is_number(min_weight) else 0 if np.std(wght[ii]) < 0.00001 else np.percentile(wght[ii], min_weight[0])) ii = np.intersect1d(ii, np.where(wght > minw)[0]) wsum = np.sum(wght[ii]) if wsum < 0 or np.isclose(wsum, 0): raise ValueError('all-zero weights given') wght = wght / wsum s2_meas = (measurement_uncertainty * ecc0[ii])**2 d2_meas = (x[ii] - x0[ii])**2 + (y[ii] - y0[ii])**2 f_meas = (1 - op.exp(-0.5*d2_meas/s2_meas)) * wght[ii] f_meas = op.sum(f_meas) # [2] For adjacent triangles, how different are the cortical magnifications? sarea = mesh.face_areas faces = mesh.tess.indexed_faces.T selen = mesh.edge_lengths # we want to ensure that vmag is locally smooth across triangles, but we need # to make sure there aren't any edges or faces with 0 surface-areas (so that # we don't divide by zero) mnden = 0.0001 (e,s,t) = np.transpose([(i,e[0],e[1]) for (i,e) in enumerate(mesh.tess.edge_faces) if len(e) == 2 and selen[i] > mnden if sarea[e[0]] > mnden and sarea[e[1]] > mnden]) m = len(e) (fis,q) = np.unique(np.concatenate([s,t]), return_inverse=True) (s,t) = np.reshape(q, (2,-1)) faces = faces[fis] sarea = sarea[fis] selen = selen[e] (u,v) = mesh.tess.indexed_edges[:,e] # we will use visual mag instead of cortical mag: this way we aren't worried about # varea going to 0 and creating a singularity, and it should have a linear # relationship with eccentricity velen2 = (x[u] - x[v])**2 + (y[u] - y[v])**2 vme = velen2 / selen**2 # visual magnification: edges varea = op.signed_face_areas(faces) vmf = varea / sarea # visual magnification: faces vms = vmf[s] vmt = vmf[t] vsgns = op.sign(vmf) f_magn = (1.0 / m) * op.sum((vms - vsgns[t]*vme)**2 + (vmt - vsgns[s]*vme)**2) # [3] we want a special function for faces whose vmags are different signs if global_field_sign is None: f_sign = op.compose(op.piecewise(0, ((-np.inf, 0), -op.identity)), vms*vmt) f_sign = (1.0 / m) * op.sum(f_sign) else: vmfsgn = vmf * global_field_sign f_sign = op.compose(op.piecewise(0, ((-np.inf, 0), -op.identity)), vmfsgn) f_sign = (1.0 / m) * op.sum(f_sign) # and the edge potential... ex = 0.5*(x[u] + x[v]) ey = 0.5*(y[u] + y[v]) eecc2 = (ex**2 + ey**2) f_edge = (1.0 / m) * op.sum(((x[u] - x[v])**2 + (y[u] - y[v])**2) / (eecc2 + 0.05)) # This is the potential function: (k_meas, k_magn, k_sign, k_edge) = [ 0 if knob is None else (2**knob) for knob in (measurement_knob, magnification_knob, fieldsign_knob, edge_knob)] fs = (k_meas*f_meas, k_magn*f_magn, k_sign*f_sign, k_edge*f_edge) f = (fs[0] + fs[1] + fs[2] + fs[3]) / (k_meas + k_magn + k_sign + k_edge) xy0 = np.reshape(xy0, (-1,2)) object.__setattr__(f, 'meta_data', pyr.m(f_meas=f_meas, f_magn=f_magn, f_sign=f_sign, f_edge=f_edge, mesh=mesh, X0=xy0)) return f
python
def clean_retinotopy_potential(hemi, retinotopy=Ellipsis, mask=Ellipsis, weight=Ellipsis, surface='midgray', min_weight=Ellipsis, min_eccentricity=0.75, visual_area=None, map_visual_areas=Ellipsis, visual_area_field_signs=Ellipsis, measurement_uncertainty=0.3, measurement_knob=1, magnification_knob=0, fieldsign_knob=6, edge_knob=0): ''' clean_retinotopy_potential(hemi) yields a retinotopic potential function for the given hemisphere that, when minimized, should yeild a cleaned/smoothed version of the retinotopic maps. The potential function f returned by clean_retinotopy_potential() is a PotentialFunction object, as defined in neuropythy.optimize. The potential function consists of four terms that are summed with weights derived from the four '*_knob' options (see below). The function f as well as the three terms that it comprises require as input a matrix X of the pRF centers of mesh or the masked part of the mesh (X0 is the initial measurement matrix). These four potential terms are: * The measurement potential. The retinotopic map that is being minimized is referred to as the measured map, and the measurement potential function, fm(X), increases as X becomes farther from X0. Explicitly, fm(X) is the sum over all pRF centers (x,y) in X (with initial position (x0,y0) in X0) of exp(-0.5 * ((x - x0)**2 + (y - y0)**2) / s**2). The parameter s is the initial eccentricity (sqrt(x0**2 + y0**2)) times the measurement_uncertainty option. * The magnification potential. The retinotopy cleaning is performed in part by attempting to smooth the visual magnification (the inverse of cortical magnification: deg**2 / mm**2) across the cortical surface; the magnification potential fg(X) specifies how the visual magnification contributes to the overall potential: it decreases as the magnification becomes smoother and increases as it becomes less smooth. Explicitly, fg(X) is equal to the sum over all pairs of faces (s,t) sharing one edge e of (vmag(s) - sgn(vmag(t))*vmag(e))**2 + (vmag(t) - sgn(vmag(s))*vmag(e))**2. Note that the function vmag(s) yields the areal visual magnification (deg**2 / mm**2) of any face s and vmag(e) is the square of the linear magnification of any edge e; additionally, the sign of vmag(s) for a face s is always equal to the fieldsign of the face (while for edges vmag(e) is always positive). * The fieldsign potential. The next way in which the potential function attempts to clean the retinotopy is via the use of fieldsign: adjacent faces should have the same fieldsign under most circumstanced. This is modeled by the function fs(X), which is 0 for any pair of faces that have the same fieldsign and non-zero for faces that have different fieldsigns. The form of fs(X) is the sum over all pairs of adjacent triangles (s,t) of -vmag(s)*vmag(t) if vmag(s) and vmag(t) have different fieldsigns, otherwise 0. * The edge potential. Finally, the potential function attempts to force edges to be smooth by penalizing edges whose endpoints are far apart in the visual field. The edge potential function fe(X) is equal to the sum for all edges (u,v) of (x[u] - x[v])**2 + (y[u] - y[v])**2 / mean(eccen(u), eccen(v)). Note additionally that all four potential functions are normalized by a factor intended to keep them on similar scales (this factor is not mentioned above or below, but it is automatically applied to all potential terms). For the magnification, fieldsign, and edge potential terms, the normalization factor is 1/m where m is the number of non-perimeter edges (or, alternately, the number of adjacent face pairs) in the mesh. For the measurement potential term, the normalization factor is 1/W where W is the sum of the weights on the measurement vertices (if no weights are given, they are considered to be 1 for each vertex). The following options may be given: * retinotopy (default: Ellipsis) specifies the retinotopy data to use for the hemisphere; the argument may be a map from retinotopy_data or a valid argument to it. The default indicates that the result of calling retinotopy_data(hemi) is used. * mask (default: Ellipsis) specifies that the specific mask should be used; by default, the mask is made using the vertices kept in to_flatmap('occipital_pole', hemi, radius=pi/2.75). * weight (default: Ellipsis) specifies the weight to use; the default indicates that the weight found in the retinotopy data, if any, should be used. If None, then all values in the mask are equally weighted. * visual_area (default: Ellipsis) specifies the visual area labels to use; the default indicates that the visual area property found in the retinotopy data should be used, if any. If None then no visual area splitting is done. This property is only important if map_visual_areas is not False or None; otherwise it is ignored. * map_visual_areas (default: Ellipsis) specifies whether the return value should be a lazy map whose keys are visual area labels and whose values are recursed calls to this function for only the subset of the mesh with the associated label. May be False or None to specify that a single potential should be yielded. May be a list of labels to specify that only those visual areas should be mapped; the default value (Ellipsis) uses all labels in visual_areas except for 0. * min_weight (default: Ellipsis) specifies the minimum weight to include, after the weights have been normalized such that sum(weights) == 1. If the value is a list or tuple containing a single item [p] then p is taken to be a percentile below which vertices should be excluded. The default, Ellipsis, is equivalent to [5]. * min_eccentricity (default: 0.75) specifies the eccentricity below which no measurement-based potential is applied; i.e., by default, vertices with eccentricity below 0.75 degrees will be considered as having 0 weight. * surface (default: 'midgray') specifies which surface should be used to establish cortical magnification; may be 'pial', 'midgray', or 'white'. * measurement_uncertainty (default: 0.3) is used to determine the standard deviation of the Gaussian potential well used to prevent individual vertices with valid retinotopic measurements from straying too far from their initial measured positions. In other words, if a vertex has a weight that is above threshold and a pRF center of (x0,y0), then the measurement-potential for that vertex is exp(-0.5 * ((x - x0)**2 + (y - y0)**2)/s**2) where (x,y) is the center of the pRF during minimization and s is equal to measurement_uncertainty * sqrt(x0**2 + y0**2). * measurement_knob, magnification_knob, fieldsign_knob, and edge_knob (defaults: 1, 0, 12, 0, respectively) specify the relative weights of the terms of the potential function on a log2 scale. In other words, if the measurement, magnification, fieldsign, and edge potential terms are fm, fg, fs, and fe while the knobs are km, kg, ks, and ke, then the overall potential function f is equal to: f(X) = (2**km * fm(X) + 2**kg * fg(X) + 2**ks * fs(X) + 2**ke * fe(X)) / q where w = (2**km + 2**kg + 2**ks + 2**ke) If any knob is set to None, then its value is 0 instead of 2**k. ''' from neuropythy.util import curry import neuropythy.optimize as op # first, get the mesh and the retinotopy data mesh = geo.to_mesh((hemi, surface)) rdat = (retinotopy_data(mesh) if retinotopy is Ellipsis else retinotopy if pimms.is_map(retinotopy) else retinotopy_data(mesh, retinotopy)) lbls = (rdat.get('visual_area') if visual_area is Ellipsis else None if visual_area is None else hemi.property(visual_area)) wght = (rdat.get('variance_explained') if weight is Ellipsis else weight if pimms.is_vector(weight) else rdat.get(weight) if pimms.is_str(weight) and weight in rdat else hemi.property(weight) if weight is not None else None) # figure out the mask if mask is Ellipsis: if mesh.coordinates.shape[0] == 2: mask = mesh.indices else: mask = geo.to_flatmap('occipital_pole', hemi, radius=np.pi/2.75).labels else: mask = hemi.mask(mask, indices=True) global_field_sign = None # if we are splitting on visual area, we should do that here: if map_visual_areas and lbls is not None: # get the visual areas vas = (np.unique(lbls) if map_visual_areas == 'all' else np.setdiff1d(np.unique(lbls), [0]) if map_visual_areas in [True,Ellipsis] else np.unique(map_visual_areas)) # we also want to have the field-sign map handy if provided if visual_area_field_signs is None: visual_area_field_signs = {} elif visual_area_field_signs is Ellipsis: visual_area_field_signs = {1:-1, 2:1, 3:-1, 4:1} # special case when map_visual_areas is an integer/string (label) if pimms.is_int(map_visual_areas) or pimms.is_str(map_visual_areas): mask = np.intersect1d(mask, np.where(lbls == map_visual_areas)[0]) global_field_sign = visual_area_field_signs.get(map_visual_areas) else: # otherwise we return a lazy map kw = dict(retinotopy=rdat, mask=mask, weight=wght, surface=surface, min_weight=min_weight, min_eccentricity=min_eccentricity, visual_area=lbls, measurement_uncertainty=measurement_uncertainty, measurement_knob=measurement_knob, magnification_knob=magnification_knob, fieldsign_knob=fieldsign_knob, edge_knob=edge_knob, visual_area_field_signs=visual_area_field_signs) return pimms.lazy_map( {lbl: curry(clean_retinotopy_potential, hemi, map_visual_areas=lbl, **kw) for lbl in vas}) # fix rdat, weight, and mesh to match the mask (supermesh, orig_mask) = (mesh, mask) rdat = {k:(v[mask] if len(v) > len(mask) else v) for (k,v) in six.iteritems(rdat)} mesh = supermesh.submesh(mask) # possible that the mask got further downsampled: mask = supermesh.tess.index(mesh.labels) if len(mask) == len(orig_mask): smsk = np.arange(len(mask)) else: tmp = set(mask) smsk = np.asarray([k for (k,u) in enumerate(orig_mask) if u in tmp]) n = mesh.vertex_count # number vertices N = 2*n # number parameters if wght is None: wght = np.ones(n) elif len(wght) == len(orig_mask): wght = np.array(wght)[smsk] elif len(wght) > n: wght = np.array(wght)[mask] else: wght = np.array(wght) wght[~np.isfinite(wght)] = 0 if min_eccentricity < 0 or np.isclose(min_eccentricity, 0): raise ValueError('min_eccentricity should be small but must be > 0') # we'll need a potential function... # The input to the potential function will be a 2 x N matrix of (x,y) visual field coordinates: xy = op.identity (x,y) = (xy[np.arange(0,N,2)],xy[np.arange(1,N,2)]) # We have a few components to the potential function # [1] Deviation from measurements: # These are the initial measurements we will use xy0 = np.array(as_retinotopy(rdat, 'geographical')).T if len(xy0) == len(orig_mask): xy0 = xy0[smsk] elif len(xy0) > n: xy0 = xy0[mask] (x0,y0) = xy0.T xy0 = xy0.flatten() ecc0 = np.sqrt(x0**2 + y0**2) ii = np.where(ecc0 > min_eccentricity)[0] minw = (0 if min_weight is None else np.percentile(wght[ii], 5) if min_weight is Ellipsis else min_weight if pimms.is_number(min_weight) else 0 if np.std(wght[ii]) < 0.00001 else np.percentile(wght[ii], min_weight[0])) ii = np.intersect1d(ii, np.where(wght > minw)[0]) wsum = np.sum(wght[ii]) if wsum < 0 or np.isclose(wsum, 0): raise ValueError('all-zero weights given') wght = wght / wsum s2_meas = (measurement_uncertainty * ecc0[ii])**2 d2_meas = (x[ii] - x0[ii])**2 + (y[ii] - y0[ii])**2 f_meas = (1 - op.exp(-0.5*d2_meas/s2_meas)) * wght[ii] f_meas = op.sum(f_meas) # [2] For adjacent triangles, how different are the cortical magnifications? sarea = mesh.face_areas faces = mesh.tess.indexed_faces.T selen = mesh.edge_lengths # we want to ensure that vmag is locally smooth across triangles, but we need # to make sure there aren't any edges or faces with 0 surface-areas (so that # we don't divide by zero) mnden = 0.0001 (e,s,t) = np.transpose([(i,e[0],e[1]) for (i,e) in enumerate(mesh.tess.edge_faces) if len(e) == 2 and selen[i] > mnden if sarea[e[0]] > mnden and sarea[e[1]] > mnden]) m = len(e) (fis,q) = np.unique(np.concatenate([s,t]), return_inverse=True) (s,t) = np.reshape(q, (2,-1)) faces = faces[fis] sarea = sarea[fis] selen = selen[e] (u,v) = mesh.tess.indexed_edges[:,e] # we will use visual mag instead of cortical mag: this way we aren't worried about # varea going to 0 and creating a singularity, and it should have a linear # relationship with eccentricity velen2 = (x[u] - x[v])**2 + (y[u] - y[v])**2 vme = velen2 / selen**2 # visual magnification: edges varea = op.signed_face_areas(faces) vmf = varea / sarea # visual magnification: faces vms = vmf[s] vmt = vmf[t] vsgns = op.sign(vmf) f_magn = (1.0 / m) * op.sum((vms - vsgns[t]*vme)**2 + (vmt - vsgns[s]*vme)**2) # [3] we want a special function for faces whose vmags are different signs if global_field_sign is None: f_sign = op.compose(op.piecewise(0, ((-np.inf, 0), -op.identity)), vms*vmt) f_sign = (1.0 / m) * op.sum(f_sign) else: vmfsgn = vmf * global_field_sign f_sign = op.compose(op.piecewise(0, ((-np.inf, 0), -op.identity)), vmfsgn) f_sign = (1.0 / m) * op.sum(f_sign) # and the edge potential... ex = 0.5*(x[u] + x[v]) ey = 0.5*(y[u] + y[v]) eecc2 = (ex**2 + ey**2) f_edge = (1.0 / m) * op.sum(((x[u] - x[v])**2 + (y[u] - y[v])**2) / (eecc2 + 0.05)) # This is the potential function: (k_meas, k_magn, k_sign, k_edge) = [ 0 if knob is None else (2**knob) for knob in (measurement_knob, magnification_knob, fieldsign_knob, edge_knob)] fs = (k_meas*f_meas, k_magn*f_magn, k_sign*f_sign, k_edge*f_edge) f = (fs[0] + fs[1] + fs[2] + fs[3]) / (k_meas + k_magn + k_sign + k_edge) xy0 = np.reshape(xy0, (-1,2)) object.__setattr__(f, 'meta_data', pyr.m(f_meas=f_meas, f_magn=f_magn, f_sign=f_sign, f_edge=f_edge, mesh=mesh, X0=xy0)) return f
[ "def", "clean_retinotopy_potential", "(", "hemi", ",", "retinotopy", "=", "Ellipsis", ",", "mask", "=", "Ellipsis", ",", "weight", "=", "Ellipsis", ",", "surface", "=", "'midgray'", ",", "min_weight", "=", "Ellipsis", ",", "min_eccentricity", "=", "0.75", ",",...
clean_retinotopy_potential(hemi) yields a retinotopic potential function for the given hemisphere that, when minimized, should yeild a cleaned/smoothed version of the retinotopic maps. The potential function f returned by clean_retinotopy_potential() is a PotentialFunction object, as defined in neuropythy.optimize. The potential function consists of four terms that are summed with weights derived from the four '*_knob' options (see below). The function f as well as the three terms that it comprises require as input a matrix X of the pRF centers of mesh or the masked part of the mesh (X0 is the initial measurement matrix). These four potential terms are: * The measurement potential. The retinotopic map that is being minimized is referred to as the measured map, and the measurement potential function, fm(X), increases as X becomes farther from X0. Explicitly, fm(X) is the sum over all pRF centers (x,y) in X (with initial position (x0,y0) in X0) of exp(-0.5 * ((x - x0)**2 + (y - y0)**2) / s**2). The parameter s is the initial eccentricity (sqrt(x0**2 + y0**2)) times the measurement_uncertainty option. * The magnification potential. The retinotopy cleaning is performed in part by attempting to smooth the visual magnification (the inverse of cortical magnification: deg**2 / mm**2) across the cortical surface; the magnification potential fg(X) specifies how the visual magnification contributes to the overall potential: it decreases as the magnification becomes smoother and increases as it becomes less smooth. Explicitly, fg(X) is equal to the sum over all pairs of faces (s,t) sharing one edge e of (vmag(s) - sgn(vmag(t))*vmag(e))**2 + (vmag(t) - sgn(vmag(s))*vmag(e))**2. Note that the function vmag(s) yields the areal visual magnification (deg**2 / mm**2) of any face s and vmag(e) is the square of the linear magnification of any edge e; additionally, the sign of vmag(s) for a face s is always equal to the fieldsign of the face (while for edges vmag(e) is always positive). * The fieldsign potential. The next way in which the potential function attempts to clean the retinotopy is via the use of fieldsign: adjacent faces should have the same fieldsign under most circumstanced. This is modeled by the function fs(X), which is 0 for any pair of faces that have the same fieldsign and non-zero for faces that have different fieldsigns. The form of fs(X) is the sum over all pairs of adjacent triangles (s,t) of -vmag(s)*vmag(t) if vmag(s) and vmag(t) have different fieldsigns, otherwise 0. * The edge potential. Finally, the potential function attempts to force edges to be smooth by penalizing edges whose endpoints are far apart in the visual field. The edge potential function fe(X) is equal to the sum for all edges (u,v) of (x[u] - x[v])**2 + (y[u] - y[v])**2 / mean(eccen(u), eccen(v)). Note additionally that all four potential functions are normalized by a factor intended to keep them on similar scales (this factor is not mentioned above or below, but it is automatically applied to all potential terms). For the magnification, fieldsign, and edge potential terms, the normalization factor is 1/m where m is the number of non-perimeter edges (or, alternately, the number of adjacent face pairs) in the mesh. For the measurement potential term, the normalization factor is 1/W where W is the sum of the weights on the measurement vertices (if no weights are given, they are considered to be 1 for each vertex). The following options may be given: * retinotopy (default: Ellipsis) specifies the retinotopy data to use for the hemisphere; the argument may be a map from retinotopy_data or a valid argument to it. The default indicates that the result of calling retinotopy_data(hemi) is used. * mask (default: Ellipsis) specifies that the specific mask should be used; by default, the mask is made using the vertices kept in to_flatmap('occipital_pole', hemi, radius=pi/2.75). * weight (default: Ellipsis) specifies the weight to use; the default indicates that the weight found in the retinotopy data, if any, should be used. If None, then all values in the mask are equally weighted. * visual_area (default: Ellipsis) specifies the visual area labels to use; the default indicates that the visual area property found in the retinotopy data should be used, if any. If None then no visual area splitting is done. This property is only important if map_visual_areas is not False or None; otherwise it is ignored. * map_visual_areas (default: Ellipsis) specifies whether the return value should be a lazy map whose keys are visual area labels and whose values are recursed calls to this function for only the subset of the mesh with the associated label. May be False or None to specify that a single potential should be yielded. May be a list of labels to specify that only those visual areas should be mapped; the default value (Ellipsis) uses all labels in visual_areas except for 0. * min_weight (default: Ellipsis) specifies the minimum weight to include, after the weights have been normalized such that sum(weights) == 1. If the value is a list or tuple containing a single item [p] then p is taken to be a percentile below which vertices should be excluded. The default, Ellipsis, is equivalent to [5]. * min_eccentricity (default: 0.75) specifies the eccentricity below which no measurement-based potential is applied; i.e., by default, vertices with eccentricity below 0.75 degrees will be considered as having 0 weight. * surface (default: 'midgray') specifies which surface should be used to establish cortical magnification; may be 'pial', 'midgray', or 'white'. * measurement_uncertainty (default: 0.3) is used to determine the standard deviation of the Gaussian potential well used to prevent individual vertices with valid retinotopic measurements from straying too far from their initial measured positions. In other words, if a vertex has a weight that is above threshold and a pRF center of (x0,y0), then the measurement-potential for that vertex is exp(-0.5 * ((x - x0)**2 + (y - y0)**2)/s**2) where (x,y) is the center of the pRF during minimization and s is equal to measurement_uncertainty * sqrt(x0**2 + y0**2). * measurement_knob, magnification_knob, fieldsign_knob, and edge_knob (defaults: 1, 0, 12, 0, respectively) specify the relative weights of the terms of the potential function on a log2 scale. In other words, if the measurement, magnification, fieldsign, and edge potential terms are fm, fg, fs, and fe while the knobs are km, kg, ks, and ke, then the overall potential function f is equal to: f(X) = (2**km * fm(X) + 2**kg * fg(X) + 2**ks * fs(X) + 2**ke * fe(X)) / q where w = (2**km + 2**kg + 2**ks + 2**ke) If any knob is set to None, then its value is 0 instead of 2**k.
[ "clean_retinotopy_potential", "(", "hemi", ")", "yields", "a", "retinotopic", "potential", "function", "for", "the", "given", "hemisphere", "that", "when", "minimized", "should", "yeild", "a", "cleaned", "/", "smoothed", "version", "of", "the", "retinotopic", "map...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/vision/retinotopy.py#L1929-L2166
train
This function returns a function that can be used to clean up the non - minimized or smoothed version of the retinotopy of the given hemisphere.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRiM1qvaW7,WbNHlDKp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XoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b0 + 0o63) + chr(48) + '\063', 2817 - 2809), nzTpIcepk0o8('\060' + chr(111) + '\x33' + '\x34' + chr(0b11101 + 0o30), 17066 - 17058), nzTpIcepk0o8(chr(1622 - 1574) + '\x6f' + chr(0b10101 + 0o35) + '\067', 0o10), nzTpIcepk0o8(chr(1268 - 1220) + chr(0b101 + 0o152) + chr(1497 - 1447) + chr(0b101010 + 0o6) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(517 - 468) + chr(51) + chr(0b11111 + 0o23), 5106 - 5098), nzTpIcepk0o8('\060' + '\157' + '\062' + chr(0b101 + 0o55) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(355 - 305) + chr(1227 - 1179) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(8846 - 8735) + '\062' + chr(51) + chr(55), 7861 - 7853), nzTpIcepk0o8('\x30' + chr(1790 - 1679) + chr(0b100010 + 0o20) + '\062' + chr(0b110111), 0o10), nzTpIcepk0o8(chr(2295 - 2247) + '\157' + chr(115 - 66) + chr(52) + chr(0b110100), 24600 - 24592), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b1101111) + chr(0b11001 + 0o32) + '\x37', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1001010 + 0o45) + '\x31' + chr(53) + chr(0b100000 + 0o23), 0o10), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(0b1101111) + chr(0b101001 + 0o12) + '\060' + chr(53), 5775 - 5767), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b1101111) + '\063' + chr(1239 - 1187) + '\x35', 8), nzTpIcepk0o8(chr(975 - 927) + chr(0b1100011 + 0o14) + chr(0b101101 + 0o6) + chr(0b110101) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(4818 - 4707) + chr(0b110110) + chr(0b100100 + 0o15), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b11111 + 0o120) + '\063' + chr(498 - 450), 0o10), nzTpIcepk0o8(chr(0b10011 + 0o35) + '\x6f' + '\x34' + chr(50), 17737 - 17729), nzTpIcepk0o8('\060' + chr(0b11000 + 0o127) + chr(640 - 590) + chr(52) + chr(0b100101 + 0o16), 36215 - 36207), nzTpIcepk0o8(chr(2143 - 2095) + '\x6f' + '\061' + '\061' + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(11846 - 11735) + '\062' + chr(0b110010) + '\063', 0o10), nzTpIcepk0o8(chr(1206 - 1158) + chr(0b1011111 + 0o20) + chr(0b110111) + '\x34', 36815 - 36807), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b101001 + 0o11) + chr(380 - 329) + chr(877 - 822), 8), nzTpIcepk0o8(chr(2025 - 1977) + chr(10782 - 10671) + '\x33' + chr(50) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(903 - 855) + chr(0b1010010 + 0o35) + chr(0b110010) + chr(0b10110 + 0o40) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + chr(51) + '\x33', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + '\x35' + chr(0b110101), 54629 - 54621), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\x6f' + chr(0b11100 + 0o26) + chr(51) + chr(1590 - 1540), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2125 - 2074) + chr(669 - 615), 11614 - 11606), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(111) + '\062' + chr(2124 - 2071) + chr(0b110001), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + '\x37' + chr(0b11101 + 0o26), ord("\x08")), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(0b10101 + 0o132) + chr(0b110001) + '\064' + chr(874 - 825), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + '\x34' + chr(51), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + '\065' + chr(937 - 884), 8), nzTpIcepk0o8(chr(48) + '\157' + chr(1102 - 1050) + '\x33', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(2072 - 2023) + chr(0b100001 + 0o26) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1648 - 1597) + '\067' + chr(0b110001), 55550 - 55542), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(693 - 644) + '\x37' + chr(54), 0b1000), nzTpIcepk0o8(chr(536 - 488) + chr(0b1101111) + chr(835 - 784) + chr(0b10100 + 0o36) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b110111 + 0o70) + '\x31' + '\067' + chr(48), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b1101111) + '\065' + chr(0b1000 + 0o50), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xed'), chr(0b11 + 0o141) + chr(9247 - 9146) + chr(4129 - 4030) + '\157' + '\x64' + chr(0b11101 + 0o110))('\x75' + chr(7424 - 7308) + chr(0b1100110) + '\x2d' + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def u3t0oKVNFzVp(nRSX3HCpSIw0, Ud8JOD1j6kPi=RjQP07DYIdkf, BBM8dxm7YWge=RjQP07DYIdkf, iBxKYeMqq_Bt=RjQP07DYIdkf, EE4YQNLOwx18=roI3spqORKae(ES5oEprVxulp(b'\xae\x8cs\xe5(\xf0\xfd'), '\144' + chr(7490 - 7389) + chr(0b1001001 + 0o32) + chr(2456 - 2345) + chr(0b1100100) + chr(0b101000 + 0o75))(chr(117) + chr(0b1110100) + chr(0b100100 + 0o102) + chr(0b101101) + '\070'), jh05iVmeM9Oa=RjQP07DYIdkf, pNXobewX5Zv9=0.75, sGYgOtU0jgXU=None, Rhml12GjPI9Q=RjQP07DYIdkf, rrsR2Zx9VeMz=RjQP07DYIdkf, i6qv6MwGO0UI=0.3, yJMqHHLOXE3E=nzTpIcepk0o8(chr(1862 - 1814) + '\157' + chr(49), 0o10), dZAruo1Dus85=nzTpIcepk0o8('\060' + chr(0b1010010 + 0o35) + '\060', 37909 - 37901), cZpG0lfJVjLV=nzTpIcepk0o8('\060' + chr(6582 - 6471) + chr(0b101001 + 0o15), ord("\x08")), xD7Mw0y2ezOr=nzTpIcepk0o8('\060' + chr(12306 - 12195) + '\060', 8)): (BoZcxPaOCjhS,) = (roI3spqORKae(roI3spqORKae(rFFUeiYWzOhx(roI3spqORKae(ES5oEprVxulp(b'\xad\x80b\xf05\xe1\xfd\xeb\xff\x1d1\x1e\xb1\x8c\x84'), '\x64' + chr(2972 - 2871) + chr(99) + '\x6f' + chr(6758 - 6658) + chr(0b1100101))(chr(0b110100 + 0o101) + chr(0b1110100) + '\146' + '\x2d' + chr(0b100 + 0o64)), roI3spqORKae(ES5oEprVxulp(b'\xa0\x90e\xf0#'), chr(100) + '\145' + chr(99) + chr(0b1100101 + 0o12) + chr(0b1100100) + chr(101))(chr(13594 - 13477) + chr(116) + '\x66' + chr(0b11010 + 0o23) + chr(56))), roI3spqORKae(ES5oEprVxulp(b'\xb6\x91~\xee'), '\x64' + chr(0b1000110 + 0o37) + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(117) + chr(116) + chr(0b1100110) + chr(45) + chr(56))), roI3spqORKae(ES5oEprVxulp(b'\xa0\x90e\xf0#'), chr(100) + '\145' + '\143' + chr(0b1101111) + '\x64' + chr(2717 - 2616))(chr(117) + chr(0b1110100) + '\x66' + '\x2d' + chr(578 - 522))),) (HZiF2fh8hyim,) = (roI3spqORKae(rFFUeiYWzOhx(roI3spqORKae(ES5oEprVxulp(b'\xad\x80b\xf05\xe1\xfd\xeb\xff\x1d1\x04\xb5\x91\x81\\qX\xc6'), chr(0b11110 + 0o106) + chr(4408 - 4307) + chr(99) + chr(0b101100 + 0o103) + chr(0b1011000 + 0o14) + chr(0b101111 + 0o66))(chr(0b1011111 + 0o26) + chr(0b1110100) + '\146' + chr(0b101101) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xac\x95c\xeb7\xf8\xfe\xfa'), chr(6767 - 6667) + chr(9450 - 9349) + '\x63' + chr(111) + chr(3426 - 3326) + chr(1548 - 1447))('\165' + chr(0b1100001 + 0o23) + '\146' + '\x2d' + '\x38')), roI3spqORKae(ES5oEprVxulp(b'\xac\x95c\xeb7\xf8\xfe\xfa'), '\x64' + chr(2900 - 2799) + chr(99) + chr(111) + chr(0b1011100 + 0o10) + '\145')(chr(569 - 452) + chr(0b1100101 + 0o17) + '\146' + '\x2d' + '\x38')),) olfRNjSgvQh6 = GZNMH8A4U3yp.to_mesh((nRSX3HCpSIw0, EE4YQNLOwx18)) P1XDPYIBf5hd = CTw69XTnIqxx(olfRNjSgvQh6) if Ud8JOD1j6kPi is RjQP07DYIdkf else Ud8JOD1j6kPi if zAgo8354IlJ7.is_map(Ud8JOD1j6kPi) else CTw69XTnIqxx(olfRNjSgvQh6, Ud8JOD1j6kPi) IxwK_moSBywk = P1XDPYIBf5hd.GUKetu4xaGsJ(roI3spqORKae(ES5oEprVxulp(b'\xb5\x8cd\xf7;\xfd\xdb\xfe\xe5\x01~'), chr(0b1100100) + '\145' + chr(0b1100011) + chr(0b1101111) + '\x64' + '\145')('\x75' + chr(6523 - 6407) + chr(102) + '\055' + '\x38')) if sGYgOtU0jgXU is RjQP07DYIdkf else None if sGYgOtU0jgXU is None else nRSX3HCpSIw0.property(sGYgOtU0jgXU) QzevBcmRhtFV = P1XDPYIBf5hd.GUKetu4xaGsJ(roI3spqORKae(ES5oEprVxulp(b'\xb5\x84e\xeb;\xff\xe7\xfa\xc8\x01g\x1b\xa9\x84\x81_}F'), chr(7234 - 7134) + chr(101) + '\143' + chr(8910 - 8799) + chr(0b1001001 + 0o33) + chr(5033 - 4932))(chr(117) + chr(0b1110100) + '\x66' + chr(1892 - 1847) + chr(0b1111 + 0o51))) if iBxKYeMqq_Bt is RjQP07DYIdkf else iBxKYeMqq_Bt if zAgo8354IlJ7.is_vector(iBxKYeMqq_Bt) else P1XDPYIBf5hd.GUKetu4xaGsJ(iBxKYeMqq_Bt) if zAgo8354IlJ7.is_str(iBxKYeMqq_Bt) and iBxKYeMqq_Bt in P1XDPYIBf5hd else nRSX3HCpSIw0.property(iBxKYeMqq_Bt) if iBxKYeMqq_Bt is not None else None if BBM8dxm7YWge is RjQP07DYIdkf: if roI3spqORKae(olfRNjSgvQh6.coordinates, roI3spqORKae(ES5oEprVxulp(b"\xaf\x8du\xcfj\xa8\xb6\xde\xd13'\r"), chr(100) + chr(0b1100101) + chr(6411 - 6312) + '\x6f' + chr(8607 - 8507) + '\x65')(chr(117) + chr(116) + chr(0b1100110) + '\x2d' + chr(0b111000)))[nzTpIcepk0o8(chr(708 - 660) + '\157' + chr(0b110000), 8)] == nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(5265 - 5154) + chr(0b110010), 0b1000): BBM8dxm7YWge = olfRNjSgvQh6.eQBPfEuGz7C1 else: BBM8dxm7YWge = GZNMH8A4U3yp.to_flatmap(roI3spqORKae(ES5oEprVxulp(b'\xac\x86t\xeb*\xf8\xf0\xfe\xfb;o\x04\xa9\x80'), chr(0b1001110 + 0o26) + chr(5620 - 5519) + '\143' + chr(0b1101111) + '\144' + chr(0b1100101))(chr(117) + chr(116) + chr(0b100011 + 0o103) + '\055' + chr(56)), nRSX3HCpSIw0, radius=nDF4gVNx0u9Q.pi / 2.75).Ar0km3TBAurm else: BBM8dxm7YWge = nRSX3HCpSIw0.BBM8dxm7YWge(BBM8dxm7YWge, indices=nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b101010 + 0o7), 8)) RZVPA3BBjG6k = None if Rhml12GjPI9Q and IxwK_moSBywk is not None: vk8F4sVxDtAX = nDF4gVNx0u9Q.G3de2eWQaS0D(IxwK_moSBywk) if Rhml12GjPI9Q == roI3spqORKae(ES5oEprVxulp(b'\xa2\x89{'), '\144' + '\145' + chr(3133 - 3034) + chr(9378 - 9267) + chr(0b1001011 + 0o31) + chr(0b1000010 + 0o43))(chr(117) + chr(0b1110100) + chr(9182 - 9080) + chr(45) + '\070') else nDF4gVNx0u9Q.setdiff1d(nDF4gVNx0u9Q.G3de2eWQaS0D(IxwK_moSBywk), [nzTpIcepk0o8('\060' + chr(0b10101 + 0o132) + chr(48), 8)]) if Rhml12GjPI9Q in [nzTpIcepk0o8(chr(1106 - 1058) + chr(111) + '\061', 8), RjQP07DYIdkf] else nDF4gVNx0u9Q.G3de2eWQaS0D(Rhml12GjPI9Q) if rrsR2Zx9VeMz is None: rrsR2Zx9VeMz = {} elif rrsR2Zx9VeMz is RjQP07DYIdkf: rrsR2Zx9VeMz = {nzTpIcepk0o8('\060' + chr(8770 - 8659) + chr(0b100100 + 0o15), 8): -nzTpIcepk0o8('\x30' + '\x6f' + '\061', 8), nzTpIcepk0o8('\060' + chr(0b1001 + 0o146) + '\x32', 8): nzTpIcepk0o8(chr(1608 - 1560) + chr(0b1011110 + 0o21) + chr(860 - 811), 8), nzTpIcepk0o8(chr(48) + '\x6f' + '\063', 11848 - 11840): -nzTpIcepk0o8(chr(960 - 912) + chr(2663 - 2552) + chr(0b11101 + 0o24), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(52), 7202 - 7194): nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061', 8)} if roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xaa\x96H\xeb4\xe5'), chr(0b1100100) + chr(0b1100101) + chr(0b110100 + 0o57) + '\x6f' + chr(9596 - 9496) + chr(101))('\165' + chr(0b1110100) + chr(0b1100110) + '\x2d' + '\070'))(Rhml12GjPI9Q) or roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xaa\x96H\xf1.\xe3'), '\144' + chr(101) + '\143' + '\157' + chr(0b1100100) + chr(0b10100 + 0o121))('\165' + chr(116) + chr(0b1100110) + chr(1098 - 1053) + chr(159 - 103)))(Rhml12GjPI9Q): BBM8dxm7YWge = nDF4gVNx0u9Q.intersect1d(BBM8dxm7YWge, nDF4gVNx0u9Q.xWH4M7K6Qbd3(IxwK_moSBywk == Rhml12GjPI9Q)[nzTpIcepk0o8(chr(977 - 929) + '\157' + chr(0b110000), 8)]) RZVPA3BBjG6k = rrsR2Zx9VeMz.GUKetu4xaGsJ(Rhml12GjPI9Q) else: n_DqV9fOWrXc = znjnJWK64FDT(retinotopy=P1XDPYIBf5hd, mask=BBM8dxm7YWge, weight=QzevBcmRhtFV, surface=EE4YQNLOwx18, min_weight=jh05iVmeM9Oa, min_eccentricity=pNXobewX5Zv9, visual_area=IxwK_moSBywk, measurement_uncertainty=i6qv6MwGO0UI, measurement_knob=yJMqHHLOXE3E, magnification_knob=dZAruo1Dus85, fieldsign_knob=cZpG0lfJVjLV, edge_knob=xD7Mw0y2ezOr, visual_area_field_signs=rrsR2Zx9VeMz) return roI3spqORKae(zAgo8354IlJ7, roI3spqORKae(ES5oEprVxulp(b'\xaf\x84m\xfb\x05\xfc\xe5\xef'), chr(9810 - 9710) + chr(0b101 + 0o140) + chr(3426 - 3327) + chr(0b1010101 + 0o32) + '\x64' + '\145')(chr(117) + chr(116) + '\x66' + chr(1575 - 1530) + '\x38'))({aYHSBMjZouVV: BoZcxPaOCjhS(u3t0oKVNFzVp, nRSX3HCpSIw0, map_visual_areas=aYHSBMjZouVV, **n_DqV9fOWrXc) for aYHSBMjZouVV in vk8F4sVxDtAX}) (GLTDAeA02u6t, KbSewWXm6j4f) = (olfRNjSgvQh6, BBM8dxm7YWge) P1XDPYIBf5hd = {B6UAF1zReOyJ: r7AA1pbLjb44[BBM8dxm7YWge] if ftfygxgFas5X(r7AA1pbLjb44) > ftfygxgFas5X(BBM8dxm7YWge) else r7AA1pbLjb44 for (B6UAF1zReOyJ, r7AA1pbLjb44) in YVS_F7_wWn_o.tcSkjcrLksk1(P1XDPYIBf5hd)} olfRNjSgvQh6 = GLTDAeA02u6t.submesh(BBM8dxm7YWge) BBM8dxm7YWge = GLTDAeA02u6t.tess.ZpfN5tSLaZze(olfRNjSgvQh6.Ar0km3TBAurm) if ftfygxgFas5X(BBM8dxm7YWge) == ftfygxgFas5X(KbSewWXm6j4f): N4iQl4v9mybz = nDF4gVNx0u9Q.chmI_GMU_sEi(ftfygxgFas5X(BBM8dxm7YWge)) else: PT32xG247TS3 = Bvi71nNyvlqO(BBM8dxm7YWge) N4iQl4v9mybz = nDF4gVNx0u9Q.asarray([B6UAF1zReOyJ for (B6UAF1zReOyJ, GRbsaHW8BT5I) in _kV_Bomx8PZ4(KbSewWXm6j4f) if GRbsaHW8BT5I in PT32xG247TS3]) NoZxuO7wjArS = olfRNjSgvQh6.vertex_count UtB2m8Xmgf5k = nzTpIcepk0o8('\060' + '\157' + chr(0b101100 + 0o6), 8) * NoZxuO7wjArS if QzevBcmRhtFV is None: QzevBcmRhtFV = nDF4gVNx0u9Q.rYPkZ8_2D0X1(NoZxuO7wjArS) elif ftfygxgFas5X(QzevBcmRhtFV) == ftfygxgFas5X(KbSewWXm6j4f): QzevBcmRhtFV = nDF4gVNx0u9Q.Tn6rGr7XTM7t(QzevBcmRhtFV)[N4iQl4v9mybz] elif ftfygxgFas5X(QzevBcmRhtFV) > NoZxuO7wjArS: QzevBcmRhtFV = nDF4gVNx0u9Q.Tn6rGr7XTM7t(QzevBcmRhtFV)[BBM8dxm7YWge] else: QzevBcmRhtFV = nDF4gVNx0u9Q.Tn6rGr7XTM7t(QzevBcmRhtFV) QzevBcmRhtFV[~nDF4gVNx0u9Q.AWxpWpGwxU15(QzevBcmRhtFV)] = nzTpIcepk0o8(chr(48) + '\157' + chr(0b101110 + 0o2), 8) if pNXobewX5Zv9 < nzTpIcepk0o8('\060' + '\x6f' + '\060', 8) or roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\x90\xb7@\xc1\x05\xde\xe2\xca\xa6\tS#'), chr(3103 - 3003) + '\x65' + '\x63' + chr(0b1101111) + chr(100) + chr(0b1100101))('\165' + chr(0b1110100) + chr(0b101111 + 0o67) + '\055' + chr(150 - 94)))(pNXobewX5Zv9, nzTpIcepk0o8(chr(2038 - 1990) + chr(0b100110 + 0o111) + chr(0b110000), 8)): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xae\x8cy\xdd?\xf2\xe7\xfa\xf9\x10m\x02\xa6\x8c\x9cH8Q\xcb!\xe6P\xfb\xf4\xd1\xfe\xcd\xe9s\xc8\x97\r\xc3\x8fV\x0c\xd9\x13\xa4\x0b\xb7\xc5u\xe7z\xaf\xa4\xaf'), '\144' + '\x65' + chr(4534 - 4435) + chr(0b1101111) + '\x64' + '\x65')(chr(5048 - 4931) + chr(0b1110010 + 0o2) + chr(102) + chr(45) + chr(0b111000))) Kacl9Si1wTrL = HZiF2fh8hyim.AjG41XkcNaTh (bI5jsQ9OkQtj, Fi3yzxctM1zW) = (Kacl9Si1wTrL[nDF4gVNx0u9Q.chmI_GMU_sEi(nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110000), 8), UtB2m8Xmgf5k, nzTpIcepk0o8('\060' + '\157' + chr(0b110000 + 0o2), 8))], Kacl9Si1wTrL[nDF4gVNx0u9Q.chmI_GMU_sEi(nzTpIcepk0o8('\x30' + chr(992 - 881) + chr(0b10000 + 0o41), 8), UtB2m8Xmgf5k, nzTpIcepk0o8('\x30' + '\157' + chr(0b110010), 8))]) l6qm2shqaA_v = nDF4gVNx0u9Q.array(q6MpE4pm_hbK(P1XDPYIBf5hd, roI3spqORKae(ES5oEprVxulp(b'\xa4\x80x\xe5(\xf0\xf4\xf7\xfe\x07~\x07'), chr(4038 - 3938) + '\145' + chr(99) + chr(0b10 + 0o155) + chr(0b1011 + 0o131) + chr(101))(chr(12468 - 12351) + chr(116) + chr(0b1100110) + chr(451 - 406) + chr(0b100011 + 0o25)))).hq6XE4_Nhd6R if ftfygxgFas5X(l6qm2shqaA_v) == ftfygxgFas5X(KbSewWXm6j4f): l6qm2shqaA_v = l6qm2shqaA_v[N4iQl4v9mybz] elif ftfygxgFas5X(l6qm2shqaA_v) > NoZxuO7wjArS: l6qm2shqaA_v = l6qm2shqaA_v[BBM8dxm7YWge] (oS9ptP4AxZuT, _TQBZ9osXv1N) = l6qm2shqaA_v.hq6XE4_Nhd6R l6qm2shqaA_v = l6qm2shqaA_v.flatten() Ai6XD68XhDqL = nDF4gVNx0u9Q.sqrt(oS9ptP4AxZuT ** nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(11630 - 11519) + chr(0b110010), 8) + _TQBZ9osXv1N ** nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(111) + chr(50), 8)) p8Ou2emaDF7Z = nDF4gVNx0u9Q.xWH4M7K6Qbd3(Ai6XD68XhDqL > pNXobewX5Zv9)[nzTpIcepk0o8('\x30' + '\x6f' + chr(1318 - 1270), 8)] wfXPnDCOj9zL = nzTpIcepk0o8('\060' + chr(0b1010101 + 0o32) + chr(48), 8) if jh05iVmeM9Oa is None else nDF4gVNx0u9Q.percentile(QzevBcmRhtFV[p8Ou2emaDF7Z], nzTpIcepk0o8(chr(48) + chr(111) + chr(0b101110 + 0o7), ord("\x08"))) if jh05iVmeM9Oa is RjQP07DYIdkf else jh05iVmeM9Oa if zAgo8354IlJ7.is_number(jh05iVmeM9Oa) else nzTpIcepk0o8(chr(0b11000 + 0o30) + '\x6f' + '\x30', 8) if nDF4gVNx0u9Q.AFfTx5xLlh3B(QzevBcmRhtFV[p8Ou2emaDF7Z]) < 1e-05 else nDF4gVNx0u9Q.percentile(QzevBcmRhtFV[p8Ou2emaDF7Z], jh05iVmeM9Oa[nzTpIcepk0o8('\060' + chr(0b1101111) + chr(48), 8)]) p8Ou2emaDF7Z = nDF4gVNx0u9Q.intersect1d(p8Ou2emaDF7Z, nDF4gVNx0u9Q.xWH4M7K6Qbd3(QzevBcmRhtFV > wfXPnDCOj9zL)[nzTpIcepk0o8(chr(48) + chr(111) + chr(48), 8)]) XFUlibasadcJ = nDF4gVNx0u9Q.oclC8DLjA_lV(QzevBcmRhtFV[p8Ou2emaDF7Z]) if XFUlibasadcJ < nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b10010 + 0o36), 8) or roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\x90\xb7@\xc1\x05\xde\xe2\xca\xa6\tS#'), chr(9399 - 9299) + '\x65' + chr(5860 - 5761) + chr(111) + chr(6886 - 6786) + chr(0b1000111 + 0o36))('\165' + chr(116) + chr(0b1100110) + chr(0b11110 + 0o17) + chr(56)))(XFUlibasadcJ, nzTpIcepk0o8('\x30' + chr(8994 - 8883) + chr(1360 - 1312), 8)): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xa2\x89{\xaf \xf4\xf6\xf0\xb7\x13z\x02\xa2\x8d\x9cB8E\xca8\xf6R'), chr(100) + chr(5212 - 5111) + '\143' + chr(0b1000 + 0o147) + chr(0b10010 + 0o122) + chr(0b11100 + 0o111))('\165' + chr(6921 - 6805) + '\146' + '\x2d' + chr(0b10100 + 0o44))) QzevBcmRhtFV = QzevBcmRhtFV / XFUlibasadcJ p7IA0cdnXvqy = (i6qv6MwGO0UI * Ai6XD68XhDqL[p8Ou2emaDF7Z]) ** nzTpIcepk0o8('\x30' + chr(0b100110 + 0o111) + chr(2219 - 2169), 8) YH5Et4dIa8sn = (bI5jsQ9OkQtj[p8Ou2emaDF7Z] - oS9ptP4AxZuT[p8Ou2emaDF7Z]) ** nzTpIcepk0o8(chr(48) + chr(11129 - 11018) + chr(0b100000 + 0o22), 8) + (Fi3yzxctM1zW[p8Ou2emaDF7Z] - _TQBZ9osXv1N[p8Ou2emaDF7Z]) ** nzTpIcepk0o8(chr(0b110000) + chr(1505 - 1394) + '\x32', 8) SzmXsCKolqow = (nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(111) + '\061', 8) - HZiF2fh8hyim.exp(-0.5 * YH5Et4dIa8sn / p7IA0cdnXvqy)) * QzevBcmRhtFV[p8Ou2emaDF7Z] SzmXsCKolqow = HZiF2fh8hyim.oclC8DLjA_lV(SzmXsCKolqow) NqDBRIpemeiY = olfRNjSgvQh6.face_areas GxxcFi38ALnA = olfRNjSgvQh6.tess.indexed_faces.hq6XE4_Nhd6R gNefznG34kFP = olfRNjSgvQh6.edge_lengths HtP3F3wlDt1u = 0.0001 (wgf0sgcu_xPL, PmE5_h409JAA, h3Vc_4wxEbgd) = nDF4gVNx0u9Q.transpose([(ZlbFMSG8gCoF, wgf0sgcu_xPL[nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(7149 - 7038) + chr(662 - 614), 8)], wgf0sgcu_xPL[nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31', 8)]) for (ZlbFMSG8gCoF, wgf0sgcu_xPL) in _kV_Bomx8PZ4(olfRNjSgvQh6.tess.edge_faces) if ftfygxgFas5X(wgf0sgcu_xPL) == nzTpIcepk0o8('\060' + '\x6f' + chr(318 - 268), 8) and gNefznG34kFP[ZlbFMSG8gCoF] > HtP3F3wlDt1u if NqDBRIpemeiY[wgf0sgcu_xPL[nzTpIcepk0o8(chr(48) + chr(465 - 354) + '\x30', 8)]] > HtP3F3wlDt1u and NqDBRIpemeiY[wgf0sgcu_xPL[nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(3346 - 3235) + chr(0b10101 + 0o34), 8)]] > HtP3F3wlDt1u]) tF75nqoNENFL = ftfygxgFas5X(wgf0sgcu_xPL) (tk9PNaXNpWmp, P1yWu4gF7vxH) = nDF4gVNx0u9Q.G3de2eWQaS0D(nDF4gVNx0u9Q.concatenate([PmE5_h409JAA, h3Vc_4wxEbgd]), return_inverse=nzTpIcepk0o8(chr(48) + chr(7603 - 7492) + '\061', 8)) (PmE5_h409JAA, h3Vc_4wxEbgd) = nDF4gVNx0u9Q.reshape(P1yWu4gF7vxH, (nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101100 + 0o6), 8), -nzTpIcepk0o8(chr(48) + chr(0b1100011 + 0o14) + chr(975 - 926), 8))) GxxcFi38ALnA = GxxcFi38ALnA[tk9PNaXNpWmp] NqDBRIpemeiY = NqDBRIpemeiY[tk9PNaXNpWmp] gNefznG34kFP = gNefznG34kFP[wgf0sgcu_xPL] (GRbsaHW8BT5I, r7AA1pbLjb44) = olfRNjSgvQh6.tess.indexed_edges[:, wgf0sgcu_xPL] BQFdqC9sbj8C = (bI5jsQ9OkQtj[GRbsaHW8BT5I] - bI5jsQ9OkQtj[r7AA1pbLjb44]) ** nzTpIcepk0o8(chr(48) + '\157' + '\062', 8) + (Fi3yzxctM1zW[GRbsaHW8BT5I] - Fi3yzxctM1zW[r7AA1pbLjb44]) ** nzTpIcepk0o8('\060' + '\x6f' + '\062', 8) q1AKpjhfdiXj = BQFdqC9sbj8C / gNefznG34kFP ** nzTpIcepk0o8('\060' + '\157' + chr(0b110010), 8) J1yu4fMVmjBA = HZiF2fh8hyim.signed_face_areas(GxxcFi38ALnA) lhbRRul2azkJ = J1yu4fMVmjBA / NqDBRIpemeiY GVkvhey509mE = lhbRRul2azkJ[PmE5_h409JAA] sZeIwCbzeyhd = lhbRRul2azkJ[h3Vc_4wxEbgd] WicN2e0e9DCu = HZiF2fh8hyim.kkYdZa5PRs5b(lhbRRul2azkJ) qrCDyZU4JM4d = 1.0 / tF75nqoNENFL * HZiF2fh8hyim.oclC8DLjA_lV((GVkvhey509mE - WicN2e0e9DCu[h3Vc_4wxEbgd] * q1AKpjhfdiXj) ** nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062', 8) + (sZeIwCbzeyhd - WicN2e0e9DCu[PmE5_h409JAA] * q1AKpjhfdiXj) ** nzTpIcepk0o8(chr(48) + chr(111) + chr(1272 - 1222), 8)) if RZVPA3BBjG6k is None: sbLDrRX1Y69i = HZiF2fh8hyim.compose(HZiF2fh8hyim.piecewise(nzTpIcepk0o8('\060' + chr(0b110001 + 0o76) + '\x30', 8), ((-nDF4gVNx0u9Q.fMNxX9dGa5H9, nzTpIcepk0o8('\060' + chr(0b1101111) + '\x30', 8)), -HZiF2fh8hyim.AjG41XkcNaTh)), GVkvhey509mE * sZeIwCbzeyhd) sbLDrRX1Y69i = 1.0 / tF75nqoNENFL * HZiF2fh8hyim.oclC8DLjA_lV(sbLDrRX1Y69i) else: pUzL_YjtFzPZ = lhbRRul2azkJ * RZVPA3BBjG6k sbLDrRX1Y69i = HZiF2fh8hyim.compose(HZiF2fh8hyim.piecewise(nzTpIcepk0o8('\060' + '\x6f' + chr(0b101001 + 0o7), 8), ((-nDF4gVNx0u9Q.fMNxX9dGa5H9, nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(48), 8)), -HZiF2fh8hyim.AjG41XkcNaTh)), pUzL_YjtFzPZ) sbLDrRX1Y69i = 1.0 / tF75nqoNENFL * HZiF2fh8hyim.oclC8DLjA_lV(sbLDrRX1Y69i) dclkBu6Bdnnh = 0.5 * (bI5jsQ9OkQtj[GRbsaHW8BT5I] + bI5jsQ9OkQtj[r7AA1pbLjb44]) tGONHoOXDuD6 = 0.5 * (Fi3yzxctM1zW[GRbsaHW8BT5I] + Fi3yzxctM1zW[r7AA1pbLjb44]) yibU38wR9F_9 = dclkBu6Bdnnh ** nzTpIcepk0o8(chr(1838 - 1790) + '\x6f' + chr(50), 8) + tGONHoOXDuD6 ** nzTpIcepk0o8('\x30' + chr(800 - 689) + chr(50), 8) twYUzXhKZVnR = 1.0 / tF75nqoNENFL * HZiF2fh8hyim.oclC8DLjA_lV(((bI5jsQ9OkQtj[GRbsaHW8BT5I] - bI5jsQ9OkQtj[r7AA1pbLjb44]) ** nzTpIcepk0o8(chr(0b110000) + chr(0b11000 + 0o127) + '\x32', 8) + (Fi3yzxctM1zW[GRbsaHW8BT5I] - Fi3yzxctM1zW[r7AA1pbLjb44]) ** nzTpIcepk0o8('\060' + '\157' + chr(1162 - 1112), 8)) / (yibU38wR9F_9 + 0.05)) (THYqHH0BP4hH, L0Q499WtZVIW, uKzLE0vtJsV2, jsXMO236LVWv) = [nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x30', 8) if ITPGhcXBDtzI is None else nzTpIcepk0o8('\060' + chr(111) + '\062', 8) ** ITPGhcXBDtzI for ITPGhcXBDtzI in (yJMqHHLOXE3E, dZAruo1Dus85, cZpG0lfJVjLV, xD7Mw0y2ezOr)] ANVmZzFk_RHC = (THYqHH0BP4hH * SzmXsCKolqow, L0Q499WtZVIW * qrCDyZU4JM4d, uKzLE0vtJsV2 * sbLDrRX1Y69i, jsXMO236LVWv * twYUzXhKZVnR) _R8IKF5IwAfX = (ANVmZzFk_RHC[nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2261 - 2213), 8)] + ANVmZzFk_RHC[nzTpIcepk0o8('\060' + '\157' + chr(0b110001), 8)] + ANVmZzFk_RHC[nzTpIcepk0o8(chr(48) + chr(448 - 337) + '\x32', 8)] + ANVmZzFk_RHC[nzTpIcepk0o8('\060' + chr(3070 - 2959) + chr(51), 8)]) / (THYqHH0BP4hH + L0Q499WtZVIW + uKzLE0vtJsV2 + jsXMO236LVWv) l6qm2shqaA_v = nDF4gVNx0u9Q.reshape(l6qm2shqaA_v, (-nzTpIcepk0o8(chr(2090 - 2042) + '\x6f' + '\x31', 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(896 - 846), 8))) roI3spqORKae(mxgO6GAb3Xup, roI3spqORKae(ES5oEprVxulp(b'\x9c\xbad\xe7.\xf0\xf0\xeb\xe5;@'), chr(7130 - 7030) + chr(0b1010101 + 0o20) + chr(0b1100011) + chr(0b1011011 + 0o24) + '\x64' + '\x65')(chr(10181 - 10064) + chr(1382 - 1266) + chr(0b10000 + 0o126) + chr(531 - 486) + chr(0b11101 + 0o33)))(_R8IKF5IwAfX, roI3spqORKae(ES5oEprVxulp(b'\xae\x80c\xe3\x05\xf5\xe5\xeb\xf6'), '\144' + '\145' + '\x63' + '\157' + chr(100) + '\145')(chr(0b1100010 + 0o23) + '\164' + '\146' + '\055' + chr(0b111000)), roI3spqORKae(hFt7yOCw4gV2, roI3spqORKae(ES5oEprVxulp(b"\xb7\xa3 \xb74\xe0\xeb\xd1\xd2*Y'"), chr(100) + chr(0b1100101) + '\x63' + chr(4053 - 3942) + chr(8108 - 8008) + '\x65')('\165' + chr(116) + '\x66' + chr(1185 - 1140) + chr(1730 - 1674)))(f_meas=SzmXsCKolqow, f_magn=qrCDyZU4JM4d, f_sign=sbLDrRX1Y69i, f_edge=twYUzXhKZVnR, mesh=olfRNjSgvQh6, X0=l6qm2shqaA_v)) return _R8IKF5IwAfX
noahbenson/neuropythy
neuropythy/vision/retinotopy.py
clean_retinotopy
def clean_retinotopy(hemi, retinotopy=Ellipsis, mask=Ellipsis, weight=Ellipsis, surface='midgray', min_weight=Ellipsis, min_eccentricity=0.75, visual_area=Ellipsis, map_visual_areas=Ellipsis, visual_area_field_signs=Ellipsis, measurement_uncertainty=0.3, measurement_knob=1, magnification_knob=0, fieldsign_knob=6, edge_knob=0, yield_report=False, steps=100, rounds=4, output_style='visual', jitter=None, average=None): ''' clean_retinotopy(hemi) attempts to cleanup the retinotopic maps on the given cortical mesh by minimizing an objective function that tracks the smoothness of the fields, the orthogonality of polar angle to eccentricity, and the deviation of the values from the measured values; the yielded result is the smoothed retinotopy, as would be returned by as_retinotopy(..., 'visual'). The argument hemi may be a Cortex object or a Mesh. See also clean_retinotopy_potential for information on the various parameters related to the potential function that is minimized by clean_retinotopy(). The following additional options are also accepted: * output_style (default: 'visual') specifies the style of the output data that should be returned; this should be a string understood by as_retinotopy. * yield_report (False) may be set to True, in which case a tuple (retino, report) is returned, where the report is the return value of the scipy.optimization.minimize function. ''' # parse our args if jitter in [True, Ellipsis, 'auto', 'automatic']: jitter = (4, 0.05, 1) if is_tuple(jitter) and len(jitter) > 0: if len(jitter) > 3: raise ValueError('jitter tuple must be (mod, scale, phase)') if len(jitter) == 1: jitter = jitter + (0.005,) if len(jitter) == 2: jitter = jitter + (1,) (jitter_mod, jitter_scale, jitter_phase) = jitter else: jitter = None if average in [True, Ellipsis, 'auto', 'automatic']: average = (4, 3) if is_tuple(average) and len(average) > 0: if len(average) > 2: raise ValueError('average tuple must be (mod, phase)') if len(average) == 1: average = average + (3,) (average_mod, average_phase) = average else: average = None if visual_area_field_signs is None: visual_area_field_signs = {} # First, make the potential function: f = clean_retinotopy_potential(hemi, retinotopy=retinotopy, mask=mask, weight=weight, surface=surface, min_weight=min_weight, min_eccentricity=min_eccentricity, measurement_uncertainty=measurement_uncertainty, measurement_knob=measurement_knob, magnification_knob=magnification_knob, fieldsign_knob=fieldsign_knob, edge_knob=edge_knob, visual_area=visual_area, map_visual_areas=map_visual_areas, visual_area_field_signs=visual_area_field_signs) # at this point, it's possible that we got a lazy map back; if so we're going to want to iterate # through it; otherwise, we'll want to just iterate through the single return value... m = f if pimms.is_map(f) else {None: f} (x,y) = np.full((2, hemi.vertex_count), np.nan) # the output x/y prf centers tess = hemi if geo.is_tess(hemi) else hemi.tess for (k,f) in six.iteritems(m): # The initial parameter vector is stored in the meta-data: X0 = f.meta_data['X0'] submesh = f.meta_data['mesh'] X = X0 for ii in range(rounds): mtd = 'L-BFGS-B' if (ii % 2) == 0 else 'TNC' if jitter is not None and ii % jitter_mod == jitter_phase: ec = np.sqrt(np.sum(X**2, axis=1)) th = (np.random.rand(len(ec)) - 0.5)*2*np.pi r = np.random.exponential(ec*jitter_scale) X = X + np.transpose([r*np.cos(th), r*np.sin(th)]) if average is not None and ii % average_mod == average_phase: X = np.array([X[k] if len(nn) == 0 else np.mean(X[list(nn)],0) for (k,nn) in enumerate(submesh.tess.indexed_neighborhoods)]) rr = f.minimize(X, method=mtd, options=dict(maxiter=steps, disp=False)) X = rr.x X = np.reshape(X, X0.shape) if X.shape[0] != 2: X = X.T for (u,v) in zip([x,y], X): u[tess.index(submesh.labels)] = v return as_retinotopy({'x':x, 'y':y}, output_style)
python
def clean_retinotopy(hemi, retinotopy=Ellipsis, mask=Ellipsis, weight=Ellipsis, surface='midgray', min_weight=Ellipsis, min_eccentricity=0.75, visual_area=Ellipsis, map_visual_areas=Ellipsis, visual_area_field_signs=Ellipsis, measurement_uncertainty=0.3, measurement_knob=1, magnification_knob=0, fieldsign_knob=6, edge_knob=0, yield_report=False, steps=100, rounds=4, output_style='visual', jitter=None, average=None): ''' clean_retinotopy(hemi) attempts to cleanup the retinotopic maps on the given cortical mesh by minimizing an objective function that tracks the smoothness of the fields, the orthogonality of polar angle to eccentricity, and the deviation of the values from the measured values; the yielded result is the smoothed retinotopy, as would be returned by as_retinotopy(..., 'visual'). The argument hemi may be a Cortex object or a Mesh. See also clean_retinotopy_potential for information on the various parameters related to the potential function that is minimized by clean_retinotopy(). The following additional options are also accepted: * output_style (default: 'visual') specifies the style of the output data that should be returned; this should be a string understood by as_retinotopy. * yield_report (False) may be set to True, in which case a tuple (retino, report) is returned, where the report is the return value of the scipy.optimization.minimize function. ''' # parse our args if jitter in [True, Ellipsis, 'auto', 'automatic']: jitter = (4, 0.05, 1) if is_tuple(jitter) and len(jitter) > 0: if len(jitter) > 3: raise ValueError('jitter tuple must be (mod, scale, phase)') if len(jitter) == 1: jitter = jitter + (0.005,) if len(jitter) == 2: jitter = jitter + (1,) (jitter_mod, jitter_scale, jitter_phase) = jitter else: jitter = None if average in [True, Ellipsis, 'auto', 'automatic']: average = (4, 3) if is_tuple(average) and len(average) > 0: if len(average) > 2: raise ValueError('average tuple must be (mod, phase)') if len(average) == 1: average = average + (3,) (average_mod, average_phase) = average else: average = None if visual_area_field_signs is None: visual_area_field_signs = {} # First, make the potential function: f = clean_retinotopy_potential(hemi, retinotopy=retinotopy, mask=mask, weight=weight, surface=surface, min_weight=min_weight, min_eccentricity=min_eccentricity, measurement_uncertainty=measurement_uncertainty, measurement_knob=measurement_knob, magnification_knob=magnification_knob, fieldsign_knob=fieldsign_knob, edge_knob=edge_knob, visual_area=visual_area, map_visual_areas=map_visual_areas, visual_area_field_signs=visual_area_field_signs) # at this point, it's possible that we got a lazy map back; if so we're going to want to iterate # through it; otherwise, we'll want to just iterate through the single return value... m = f if pimms.is_map(f) else {None: f} (x,y) = np.full((2, hemi.vertex_count), np.nan) # the output x/y prf centers tess = hemi if geo.is_tess(hemi) else hemi.tess for (k,f) in six.iteritems(m): # The initial parameter vector is stored in the meta-data: X0 = f.meta_data['X0'] submesh = f.meta_data['mesh'] X = X0 for ii in range(rounds): mtd = 'L-BFGS-B' if (ii % 2) == 0 else 'TNC' if jitter is not None and ii % jitter_mod == jitter_phase: ec = np.sqrt(np.sum(X**2, axis=1)) th = (np.random.rand(len(ec)) - 0.5)*2*np.pi r = np.random.exponential(ec*jitter_scale) X = X + np.transpose([r*np.cos(th), r*np.sin(th)]) if average is not None and ii % average_mod == average_phase: X = np.array([X[k] if len(nn) == 0 else np.mean(X[list(nn)],0) for (k,nn) in enumerate(submesh.tess.indexed_neighborhoods)]) rr = f.minimize(X, method=mtd, options=dict(maxiter=steps, disp=False)) X = rr.x X = np.reshape(X, X0.shape) if X.shape[0] != 2: X = X.T for (u,v) in zip([x,y], X): u[tess.index(submesh.labels)] = v return as_retinotopy({'x':x, 'y':y}, output_style)
[ "def", "clean_retinotopy", "(", "hemi", ",", "retinotopy", "=", "Ellipsis", ",", "mask", "=", "Ellipsis", ",", "weight", "=", "Ellipsis", ",", "surface", "=", "'midgray'", ",", "min_weight", "=", "Ellipsis", ",", "min_eccentricity", "=", "0.75", ",", "visual...
clean_retinotopy(hemi) attempts to cleanup the retinotopic maps on the given cortical mesh by minimizing an objective function that tracks the smoothness of the fields, the orthogonality of polar angle to eccentricity, and the deviation of the values from the measured values; the yielded result is the smoothed retinotopy, as would be returned by as_retinotopy(..., 'visual'). The argument hemi may be a Cortex object or a Mesh. See also clean_retinotopy_potential for information on the various parameters related to the potential function that is minimized by clean_retinotopy(). The following additional options are also accepted: * output_style (default: 'visual') specifies the style of the output data that should be returned; this should be a string understood by as_retinotopy. * yield_report (False) may be set to True, in which case a tuple (retino, report) is returned, where the report is the return value of the scipy.optimization.minimize function.
[ "clean_retinotopy", "(", "hemi", ")", "attempts", "to", "cleanup", "the", "retinotopic", "maps", "on", "the", "given", "cortical", "mesh", "by", "minimizing", "an", "objective", "function", "that", "tracks", "the", "smoothness", "of", "the", "fields", "the", "...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/vision/retinotopy.py#L2168-L2242
train
This function cleans up the retinotopy of a cortical mesh by minimizing the potential function that tracks the smoothness of the fields of the polar angles to eccentricity and the deviation of the fields of the polar angles to eccentricity.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJ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,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(10912 - 10801) + chr(0b110000 + 0o1) + chr(54) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b101 + 0o53) + '\x6f' + '\x31' + chr(52) + '\x33', 42243 - 42235), nzTpIcepk0o8(chr(0b100001 + 0o17) + '\x6f' + chr(2423 - 2369) + chr(52), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b1001 + 0o52) + chr(978 - 929) + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101101 + 0o2) + '\063' + '\064' + chr(1417 - 1364), 42471 - 42463), nzTpIcepk0o8(chr(1673 - 1625) + '\x6f' + chr(0b110011) + chr(539 - 489) + chr(0b110 + 0o56), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b10010 + 0o44) + chr(412 - 364), 0b1000), nzTpIcepk0o8(chr(1069 - 1021) + '\x6f' + '\x33' + chr(0b110011 + 0o3) + '\063', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + chr(0b100110 + 0o20) + chr(0b100001 + 0o20), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(800 - 751) + chr(0b110001) + '\x31', 0b1000), nzTpIcepk0o8('\060' + chr(9573 - 9462) + '\062' + chr(2358 - 2303) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(1031 - 983) + chr(0b1101011 + 0o4) + chr(0b10001 + 0o41) + '\x35' + chr(0b110101), 59230 - 59222), nzTpIcepk0o8(chr(48) + chr(111) + '\063', 0o10), nzTpIcepk0o8('\060' + chr(2240 - 2129) + chr(162 - 111) + '\x36' + chr(0b100 + 0o57), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1706 - 1653) + '\063', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1100100 + 0o13) + '\067' + chr(50), 62475 - 62467), nzTpIcepk0o8('\060' + chr(111) + '\062' + chr(0b110010) + '\067', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(0b100000 + 0o27) + chr(53), 36761 - 36753), nzTpIcepk0o8('\x30' + chr(0b1101111 + 0o0) + chr(0b10110 + 0o35) + '\x33' + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(6477 - 6366) + '\x32' + chr(0b10010 + 0o41) + chr(0b110101), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + '\066' + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b10110 + 0o35) + chr(279 - 224) + '\x36', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\x36' + chr(2529 - 2475), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(12043 - 11932) + chr(50) + '\x36' + chr(2247 - 2192), 9073 - 9065), nzTpIcepk0o8('\060' + chr(3267 - 3156) + '\063' + chr(0b110001 + 0o3) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1665 - 1614) + chr(2044 - 1989), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b1011 + 0o47) + chr(52) + '\065', 26598 - 26590), nzTpIcepk0o8('\x30' + chr(8174 - 8063) + chr(50) + chr(0b1 + 0o57), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1100100 + 0o13) + chr(2117 - 2066) + chr(1534 - 1480) + chr(53), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\065' + '\064', 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(2544 - 2493) + '\061' + chr(328 - 273), 0b1000), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(8692 - 8581) + chr(0b110001) + '\x33' + '\x32', 48410 - 48402), nzTpIcepk0o8(chr(48) + chr(2512 - 2401) + chr(51) + chr(1582 - 1530), 4025 - 4017), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + chr(0b10101 + 0o37) + chr(739 - 691), 0o10), nzTpIcepk0o8('\060' + chr(10829 - 10718) + '\x37' + chr(54), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\x31' + chr(0b110111 + 0o0) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(365 - 317) + chr(111) + chr(49) + chr(1655 - 1600) + '\067', 20784 - 20776), nzTpIcepk0o8(chr(916 - 868) + chr(111) + chr(51) + chr(0b110110) + chr(0b100101 + 0o22), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001) + chr(48) + chr(0b110001), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(2051 - 2003) + chr(0b110001 + 0o76) + '\065' + chr(48), 27887 - 27879)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b']'), chr(6499 - 6399) + '\x65' + chr(0b1100011) + chr(0b110000 + 0o77) + chr(6061 - 5961) + chr(4651 - 4550))(chr(0b100 + 0o161) + '\x74' + chr(102) + '\x2d' + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def AB4Gf6yf8b4j(nRSX3HCpSIw0, Ud8JOD1j6kPi=RjQP07DYIdkf, BBM8dxm7YWge=RjQP07DYIdkf, iBxKYeMqq_Bt=RjQP07DYIdkf, EE4YQNLOwx18=roI3spqORKae(ES5oEprVxulp(b'\x1e\nP\xaa\x97\xb5I'), '\x64' + '\x65' + chr(1366 - 1267) + chr(111) + chr(0b1100100) + chr(0b101000 + 0o75))('\x75' + chr(0b1110100) + '\x66' + chr(0b10010 + 0o33) + chr(0b111000)), jh05iVmeM9Oa=RjQP07DYIdkf, pNXobewX5Zv9=0.75, sGYgOtU0jgXU=RjQP07DYIdkf, Rhml12GjPI9Q=RjQP07DYIdkf, rrsR2Zx9VeMz=RjQP07DYIdkf, i6qv6MwGO0UI=0.3, yJMqHHLOXE3E=nzTpIcepk0o8(chr(0b110000) + chr(2818 - 2707) + chr(2215 - 2166), 0o10), dZAruo1Dus85=nzTpIcepk0o8(chr(614 - 566) + chr(0b1101010 + 0o5) + '\060', 31191 - 31183), cZpG0lfJVjLV=nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100101 + 0o21), 0b1000), xD7Mw0y2ezOr=nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(111) + chr(0b11110 + 0o22), 8), bLIN8Ue7aizC=nzTpIcepk0o8(chr(0b11100 + 0o24) + '\157' + chr(1841 - 1793), 8), wDOFglvkLFk0=nzTpIcepk0o8(chr(2011 - 1963) + chr(0b111110 + 0o61) + chr(410 - 361) + chr(0b110100) + chr(958 - 906), ord("\x08")), Cq6B8iKZKKeC=nzTpIcepk0o8(chr(1854 - 1806) + chr(0b10 + 0o155) + chr(0b110100), ord("\x08")), B2CM9GP9jVOC=roI3spqORKae(ES5oEprVxulp(b'\x05\nG\xb8\x84\xb8'), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(664 - 553) + chr(100) + '\x65')(chr(12552 - 12435) + '\x74' + '\x66' + chr(45) + chr(0b111000)), aENdvvI39uXk=None, C7BObiqlGeG7=None): if aENdvvI39uXk in [nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1875 - 1826), 8), RjQP07DYIdkf, roI3spqORKae(ES5oEprVxulp(b'\x12\x16@\xa2'), chr(100) + chr(101) + chr(0b111001 + 0o52) + '\x6f' + chr(100) + '\145')(chr(0b110 + 0o157) + chr(0b1110100) + chr(0b1100110) + chr(45) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\x12\x16@\xa2\x88\xb5D\x9a\xd2'), '\144' + chr(101) + chr(99) + '\x6f' + chr(671 - 571) + chr(189 - 88))(chr(117) + chr(0b0 + 0o164) + '\146' + chr(0b10110 + 0o27) + chr(56))]: aENdvvI39uXk = (nzTpIcepk0o8(chr(0b110000) + chr(0b1100000 + 0o17) + chr(714 - 662), 8), 0.05, nzTpIcepk0o8(chr(48) + chr(8833 - 8722) + chr(0b110001), 8)) if kBeKB4Df6Zrm(aENdvvI39uXk) and ftfygxgFas5X(aENdvvI39uXk) > nzTpIcepk0o8(chr(0b0 + 0o60) + chr(4230 - 4119) + '\x30', 8): if ftfygxgFas5X(aENdvvI39uXk) > nzTpIcepk0o8(chr(48) + chr(111) + '\063', 8): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\x19\n@\xb9\x80\xa6\x10\x87\xc49\xd3\xc8#\x9e^I\xe3\xdd\xb9\xf8\x96\xd6[m\xd3\xcd?\xd6s\x94@\xaav<\x90V\x19\x0c\x92h'), chr(0b1000011 + 0o41) + '\145' + chr(0b110110 + 0o55) + chr(404 - 293) + chr(100) + '\x65')(chr(0b1110101) + chr(12770 - 12654) + '\146' + '\055' + chr(988 - 932))) if ftfygxgFas5X(aENdvvI39uXk) == nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b10101 + 0o34), 8): aENdvvI39uXk = aENdvvI39uXk + (0.005,) if ftfygxgFas5X(aENdvvI39uXk) == nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\062', 8): aENdvvI39uXk = aENdvvI39uXk + (nzTpIcepk0o8(chr(1935 - 1887) + chr(8449 - 8338) + '\061', 8),) (RQdvyvWS_qUh, NkL3eJvn5udd, q4ejuJZi6ChW) = aENdvvI39uXk else: aENdvvI39uXk = None if C7BObiqlGeG7 in [nzTpIcepk0o8(chr(48) + '\157' + chr(1817 - 1768), 8), RjQP07DYIdkf, roI3spqORKae(ES5oEprVxulp(b'\x12\x16@\xa2'), chr(0b1100100) + chr(0b1100101) + '\143' + chr(0b1001010 + 0o45) + chr(0b1100100) + '\145')('\165' + chr(116) + chr(0b1010110 + 0o20) + '\055' + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\x12\x16@\xa2\x88\xb5D\x9a\xd2'), chr(0b1100000 + 0o4) + chr(0b1100101) + chr(99) + chr(111) + '\144' + chr(2090 - 1989))(chr(117) + chr(116) + chr(0b1100110) + chr(0b101101) + '\070')]: C7BObiqlGeG7 = (nzTpIcepk0o8(chr(0b110000) + chr(0b11100 + 0o123) + chr(366 - 314), 8), nzTpIcepk0o8('\060' + '\x6f' + chr(51), 8)) if kBeKB4Df6Zrm(C7BObiqlGeG7) and ftfygxgFas5X(C7BObiqlGeG7) > nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b11110 + 0o22), 8): if ftfygxgFas5X(C7BObiqlGeG7) > nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50), 8): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\x12\x15Q\xbf\x84\xb3U\xd3\xc5<\xcf\xc1f\xd3FO\xe4\x89\xfb\xff\xd3\xde\x1eo\xd8\x853\x85`\x9dM\xbc?5'), chr(2544 - 2444) + '\x65' + '\x63' + '\x6f' + chr(0b11111 + 0o105) + chr(6480 - 6379))('\165' + chr(116) + '\146' + '\055' + chr(3101 - 3045))) if ftfygxgFas5X(C7BObiqlGeG7) == nzTpIcepk0o8('\x30' + chr(0b111010 + 0o65) + chr(49), 8): C7BObiqlGeG7 = C7BObiqlGeG7 + (nzTpIcepk0o8(chr(0b110000) + chr(10350 - 10239) + '\063', 8),) (PurapgaM8710, SInRZf4_wcmO) = C7BObiqlGeG7 else: C7BObiqlGeG7 = None if rrsR2Zx9VeMz is None: rrsR2Zx9VeMz = {} _R8IKF5IwAfX = u3t0oKVNFzVp(nRSX3HCpSIw0, retinotopy=Ud8JOD1j6kPi, mask=BBM8dxm7YWge, weight=iBxKYeMqq_Bt, surface=EE4YQNLOwx18, min_weight=jh05iVmeM9Oa, min_eccentricity=pNXobewX5Zv9, measurement_uncertainty=i6qv6MwGO0UI, measurement_knob=yJMqHHLOXE3E, magnification_knob=dZAruo1Dus85, fieldsign_knob=cZpG0lfJVjLV, edge_knob=xD7Mw0y2ezOr, visual_area=sGYgOtU0jgXU, map_visual_areas=Rhml12GjPI9Q, visual_area_field_signs=rrsR2Zx9VeMz) tF75nqoNENFL = _R8IKF5IwAfX if zAgo8354IlJ7.is_map(_R8IKF5IwAfX) else {None: _R8IKF5IwAfX} (bI5jsQ9OkQtj, Fi3yzxctM1zW) = nDF4gVNx0u9Q.FQnMqH8X9LID((nzTpIcepk0o8('\x30' + '\157' + chr(50), 8), nRSX3HCpSIw0.vertex_count), nDF4gVNx0u9Q.nan) vDADDXg0D1_j = nRSX3HCpSIw0 if GZNMH8A4U3yp.is_tess(nRSX3HCpSIw0) else nRSX3HCpSIw0.tess for (B6UAF1zReOyJ, _R8IKF5IwAfX) in roI3spqORKae(YVS_F7_wWn_o, roI3spqORKae(ES5oEprVxulp(b'\x07\x00g\xa6\x8f\xb7B\xbf\xda:\xd4\x9c'), '\x64' + chr(0b1100101) + chr(2375 - 2276) + chr(0b1101111) + chr(0b1100100) + '\145')(chr(0b11111 + 0o126) + chr(884 - 768) + chr(9776 - 9674) + '\055' + chr(56)))(tF75nqoNENFL): qgowdyQlFmRK = _R8IKF5IwAfX.meta_data[roI3spqORKae(ES5oEprVxulp(b'+S'), chr(0b1010011 + 0o21) + chr(101) + chr(4149 - 4050) + '\157' + chr(0b1100100) + chr(0b110000 + 0o65))(chr(4940 - 4823) + chr(7479 - 7363) + chr(102) + chr(0b11001 + 0o24) + '\x38')] Gbx5ZCqTfc0D = _R8IKF5IwAfX.meta_data[roI3spqORKae(ES5oEprVxulp(b'\x1e\x06G\xa5'), chr(0b100000 + 0o104) + '\x65' + chr(99) + chr(111) + chr(0b1010001 + 0o23) + chr(0b1011010 + 0o13))(chr(0b11 + 0o162) + chr(0b1110100) + '\x66' + '\x2d' + chr(0b111000))] mxhyDqTAMpMC = qgowdyQlFmRK for p8Ou2emaDF7Z in bbT2xIe5pzk7(Cq6B8iKZKKeC): GIWk_9g6D3Lg = roI3spqORKae(ES5oEprVxulp(b'?Nv\x8b\xa2\x87\x1d\xb1'), chr(0b1001000 + 0o34) + chr(0b1001100 + 0o31) + chr(5515 - 5416) + chr(0b1101111) + chr(7969 - 7869) + chr(101))(chr(11053 - 10936) + chr(5290 - 5174) + '\x66' + '\x2d' + chr(85 - 29)) if p8Ou2emaDF7Z % nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(3846 - 3735) + chr(0b10110 + 0o34), 8) == nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\060', 8) else roI3spqORKae(ES5oEprVxulp(b"'-w"), '\144' + chr(101) + chr(0b1001101 + 0o26) + '\157' + '\x64' + chr(0b1100101))(chr(117) + chr(4304 - 4188) + '\146' + chr(0b100000 + 0o15) + chr(435 - 379)) if aENdvvI39uXk is not None and p8Ou2emaDF7Z % RQdvyvWS_qUh == q4ejuJZi6ChW: PuClr07Ni98U = nDF4gVNx0u9Q.sqrt(nDF4gVNx0u9Q.oclC8DLjA_lV(mxhyDqTAMpMC ** nzTpIcepk0o8(chr(2302 - 2254) + chr(111) + chr(76 - 26), 8), axis=nzTpIcepk0o8(chr(1415 - 1367) + '\x6f' + chr(0b100011 + 0o16), 8))) zW5xXJ77YZDm = (nDF4gVNx0u9Q.random.rand(ftfygxgFas5X(PuClr07Ni98U)) - 0.5) * nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b1101111) + chr(0b10100 + 0o36), 8) * nDF4gVNx0u9Q.nMrXkRpTQ9Oo LCrwg7lcbmU9 = nDF4gVNx0u9Q.random.exponential(PuClr07Ni98U * NkL3eJvn5udd) mxhyDqTAMpMC = mxhyDqTAMpMC + nDF4gVNx0u9Q.transpose([LCrwg7lcbmU9 * nDF4gVNx0u9Q.mLriLohwQ9NU(zW5xXJ77YZDm), LCrwg7lcbmU9 * nDF4gVNx0u9Q.TMleLVztqSLZ(zW5xXJ77YZDm)]) if C7BObiqlGeG7 is not None and p8Ou2emaDF7Z % PurapgaM8710 == SInRZf4_wcmO: mxhyDqTAMpMC = nDF4gVNx0u9Q.Tn6rGr7XTM7t([mxhyDqTAMpMC[B6UAF1zReOyJ] if ftfygxgFas5X(wwhqaCeRzmKc) == nzTpIcepk0o8(chr(0b110000) + chr(3580 - 3469) + chr(1093 - 1045), 8) else nDF4gVNx0u9Q.JE1frtxECu3x(mxhyDqTAMpMC[H4NoA26ON7iG(wwhqaCeRzmKc)], nzTpIcepk0o8(chr(279 - 231) + chr(5861 - 5750) + chr(519 - 471), 8)) for (B6UAF1zReOyJ, wwhqaCeRzmKc) in _kV_Bomx8PZ4(Gbx5ZCqTfc0D.tess.indexed_neighborhoods)]) ubbTlOIe_i_x = _R8IKF5IwAfX.minimize(mxhyDqTAMpMC, method=GIWk_9g6D3Lg, options=znjnJWK64FDT(maxiter=wDOFglvkLFk0, disp=nzTpIcepk0o8(chr(493 - 445) + chr(11254 - 11143) + '\060', 8))) mxhyDqTAMpMC = ubbTlOIe_i_x.bI5jsQ9OkQtj mxhyDqTAMpMC = nDF4gVNx0u9Q.reshape(mxhyDqTAMpMC, qgowdyQlFmRK.lhbM092AFW8f) if roI3spqORKae(mxhyDqTAMpMC, roI3spqORKae(ES5oEprVxulp(b'\x1f\x0bV\x80\xd5\xed\x02\xb2\xf7\x1e\x87\xcb'), chr(0b1100100) + chr(0b1001001 + 0o34) + '\x63' + chr(0b1001001 + 0o46) + '\144' + '\x65')('\x75' + chr(116) + chr(0b1001011 + 0o33) + '\x2d' + chr(56)))[nzTpIcepk0o8('\x30' + chr(6138 - 6027) + chr(137 - 89), 8)] != nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010), 8): mxhyDqTAMpMC = mxhyDqTAMpMC.hq6XE4_Nhd6R for (GRbsaHW8BT5I, r7AA1pbLjb44) in TxMFWa_Xzviv([bI5jsQ9OkQtj, Fi3yzxctM1zW], mxhyDqTAMpMC): GRbsaHW8BT5I[vDADDXg0D1_j.ZpfN5tSLaZze(Gbx5ZCqTfc0D.Ar0km3TBAurm)] = r7AA1pbLjb44 return q6MpE4pm_hbK({roI3spqORKae(ES5oEprVxulp(b'\x0b'), chr(100) + chr(225 - 124) + '\x63' + '\157' + '\144' + chr(101))(chr(117) + '\x74' + chr(0b1100110) + chr(1065 - 1020) + chr(0b101111 + 0o11)): bI5jsQ9OkQtj, roI3spqORKae(ES5oEprVxulp(b'\n'), chr(0b1001100 + 0o30) + chr(0b1100101) + '\x63' + chr(0b10111 + 0o130) + '\144' + chr(0b111010 + 0o53))('\165' + chr(116) + '\146' + '\055' + chr(2847 - 2791)): Fi3yzxctM1zW}, B2CM9GP9jVOC)
noahbenson/neuropythy
neuropythy/hcp/core.py
subject
def subject(sid, subjects_path=None, meta_data=None, default_alignment='MSMAll'): ''' subject(sid) yields a HCP Subject object for the subject with the given subject id; sid may be a path to a subject or a subject id, in which case the subject paths are searched for it. subject(None, path) yields a non-standard HCP subject at the given path. subject(sid, path) yields the specific HCP Subject at the given path. Subjects are cached and not reloaded. Note that subects returned by subject() are always persistent Immutable objects; this means that you must create a transient version of the subject to modify it via the member function sub.transient(). Better, you can make copies of the objects with desired modifications using the copy method. This function works with the neuropythy.hcp.auto_download() function; if you have enabled auto- downloading, then subjects returned from this subject may be downloading themselves lazily. ''' if subjects_path is None: if os.path.isdir(str(sid)): (fdir, fnm) = os.path.split(str(sid)) try: sid = to_subject_id(fnm) except Exception: sid = None pth = fdir else: sid = to_subject_id(sid) fnm = str(sid) fdir = find_subject_path(sid) if fdir is None: raise ValueError('Could not locate subject with id \'%s\'' % sid) pth = os.path.split(fdir)[0] else: if sid is None: (pth, fnm) = os.path.split(subjects_path) else: sid = to_subject_id(sid) fnm = str(sid) fdir = subjects_path fdir = os.path.abspath(os.path.join(pth, fnm)) if fdir in subject._cache: return subject._cache[fdir] sub = Subject(sid, fdir, meta_data=meta_data, default_alignment=default_alignment).persist() if isinstance(sub, Subject): subject._cache[fdir] = sub return sub
python
def subject(sid, subjects_path=None, meta_data=None, default_alignment='MSMAll'): ''' subject(sid) yields a HCP Subject object for the subject with the given subject id; sid may be a path to a subject or a subject id, in which case the subject paths are searched for it. subject(None, path) yields a non-standard HCP subject at the given path. subject(sid, path) yields the specific HCP Subject at the given path. Subjects are cached and not reloaded. Note that subects returned by subject() are always persistent Immutable objects; this means that you must create a transient version of the subject to modify it via the member function sub.transient(). Better, you can make copies of the objects with desired modifications using the copy method. This function works with the neuropythy.hcp.auto_download() function; if you have enabled auto- downloading, then subjects returned from this subject may be downloading themselves lazily. ''' if subjects_path is None: if os.path.isdir(str(sid)): (fdir, fnm) = os.path.split(str(sid)) try: sid = to_subject_id(fnm) except Exception: sid = None pth = fdir else: sid = to_subject_id(sid) fnm = str(sid) fdir = find_subject_path(sid) if fdir is None: raise ValueError('Could not locate subject with id \'%s\'' % sid) pth = os.path.split(fdir)[0] else: if sid is None: (pth, fnm) = os.path.split(subjects_path) else: sid = to_subject_id(sid) fnm = str(sid) fdir = subjects_path fdir = os.path.abspath(os.path.join(pth, fnm)) if fdir in subject._cache: return subject._cache[fdir] sub = Subject(sid, fdir, meta_data=meta_data, default_alignment=default_alignment).persist() if isinstance(sub, Subject): subject._cache[fdir] = sub return sub
[ "def", "subject", "(", "sid", ",", "subjects_path", "=", "None", ",", "meta_data", "=", "None", ",", "default_alignment", "=", "'MSMAll'", ")", ":", "if", "subjects_path", "is", "None", ":", "if", "os", ".", "path", ".", "isdir", "(", "str", "(", "sid"...
subject(sid) yields a HCP Subject object for the subject with the given subject id; sid may be a path to a subject or a subject id, in which case the subject paths are searched for it. subject(None, path) yields a non-standard HCP subject at the given path. subject(sid, path) yields the specific HCP Subject at the given path. Subjects are cached and not reloaded. Note that subects returned by subject() are always persistent Immutable objects; this means that you must create a transient version of the subject to modify it via the member function sub.transient(). Better, you can make copies of the objects with desired modifications using the copy method. This function works with the neuropythy.hcp.auto_download() function; if you have enabled auto- downloading, then subjects returned from this subject may be downloading themselves lazily.
[ "subject", "(", "sid", ")", "yields", "a", "HCP", "Subject", "object", "for", "the", "subject", "with", "the", "given", "subject", "id", ";", "sid", "may", "be", "a", "path", "to", "a", "subject", "or", "a", "subject", "id", "in", "which", "case", "t...
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/hcp/core.py#L233-L271
train
Returns a HCP Subject object for the given subject id.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFG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4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1297 - 1249) + chr(0b1101111) + '\061' + '\x33' + chr(0b1111 + 0o50), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b100000 + 0o22) + chr(0b100 + 0o60) + chr(0b101 + 0o53), ord("\x08")), nzTpIcepk0o8(chr(0b1011 + 0o45) + '\157' + chr(50) + '\x34' + chr(0b110000 + 0o1), ord("\x08")), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(6023 - 5912) + '\x32' + chr(265 - 212) + chr(1738 - 1685), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001) + '\061' + chr(562 - 511), 0o10), nzTpIcepk0o8('\060' + chr(1633 - 1522) + chr(2685 - 2632) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(51) + chr(0b101110 + 0o6) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(1259 - 1211) + chr(0b1100010 + 0o15) + '\x31' + '\060' + chr(51), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110011) + chr(55), 42206 - 42198), nzTpIcepk0o8(chr(0b10110 + 0o32) + '\157' + chr(49) + chr(0b110100) + '\x33', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(1395 - 1345) + chr(0b10 + 0o57) + chr(50), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(51) + chr(0b110101) + chr(0b10 + 0o56), 54805 - 54797), nzTpIcepk0o8('\060' + chr(0b1101100 + 0o3) + chr(0b110010) + '\x34' + chr(50), 0o10), nzTpIcepk0o8(chr(1770 - 1722) + chr(0b1011010 + 0o25) + chr(0b110001 + 0o2) + chr(1332 - 1282) + chr(52), 0b1000), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(6870 - 6759) + chr(0b100111 + 0o17), 38599 - 38591), nzTpIcepk0o8('\x30' + chr(6291 - 6180) + '\x36' + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + '\x37' + chr(0b110100), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + chr(53) + chr(1031 - 979), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31' + chr(0b110101) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(1835 - 1787) + '\x6f' + chr(55) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b11010 + 0o26) + '\x6f' + chr(0b11111 + 0o22) + chr(384 - 329) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1011110 + 0o21) + chr(49) + '\x32' + chr(0b100100 + 0o23), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(1038 - 988) + chr(2056 - 2006) + chr(48), 4717 - 4709), nzTpIcepk0o8('\060' + chr(3398 - 3287) + chr(806 - 757) + chr(53) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(48) + chr(6546 - 6435) + '\x31' + chr(52) + chr(0b101100 + 0o6), 0o10), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\157' + '\x33' + chr(0b110000 + 0o5) + '\x32', ord("\x08")), nzTpIcepk0o8('\x30' + chr(4947 - 4836) + chr(0b110010) + '\067' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b11011 + 0o26) + chr(1878 - 1828), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(51) + '\x37' + chr(0b100001 + 0o17), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\063' + chr(2306 - 2257) + '\x30', 47899 - 47891), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b1011101 + 0o22) + chr(49) + chr(0b110100) + '\x36', 0o10), nzTpIcepk0o8(chr(886 - 838) + '\157' + chr(0b1010 + 0o50) + chr(0b100010 + 0o24) + chr(0b110000), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(49) + chr(2102 - 2053) + chr(489 - 441), 0o10), nzTpIcepk0o8(chr(1886 - 1838) + chr(6733 - 6622) + chr(1645 - 1594) + chr(2016 - 1964) + chr(420 - 371), 8), nzTpIcepk0o8(chr(2094 - 2046) + chr(2799 - 2688) + chr(0b11 + 0o56) + chr(0b110100) + '\064', 35638 - 35630), nzTpIcepk0o8('\x30' + chr(0b110110 + 0o71) + chr(0b110011) + chr(0b1101 + 0o52), 8), nzTpIcepk0o8(chr(122 - 74) + chr(6373 - 6262) + '\063' + chr(0b110110) + chr(54), 0o10), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\157' + chr(0b110100) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(595 - 547) + '\x6f' + chr(0b101101 + 0o5) + chr(0b100100 + 0o22) + chr(0b110100), 58466 - 58458), nzTpIcepk0o8('\x30' + chr(0b1000000 + 0o57) + chr(440 - 389) + '\x37' + chr(1296 - 1248), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b1101111) + chr(0b10011 + 0o42) + chr(0b11000 + 0o30), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'q'), chr(3655 - 3555) + chr(0b1001111 + 0o26) + chr(99) + '\157' + '\144' + chr(101))(chr(11867 - 11750) + '\164' + chr(0b100100 + 0o102) + chr(0b101001 + 0o4) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def NybBYFIJq0hU(bXIYhT1TDng8, Jw6LKervFPHB=None, YmVq8cSlKKaV=None, qK0R_zlF9Jx_=roI3spqORKae(ES5oEprVxulp(b"\x12\xf3\xec\xec'C"), chr(0b1100001 + 0o3) + chr(0b1100101) + chr(99) + chr(2040 - 1929) + chr(6076 - 5976) + '\x65')(chr(0b1110101) + chr(0b1100111 + 0o15) + '\x66' + '\x2d' + chr(0b100011 + 0o25))): if Jw6LKervFPHB is None: if roI3spqORKae(aHUqKstZLeS6.path, roI3spqORKae(ES5oEprVxulp(b'\x07\xc8\xf1\x9c\x11[\xa3z~2\xf0\xaa'), chr(100) + '\145' + '\143' + chr(0b1101111) + chr(0b110010 + 0o62) + chr(420 - 319))('\x75' + chr(0b101100 + 0o110) + '\146' + chr(0b11111 + 0o16) + '\x38'))(N9zlRy29S1SS(bXIYhT1TDng8)): (cfbudFhlY2Yn, bTRPjBR7GViM) = aHUqKstZLeS6.path.LfRrQOxuDvnC(N9zlRy29S1SS(bXIYhT1TDng8)) try: bXIYhT1TDng8 = l67oGPDBpgxH(bTRPjBR7GViM) except zfo2Sgkz3IVJ: bXIYhT1TDng8 = None zKigb_5NQSq1 = cfbudFhlY2Yn else: bXIYhT1TDng8 = l67oGPDBpgxH(bXIYhT1TDng8) bTRPjBR7GViM = N9zlRy29S1SS(bXIYhT1TDng8) cfbudFhlY2Yn = JL8UueCvh2T8(bXIYhT1TDng8) if cfbudFhlY2Yn is None: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\x1c\xcf\xd4\xc1/\x0f\x8f,kC\xe6\x87\xc1\xb5rV\xdc\xdf\x19\\\x152\xf3\x1bB\x9d\xd1~\x90\xe8\x0f\xd4h\xc6Al\xd1'), '\144' + chr(101) + chr(99) + chr(8235 - 8124) + '\x64' + chr(0b100001 + 0o104))('\x75' + '\x74' + '\146' + chr(111 - 66) + chr(0b111000)) % bXIYhT1TDng8) zKigb_5NQSq1 = aHUqKstZLeS6.path.LfRrQOxuDvnC(cfbudFhlY2Yn)[nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(111) + chr(0b110000), 53722 - 53714)] elif bXIYhT1TDng8 is None: (zKigb_5NQSq1, bTRPjBR7GViM) = aHUqKstZLeS6.path.LfRrQOxuDvnC(Jw6LKervFPHB) else: bXIYhT1TDng8 = l67oGPDBpgxH(bXIYhT1TDng8) bTRPjBR7GViM = N9zlRy29S1SS(bXIYhT1TDng8) cfbudFhlY2Yn = Jw6LKervFPHB cfbudFhlY2Yn = aHUqKstZLeS6.path.abspath(aHUqKstZLeS6.path.Y4yM9BcfTCNq(zKigb_5NQSq1, bTRPjBR7GViM)) if cfbudFhlY2Yn in roI3spqORKae(NybBYFIJq0hU, roI3spqORKae(ES5oEprVxulp(b'+\x94\x93\x9crW\xd14T)\xbc\x8a'), chr(0b101100 + 0o70) + chr(0b1010110 + 0o17) + chr(0b1100011) + chr(0b10010 + 0o135) + chr(6713 - 6613) + chr(0b1000101 + 0o40))(chr(8635 - 8518) + chr(1598 - 1482) + chr(0b1100110) + chr(0b101101) + chr(56))): return roI3spqORKae(NybBYFIJq0hU, roI3spqORKae(ES5oEprVxulp(b'+\x94\x93\x9crW\xd14T)\xbc\x8a'), chr(0b1100100) + chr(101) + chr(99) + chr(111) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + '\x74' + '\146' + chr(0b101000 + 0o5) + chr(908 - 852)))[cfbudFhlY2Yn] _zPndKq6xMgp = zVvlQCBxFfM7(bXIYhT1TDng8, cfbudFhlY2Yn, meta_data=YmVq8cSlKKaV, default_alignment=qK0R_zlF9Jx_).persist() if suIjIS24Zkqw(_zPndKq6xMgp, zVvlQCBxFfM7): NybBYFIJq0hU.t4219x0wKJ6b[cfbudFhlY2Yn] = _zPndKq6xMgp return _zPndKq6xMgp
noahbenson/neuropythy
neuropythy/commands/benson14_retinotopy.py
main
def main(*args): ''' benson14_retinotopy.main(args...) runs the benson14_retinotopy command; see benson14_retinotopy.info for more information. ''' # Parse the arguments... (args, opts) = _benson14_parser(*args) # help? if opts['help']: print(info, file=sys.stdout) return 1 # verbose? if opts['verbose']: def note(s): print(s, file=sys.stdout) return True else: def note(s): return False # based on format, how do we export? sfmt = opts['surf_format'].lower() if sfmt in ['curv', 'auto', 'automatic', 'morph']: sfmt = 'freesurfer_morph' sext = '' elif sfmt == 'nifti': sext = '.nii.gz' elif sfmt in ['mgh', 'mgz', 'nii', 'nii.gz']: sext = '.' + sfmt else: raise ValueError('Unknown surface format: %s' % opts['surf_format']) vfmt = opts['vol_format'].lower() if vfmt == 'nifti': vext = '.nii.gz' elif vfmt in ['mgh', 'mgz', 'nii', 'nii.gz']: vext = '.' + vfmt else: raise ValueError('Unknown volume format: %s' % opts['vol_format']) # Add the subjects directory, if there is one if 'subjects_dir' in opts and opts['subjects_dir'] is not None: add_subject_path(opts['subjects_dir']) ow = not opts['no_overwrite'] nse = opts['no_surf_export'] nve = opts['no_vol_export'] tr = {'angle': opts['angle_tag'], 'eccen': opts['eccen_tag'], 'varea': opts['label_tag'], 'sigma': opts['sigma_tag']} # okay, now go through the subjects... for subnm in args: note('Processing subject %s:' % subnm) sub = subject(subnm) note(' - Interpolating template...') (lhdat, rhdat) = predict_retinotopy(sub, template=opts['template'], registration=opts['registration']) # Export surfaces if nse: note(' - Skipping surface export.') else: note(' - Exporting surfaces:') for (t,dat) in six.iteritems(lhdat): flnm = os.path.join(sub.path, 'surf', 'lh.' + tr[t] + sext) if ow or not os.path.exists(flnm): note(' - Exporting LH prediction file: %s' % flnm) nyio.save(flnm, dat, format=sfmt) else: note(' - Not overwriting existing file: %s' % flnm) for (t,dat) in six.iteritems(rhdat): flnm = os.path.join(sub.path, 'surf', 'rh.' + tr[t] + sext) if ow or not os.path.exists(flnm): note(' - Exporting RH prediction file: %s' % flnm) nyio.save(flnm, dat, format=sfmt) else: note(' - Not overwriting existing file: %s' % flnm) # Export volumes if nve: note(' - Skipping volume export.') else: note(' - Exporting Volumes:') for t in lhdat.keys(): flnm = os.path.join(sub.path, 'mri', tr[t] + vext) if ow or not os.path.exists(flnm): note(' - Preparing volume file: %s' % flnm) dtyp = (np.int32 if t == 'varea' else np.float32) vol = sub.cortex_to_image( (lhdat[t], rhdat[t]), method=('nearest' if t == 'varea' else 'linear'), dtype=dtyp) note(' - Exporting volume file: %s' % flnm) nyio.save(flnm, vol, like=sub) else: note(' - Not overwriting existing file: %s' % flnm) note(' Subject %s finished!' % sub.name) return 0
python
def main(*args): ''' benson14_retinotopy.main(args...) runs the benson14_retinotopy command; see benson14_retinotopy.info for more information. ''' # Parse the arguments... (args, opts) = _benson14_parser(*args) # help? if opts['help']: print(info, file=sys.stdout) return 1 # verbose? if opts['verbose']: def note(s): print(s, file=sys.stdout) return True else: def note(s): return False # based on format, how do we export? sfmt = opts['surf_format'].lower() if sfmt in ['curv', 'auto', 'automatic', 'morph']: sfmt = 'freesurfer_morph' sext = '' elif sfmt == 'nifti': sext = '.nii.gz' elif sfmt in ['mgh', 'mgz', 'nii', 'nii.gz']: sext = '.' + sfmt else: raise ValueError('Unknown surface format: %s' % opts['surf_format']) vfmt = opts['vol_format'].lower() if vfmt == 'nifti': vext = '.nii.gz' elif vfmt in ['mgh', 'mgz', 'nii', 'nii.gz']: vext = '.' + vfmt else: raise ValueError('Unknown volume format: %s' % opts['vol_format']) # Add the subjects directory, if there is one if 'subjects_dir' in opts and opts['subjects_dir'] is not None: add_subject_path(opts['subjects_dir']) ow = not opts['no_overwrite'] nse = opts['no_surf_export'] nve = opts['no_vol_export'] tr = {'angle': opts['angle_tag'], 'eccen': opts['eccen_tag'], 'varea': opts['label_tag'], 'sigma': opts['sigma_tag']} # okay, now go through the subjects... for subnm in args: note('Processing subject %s:' % subnm) sub = subject(subnm) note(' - Interpolating template...') (lhdat, rhdat) = predict_retinotopy(sub, template=opts['template'], registration=opts['registration']) # Export surfaces if nse: note(' - Skipping surface export.') else: note(' - Exporting surfaces:') for (t,dat) in six.iteritems(lhdat): flnm = os.path.join(sub.path, 'surf', 'lh.' + tr[t] + sext) if ow or not os.path.exists(flnm): note(' - Exporting LH prediction file: %s' % flnm) nyio.save(flnm, dat, format=sfmt) else: note(' - Not overwriting existing file: %s' % flnm) for (t,dat) in six.iteritems(rhdat): flnm = os.path.join(sub.path, 'surf', 'rh.' + tr[t] + sext) if ow or not os.path.exists(flnm): note(' - Exporting RH prediction file: %s' % flnm) nyio.save(flnm, dat, format=sfmt) else: note(' - Not overwriting existing file: %s' % flnm) # Export volumes if nve: note(' - Skipping volume export.') else: note(' - Exporting Volumes:') for t in lhdat.keys(): flnm = os.path.join(sub.path, 'mri', tr[t] + vext) if ow or not os.path.exists(flnm): note(' - Preparing volume file: %s' % flnm) dtyp = (np.int32 if t == 'varea' else np.float32) vol = sub.cortex_to_image( (lhdat[t], rhdat[t]), method=('nearest' if t == 'varea' else 'linear'), dtype=dtyp) note(' - Exporting volume file: %s' % flnm) nyio.save(flnm, vol, like=sub) else: note(' - Not overwriting existing file: %s' % flnm) note(' Subject %s finished!' % sub.name) return 0
[ "def", "main", "(", "*", "args", ")", ":", "# Parse the arguments...", "(", "args", ",", "opts", ")", "=", "_benson14_parser", "(", "*", "args", ")", "# help?", "if", "opts", "[", "'help'", "]", ":", "print", "(", "info", ",", "file", "=", "sys", "."...
benson14_retinotopy.main(args...) runs the benson14_retinotopy command; see benson14_retinotopy.info for more information.
[ "benson14_retinotopy", ".", "main", "(", "args", "...", ")", "runs", "the", "benson14_retinotopy", "command", ";", "see", "benson14_retinotopy", ".", "info", "for", "more", "information", "." ]
b588889f6db36ddb9602ae4a72c1c0d3f41586b2
https://github.com/noahbenson/neuropythy/blob/b588889f6db36ddb9602ae4a72c1c0d3f41586b2/neuropythy/commands/benson14_retinotopy.py#L105-L197
train
Main function for the benson14_retinotop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vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1293 - 1245) + '\x6f' + chr(1732 - 1683) + '\066', 64967 - 64959), nzTpIcepk0o8('\x30' + '\x6f' + chr(309 - 259) + chr(50) + chr(1733 - 1678), 1907 - 1899), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(53) + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(51) + chr(0b110101) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1000001 + 0o56) + chr(50) + chr(0b110101) + chr(50), 11679 - 11671), nzTpIcepk0o8(chr(1670 - 1622) + '\x6f' + '\x32' + chr(2032 - 1982) + '\061', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(1842 - 1790) + chr(1617 - 1566), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(51) + chr(1497 - 1445) + '\062', 0b1000), nzTpIcepk0o8('\x30' + chr(0b110111 + 0o70) + '\x32' + chr(0b101110 + 0o6) + '\062', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + '\x37' + '\x30', 0o10), nzTpIcepk0o8(chr(48) + chr(0b110001 + 0o76) + chr(0b100001 + 0o22) + chr(0b110111) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b10111 + 0o32) + chr(0b100101 + 0o13) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1100011 + 0o14) + chr(0b110010) + '\065' + chr(0b10011 + 0o35), ord("\x08")), nzTpIcepk0o8('\060' + chr(11592 - 11481) + chr(0b11111 + 0o23) + '\063' + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\060' + chr(4039 - 3928) + chr(703 - 653) + '\x33' + '\x31', 8), nzTpIcepk0o8(chr(477 - 429) + chr(538 - 427) + chr(0b110110) + chr(0b110001), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001) + chr(0b110101) + chr(2133 - 2080), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49) + '\x31' + chr(0b100 + 0o57), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\061' + '\x31', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(51) + '\062', 0o10), nzTpIcepk0o8(chr(1933 - 1885) + chr(4930 - 4819) + chr(51) + chr(0b110000) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49) + chr(49) + chr(2322 - 2273), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(1971 - 1923) + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b1101111) + '\x32' + chr(0b110011) + '\x35', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31' + chr(0b110110) + '\066', ord("\x08")), nzTpIcepk0o8(chr(194 - 146) + chr(4230 - 4119) + chr(0b11000 + 0o33) + chr(0b1010 + 0o54) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(1774 - 1726) + chr(111) + '\x34' + chr(0b110110), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(214 - 163) + chr(0b110010) + chr(1113 - 1060), 14977 - 14969), nzTpIcepk0o8('\060' + '\157' + chr(0b110101) + '\067', 37842 - 37834), nzTpIcepk0o8(chr(48) + chr(111) + '\x32' + chr(0b101001 + 0o10) + chr(0b110001 + 0o2), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + chr(0b11100 + 0o24), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + '\x31' + '\062', 32565 - 32557), nzTpIcepk0o8(chr(1450 - 1402) + chr(2593 - 2482) + chr(0b110001) + '\x30' + chr(1739 - 1685), 0o10), nzTpIcepk0o8(chr(1612 - 1564) + chr(7846 - 7735) + '\061' + chr(1713 - 1664) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32' + '\x32' + chr(1536 - 1488), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b10010 + 0o45), 19693 - 19685), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(0b110010) + chr(1332 - 1277), 4120 - 4112), nzTpIcepk0o8('\060' + chr(111) + chr(55) + '\x31', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(707 - 657) + '\066' + chr(55 - 3), 49885 - 49877), nzTpIcepk0o8(chr(0b110000) + chr(5051 - 4940) + '\x32' + '\x37' + chr(0b110010), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\x6f' + chr(53) + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b' '), '\144' + chr(0b110010 + 0o63) + chr(0b1001010 + 0o31) + chr(0b111100 + 0o63) + '\144' + chr(101))('\x75' + chr(0b1100000 + 0o24) + chr(8579 - 8477) + '\055' + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def BXHXH_QeD6rL(*eemPYp2vtTSr): (eemPYp2vtTSr, M8wfvmpEewAe) = L2JOplj1V6QF(*eemPYp2vtTSr) if M8wfvmpEewAe[roI3spqORKae(ES5oEprVxulp(b'f\xf2\x84\x9f'), chr(100) + '\145' + chr(8525 - 8426) + chr(0b1101111) + '\x64' + chr(0b110110 + 0o57))(chr(117) + '\164' + chr(102) + '\055' + '\x38')]: v8jsMqaYV6U2(ixNx9Lw_1grO, file=roI3spqORKae(bpyfpu4kTbwL, roI3spqORKae(ES5oEprVxulp(b'K\xa3\x9c\x8a\xe1\xc5\x10\xbb\xe8\xb1\x99\x0c'), chr(100) + '\x65' + chr(4168 - 4069) + '\x6f' + chr(100) + chr(101))(chr(0b1110101) + '\164' + chr(0b10111 + 0o117) + chr(0b0 + 0o55) + chr(56)))) return nzTpIcepk0o8('\060' + chr(0b1101111) + '\061', 0o10) if M8wfvmpEewAe[roI3spqORKae(ES5oEprVxulp(b'x\xf2\x9a\x8d\xc5\xe2F'), '\x64' + chr(3415 - 3314) + chr(4287 - 4188) + chr(0b1101111) + '\144' + chr(101))(chr(0b1110101) + '\x74' + chr(0b1001010 + 0o34) + chr(279 - 234) + '\070')]: def dVamRRpm0eOX(PmE5_h409JAA): v8jsMqaYV6U2(PmE5_h409JAA, file=roI3spqORKae(bpyfpu4kTbwL, roI3spqORKae(ES5oEprVxulp(b'K\xa3\x9c\x8a\xe1\xc5\x10\xbb\xe8\xb1\x99\x0c'), chr(2931 - 2831) + '\145' + '\143' + chr(111) + chr(100) + chr(101))('\x75' + '\164' + '\x66' + chr(0b101101) + chr(56)))) return nzTpIcepk0o8(chr(48) + chr(111) + '\x31', 8) else: def dVamRRpm0eOX(PmE5_h409JAA): return nzTpIcepk0o8(chr(1614 - 1566) + '\x6f' + chr(1701 - 1653), 0b1000) fOiEtRdmgBKv = M8wfvmpEewAe[roI3spqORKae(ES5oEprVxulp(b'}\xe2\x9a\x89\xf5\xf7L\x90\xcf\x99\x8e'), chr(9806 - 9706) + chr(101) + chr(0b1100011) + chr(111) + chr(100) + chr(0b100100 + 0o101))(chr(0b1101001 + 0o14) + '\x74' + '\x66' + chr(45) + chr(0b111000))].Xn8ENWMZdIRt() if fOiEtRdmgBKv in [roI3spqORKae(ES5oEprVxulp(b'm\xe2\x9a\x99'), chr(0b1100100) + '\145' + '\143' + chr(0b111011 + 0o64) + chr(6388 - 6288) + '\x65')('\165' + '\x74' + chr(0b1100001 + 0o5) + '\x2d' + chr(2966 - 2910)), roI3spqORKae(ES5oEprVxulp(b'o\xe2\x9c\x80'), chr(100) + '\145' + chr(3131 - 3032) + chr(897 - 786) + chr(3847 - 3747) + '\145')(chr(117) + chr(116) + chr(102) + '\055' + '\070'), roI3spqORKae(ES5oEprVxulp(b'o\xe2\x9c\x80\xc7\xf0W\x8b\xc1'), '\144' + '\145' + '\x63' + '\157' + chr(3334 - 3234) + '\145')(chr(0b1011010 + 0o33) + chr(0b1110100) + chr(0b11110 + 0o110) + chr(0b101101) + '\070'), roI3spqORKae(ES5oEprVxulp(b'c\xf8\x9a\x9f\xc2'), chr(0b10001 + 0o123) + chr(5056 - 4955) + chr(0b1100011) + chr(111) + chr(100) + chr(6381 - 6280))(chr(0b1110101) + chr(116) + chr(0b1100110) + '\x2d' + chr(56))]: fOiEtRdmgBKv = roI3spqORKae(ES5oEprVxulp(b'h\xe5\x8d\x8a\xd9\xe4Q\x84\xc7\x8a\xa5)\xc7\xeb\xe9Y'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(111) + chr(0b10000 + 0o124) + '\x65')(chr(0b1110101) + '\164' + '\x66' + chr(45) + chr(0b111000)) sCt46bvI_uYd = roI3spqORKae(ES5oEprVxulp(b''), '\144' + chr(0b1100101) + '\x63' + '\x6f' + chr(0b101100 + 0o70) + chr(101))('\x75' + chr(0b1110100) + '\146' + chr(712 - 667) + chr(56)) elif fOiEtRdmgBKv == roI3spqORKae(ES5oEprVxulp(b'`\xfe\x8e\x9b\xc3'), '\x64' + chr(0b1100101) + '\x63' + chr(0b1101111) + '\144' + chr(0b101 + 0o140))(chr(0b1010010 + 0o43) + chr(0b1110100) + chr(0b1100110) + chr(45) + '\x38'): sCt46bvI_uYd = roI3spqORKae(ES5oEprVxulp(b' \xf9\x81\x86\x84\xf6Y'), chr(0b1010010 + 0o22) + chr(0b1100101) + chr(99) + chr(0b11110 + 0o121) + '\x64' + chr(1656 - 1555))(chr(117) + chr(116) + chr(1263 - 1161) + '\055' + '\x38') elif fOiEtRdmgBKv in [roI3spqORKae(ES5oEprVxulp(b'c\xf0\x80'), chr(8517 - 8417) + '\145' + chr(0b10110 + 0o115) + chr(8549 - 8438) + chr(0b1011000 + 0o14) + chr(8579 - 8478))('\165' + '\x74' + '\146' + '\x2d' + chr(0b100000 + 0o30)), roI3spqORKae(ES5oEprVxulp(b'c\xf0\x92'), chr(4830 - 4730) + chr(0b1010001 + 0o24) + chr(0b1100011) + '\x6f' + '\x64' + chr(5830 - 5729))(chr(0b1110101) + chr(0b111001 + 0o73) + chr(0b1101 + 0o131) + chr(45) + chr(0b101001 + 0o17)), roI3spqORKae(ES5oEprVxulp(b'`\xfe\x81'), chr(9874 - 9774) + chr(9698 - 9597) + '\x63' + chr(0b1101111) + '\144' + chr(101))(chr(0b1101100 + 0o11) + '\164' + chr(754 - 652) + chr(0b10001 + 0o34) + '\070'), roI3spqORKae(ES5oEprVxulp(b'`\xfe\x81\xc1\xcd\xeb'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(4627 - 4526))(chr(117) + chr(0b1110100) + '\146' + '\055' + '\070')]: sCt46bvI_uYd = roI3spqORKae(ES5oEprVxulp(b' '), chr(0b0 + 0o144) + chr(0b1100101) + chr(3176 - 3077) + '\157' + '\144' + chr(0b1000100 + 0o41))(chr(459 - 342) + chr(0b101011 + 0o111) + chr(102) + chr(0b10110 + 0o27) + '\x38') + fOiEtRdmgBKv else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'[\xf9\x83\x81\xc5\xe6M\xc2\xd1\x8d\x88"\xc9\xfa\xfc\x11\x0b${w\xa4=\xf9\xbdS\x84'), chr(0b1100100) + '\x65' + chr(0b1100011) + '\x6f' + '\x64' + chr(101))(chr(117) + chr(0b1110100) + '\146' + '\055' + chr(0b111000)) % M8wfvmpEewAe[roI3spqORKae(ES5oEprVxulp(b'}\xe2\x9a\x89\xf5\xf7L\x90\xcf\x99\x8e'), '\144' + '\x65' + chr(0b1100011) + chr(0b1101111) + '\144' + '\145')('\x75' + chr(0b1111 + 0o145) + chr(102) + chr(0b1 + 0o54) + chr(0b111000))]) Pe1nl0lETM4k = M8wfvmpEewAe[roI3spqORKae(ES5oEprVxulp(b'x\xf8\x84\xb0\xcc\xfeQ\x8f\xc3\x8c'), chr(0b1100100) + chr(0b10010 + 0o123) + chr(0b1100011) + chr(0b1101111) + '\x64' + chr(101))(chr(5777 - 5660) + '\x74' + chr(0b100010 + 0o104) + chr(45) + chr(56))].Xn8ENWMZdIRt() if Pe1nl0lETM4k == roI3spqORKae(ES5oEprVxulp(b'`\xfe\x8e\x9b\xc3'), chr(0b1100100) + chr(4066 - 3965) + chr(3286 - 3187) + '\x6f' + '\x64' + chr(0b1100101))('\165' + '\164' + chr(9079 - 8977) + chr(45) + '\x38'): MyBS4pSfISDY = roI3spqORKae(ES5oEprVxulp(b' \xf9\x81\x86\x84\xf6Y'), '\x64' + chr(0b1000111 + 0o36) + '\143' + chr(0b1000001 + 0o56) + chr(0b111110 + 0o46) + '\145')(chr(12532 - 12415) + chr(0b1100 + 0o150) + chr(0b1100110) + chr(0b11011 + 0o22) + '\x38') elif Pe1nl0lETM4k in [roI3spqORKae(ES5oEprVxulp(b'c\xf0\x80'), chr(0b1000100 + 0o40) + chr(101) + '\143' + chr(111) + chr(0b100 + 0o140) + chr(1504 - 1403))(chr(117) + '\164' + '\146' + chr(458 - 413) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'c\xf0\x92'), chr(0b1010111 + 0o15) + chr(101) + chr(3038 - 2939) + '\x6f' + chr(0b100000 + 0o104) + chr(0b1100101))(chr(0b1110101) + chr(6294 - 6178) + chr(0b1000001 + 0o45) + chr(1744 - 1699) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'`\xfe\x81'), chr(0b110001 + 0o63) + chr(0b1100101) + '\143' + chr(2783 - 2672) + chr(8779 - 8679) + '\145')('\x75' + chr(0b1100001 + 0o23) + chr(102) + '\x2d' + chr(2999 - 2943)), roI3spqORKae(ES5oEprVxulp(b'`\xfe\x81\xc1\xcd\xeb'), chr(9339 - 9239) + '\x65' + '\x63' + '\157' + chr(100) + '\145')(chr(6841 - 6724) + chr(116) + '\x66' + chr(45) + chr(0b110111 + 0o1))]: MyBS4pSfISDY = roI3spqORKae(ES5oEprVxulp(b' '), chr(6633 - 6533) + chr(0b100100 + 0o101) + chr(0b111000 + 0o53) + '\157' + chr(6943 - 6843) + chr(0b1100101))(chr(0b1110101) + '\164' + '\x66' + chr(239 - 194) + chr(2816 - 2760)) + Pe1nl0lETM4k else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'[\xf9\x83\x81\xc5\xe6M\xc2\xd4\x97\x961\xc5\xfc\xb9W\x029d{\xb1s\xe3\xb8\x05'), chr(0b1000010 + 0o42) + chr(101) + '\143' + '\157' + chr(7391 - 7291) + chr(101))(chr(0b1110101) + '\x74' + '\146' + chr(2002 - 1957) + chr(1689 - 1633)) % M8wfvmpEewAe[roI3spqORKae(ES5oEprVxulp(b'x\xf8\x84\xb0\xcc\xfeQ\x8f\xc3\x8c'), '\144' + chr(0b1100101) + chr(1577 - 1478) + chr(0b101110 + 0o101) + '\144' + chr(6032 - 5931))('\x75' + chr(3951 - 3835) + chr(0b101110 + 0o70) + chr(45) + chr(0b101001 + 0o17))]) if roI3spqORKae(ES5oEprVxulp(b'}\xe2\x8a\x85\xcf\xf2W\x91\xfd\x9c\x936'), chr(100) + '\145' + chr(99) + '\x6f' + chr(100) + '\x65')(chr(117) + chr(2850 - 2734) + chr(102) + chr(45) + '\070') in M8wfvmpEewAe and M8wfvmpEewAe[roI3spqORKae(ES5oEprVxulp(b'}\xe2\x8a\x85\xcf\xf2W\x91\xfd\x9c\x936'), chr(4855 - 4755) + chr(7430 - 7329) + chr(0b1100011) + chr(0b1101111) + chr(2947 - 2847) + chr(0b101100 + 0o71))(chr(6263 - 6146) + chr(0b1001010 + 0o52) + chr(7583 - 7481) + chr(133 - 88) + '\070')] is not None: ZqlYfKJfOdiW(M8wfvmpEewAe[roI3spqORKae(ES5oEprVxulp(b'}\xe2\x8a\x85\xcf\xf2W\x91\xfd\x9c\x936'), chr(2845 - 2745) + chr(0b1100101 + 0o0) + chr(0b1100011) + chr(0b1000 + 0o147) + chr(100) + chr(0b1100101))('\x75' + chr(116) + chr(0b1100110) + chr(867 - 822) + chr(0b111000))]) NRyzjubHS1qf = not M8wfvmpEewAe[roI3spqORKae(ES5oEprVxulp(b'`\xf8\xb7\x80\xdc\xf4Q\x95\xd0\x91\x8e!'), '\144' + '\x65' + chr(0b1100011) + chr(0b100110 + 0o111) + chr(6902 - 6802) + '\x65')('\165' + chr(0b1110100) + '\x66' + chr(466 - 421) + '\070')] fBukfEeL8riH = M8wfvmpEewAe[roI3spqORKae(ES5oEprVxulp(b'`\xf8\xb7\x9c\xdf\xe3E\xbd\xc7\x80\x8a+\xda\xed'), '\144' + '\145' + chr(99) + chr(0b1101111) + chr(100) + '\x65')(chr(6607 - 6490) + '\x74' + '\146' + chr(0b101101) + chr(1783 - 1727))] wQP8Ce_xjr7O = M8wfvmpEewAe[roI3spqORKae(ES5oEprVxulp(b'`\xf8\xb7\x99\xc5\xfd|\x87\xda\x88\x956\xdc'), chr(680 - 580) + chr(0b101110 + 0o67) + chr(0b1000 + 0o133) + '\x6f' + chr(0b101111 + 0o65) + '\145')(chr(0b10100 + 0o141) + chr(4581 - 4465) + '\x66' + chr(0b1111 + 0o36) + chr(0b111000))] lKSl3irCMAog = {roI3spqORKae(ES5oEprVxulp(b'o\xf9\x8f\x83\xcf'), chr(0b1001 + 0o133) + '\x65' + chr(6806 - 6707) + chr(9804 - 9693) + '\x64' + '\145')(chr(0b1110101) + '\x74' + '\146' + '\055' + '\070'): M8wfvmpEewAe[roI3spqORKae(ES5oEprVxulp(b'o\xf9\x8f\x83\xcf\xceW\x83\xc5'), chr(100) + chr(0b1100101) + '\143' + chr(0b1101111) + '\144' + '\x65')('\165' + '\164' + chr(102) + '\055' + chr(0b101010 + 0o16))], roI3spqORKae(ES5oEprVxulp(b'k\xf4\x8b\x8a\xc4'), chr(0b1100100) + '\145' + '\143' + '\157' + chr(0b1100100) + '\x65')('\x75' + chr(0b1110100) + chr(102) + chr(0b101101) + chr(56)): M8wfvmpEewAe[roI3spqORKae(ES5oEprVxulp(b'k\xf4\x8b\x8a\xc4\xceW\x83\xc5'), chr(0b1100100) + chr(101) + chr(99) + chr(111) + '\144' + '\145')(chr(0b1110101) + chr(0b1000011 + 0o61) + chr(0b11000 + 0o116) + '\055' + '\070')], roI3spqORKae(ES5oEprVxulp(b'x\xf6\x9a\x8a\xcb'), '\144' + chr(101) + chr(0b101100 + 0o67) + '\x6f' + chr(100) + '\145')('\x75' + chr(4538 - 4422) + chr(0b1100110) + '\055' + '\x38'): M8wfvmpEewAe[roI3spqORKae(ES5oEprVxulp(b'b\xf6\x8a\x8a\xc6\xceW\x83\xc5'), chr(100) + chr(101) + chr(0b1100011) + chr(0b101100 + 0o103) + chr(0b1100100) + '\145')(chr(0b10111 + 0o136) + chr(9246 - 9130) + chr(0b111000 + 0o56) + chr(45) + '\x38')], roI3spqORKae(ES5oEprVxulp(b'}\xfe\x8f\x82\xcb'), '\x64' + '\145' + chr(0b1100011) + chr(0b111111 + 0o60) + chr(5178 - 5078) + chr(101))('\x75' + '\x74' + chr(0b11 + 0o143) + chr(0b101101) + chr(0b111000)): M8wfvmpEewAe[roI3spqORKae(ES5oEprVxulp(b'}\xfe\x8f\x82\xcb\xceW\x83\xc5'), '\x64' + chr(0b1001001 + 0o34) + chr(99) + '\157' + '\144' + '\x65')(chr(117) + chr(116) + chr(0b1100010 + 0o4) + chr(45) + chr(56))]} for GEorRwgXMFbO in eemPYp2vtTSr: dVamRRpm0eOX(roI3spqORKae(ES5oEprVxulp(b'^\xe5\x87\x8c\xcf\xe2P\x8b\xcc\x9f\xda7\xdd\xfb\xf3T\x0e?)?\xb6s'), '\x64' + '\x65' + chr(5225 - 5126) + '\x6f' + '\144' + chr(0b1100101))(chr(0b1110101) + chr(0b111111 + 0o65) + '\146' + chr(0b101101) + '\x38') % GEorRwgXMFbO) _zPndKq6xMgp = NybBYFIJq0hU(GEorRwgXMFbO) dVamRRpm0eOX(roI3spqORKae(ES5oEprVxulp(b'.\xb7\xc8\xc2\x8a\xd8M\x96\xc7\x8a\x8a+\xc4\xf8\xedX\x03,)n\xa0$\xb3\xf1\x17\x83C\xfb\x01\xa5'), chr(0b100111 + 0o75) + chr(0b1100101) + chr(99) + chr(0b1101111) + '\x64' + chr(2904 - 2803))('\165' + '\164' + chr(102) + '\x2d' + chr(1145 - 1089))) (CAiS90HLyGDX, MxcHT8QGGjHk) = GbluLi0M7k5x(_zPndKq6xMgp, template=M8wfvmpEewAe[roI3spqORKae(ES5oEprVxulp(b'z\xf2\x85\x9f\xc6\xf0W\x87'), chr(100) + '\x65' + chr(99) + chr(0b1101111) + chr(0b110000 + 0o64) + chr(0b1100001 + 0o4))('\x75' + '\x74' + chr(102) + chr(1924 - 1879) + '\070')], registration=M8wfvmpEewAe[roI3spqORKae(ES5oEprVxulp(b'|\xf2\x8f\x86\xd9\xe5Q\x83\xd6\x91\x95*'), '\x64' + '\145' + chr(99) + '\x6f' + '\144' + '\x65')(chr(117) + '\164' + chr(0b1100001 + 0o5) + '\x2d' + '\x38')]) if fBukfEeL8riH: dVamRRpm0eOX(roI3spqORKae(ES5oEprVxulp(b'.\xb7\xc8\xc2\x8a\xc2H\x8b\xd2\x88\x93*\xcf\xb9\xeaD\x1f-hy\xa0i\xa6\xe5\x06\x98T\xa1\x01'), chr(0b1100100) + '\x65' + chr(99) + chr(111) + '\x64' + '\145')('\x75' + chr(12714 - 12598) + chr(0b1100110) + chr(45) + '\070')) else: dVamRRpm0eOX(roI3spqORKae(ES5oEprVxulp(b'.\xb7\xc8\xc2\x8a\xd4[\x92\xcd\x8a\x8e-\xc6\xfe\xb9B\x189o{\xa6,\xb0\xa7'), chr(8602 - 8502) + chr(0b11 + 0o142) + chr(0b1100011) + chr(0b1101111) + chr(100) + '\x65')(chr(0b1110101) + '\164' + chr(102) + chr(1309 - 1264) + chr(0b100111 + 0o21))) for (h3Vc_4wxEbgd, LMcCiF4czwpp) in roI3spqORKae(YVS_F7_wWn_o, roI3spqORKae(ES5oEprVxulp(b'z\xf4\xbb\x84\xc0\xf2Q\xae\xc9\x8b\x91u'), '\144' + chr(0b1100101) + chr(99) + chr(0b1101111) + chr(4429 - 4329) + chr(0b1100101))(chr(0b1011100 + 0o31) + chr(116) + '\x66' + chr(0b100000 + 0o15) + chr(0b11111 + 0o31)))(CAiS90HLyGDX): bfhbSh5_xEIs = aHUqKstZLeS6.path.Y4yM9BcfTCNq(_zPndKq6xMgp._pSYqrosNb95, roI3spqORKae(ES5oEprVxulp(b'}\xe2\x9a\x89'), '\x64' + chr(8403 - 8302) + '\143' + chr(0b1101111) + chr(100) + chr(7733 - 7632))('\165' + chr(0b1010 + 0o152) + chr(102) + '\x2d' + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'b\xff\xc6'), chr(0b1100100) + '\145' + chr(0b1100011) + chr(10624 - 10513) + chr(0b1100100) + '\x65')('\165' + chr(0b1010000 + 0o44) + chr(0b1100110) + chr(0b110 + 0o47) + '\x38') + lKSl3irCMAog[h3Vc_4wxEbgd] + sCt46bvI_uYd) if NRyzjubHS1qf or not roI3spqORKae(aHUqKstZLeS6.path, roI3spqORKae(ES5oEprVxulp(b't\xc4\xa1\x96\xc4\xc1V\xa7\xd4\x94\xabp'), '\x64' + chr(1199 - 1098) + '\143' + chr(0b1101111) + chr(0b1100100) + chr(101))('\165' + chr(7243 - 7127) + '\x66' + chr(0b101101) + '\x38'))(bfhbSh5_xEIs): dVamRRpm0eOX(roI3spqORKae(ES5oEprVxulp(b".\xb7\xc8\xcf\x87\xb1f\x9a\xd2\x97\x880\xc1\xf7\xfe\x11!\x03)j\xb7,\xa7\xf4\x15\x83O\xbaA\xabv\xe3*-\xaa'\xf2J"), '\144' + chr(4941 - 4840) + chr(0b1100011) + chr(0b1101111) + '\144' + chr(101))(chr(12979 - 12862) + chr(10469 - 10353) + chr(3045 - 2943) + chr(722 - 677) + '\070') % bfhbSh5_xEIs) roI3spqORKae(FtNJN3RgnJYj, roI3spqORKae(ES5oEprVxulp(b'c\xe0\x8f\xb5\xe7\xe7t\xb1\xd2\xb9\xb2#'), chr(100) + '\145' + chr(8849 - 8750) + '\157' + chr(200 - 100) + '\x65')(chr(0b1110101) + '\x74' + '\146' + chr(45) + chr(0b111000)))(bfhbSh5_xEIs, LMcCiF4czwpp, format=fOiEtRdmgBKv) else: dVamRRpm0eOX(roI3spqORKae(ES5oEprVxulp(b'.\xb7\xc8\xcf\x87\xb1m\x8d\xd6\xd8\x952\xcd\xeb\xeeC\x04?`t\xa2i\xa6\xe5\x1f\x84R\xbcA\xec0\xec/$\xf5=\xf7\x1c\xc7'), chr(0b110000 + 0o64) + chr(0b1100101) + chr(0b1100011) + '\157' + '\x64' + chr(101))('\x75' + '\164' + '\146' + chr(0b11111 + 0o16) + '\070') % bfhbSh5_xEIs) for (h3Vc_4wxEbgd, LMcCiF4czwpp) in roI3spqORKae(YVS_F7_wWn_o, roI3spqORKae(ES5oEprVxulp(b'z\xf4\xbb\x84\xc0\xf2Q\xae\xc9\x8b\x91u'), chr(5413 - 5313) + '\x65' + chr(0b1000010 + 0o41) + chr(111) + chr(0b101101 + 0o67) + '\145')(chr(117) + chr(0b100001 + 0o123) + chr(0b1100110) + chr(0b101101) + chr(0b111000)))(MxcHT8QGGjHk): bfhbSh5_xEIs = aHUqKstZLeS6.path.Y4yM9BcfTCNq(_zPndKq6xMgp._pSYqrosNb95, roI3spqORKae(ES5oEprVxulp(b'}\xe2\x9a\x89'), chr(0b1011111 + 0o5) + chr(7267 - 7166) + chr(0b1011010 + 0o11) + chr(0b1100000 + 0o17) + '\x64' + '\145')(chr(117) + '\x74' + '\x66' + chr(353 - 308) + chr(0b11001 + 0o37)), roI3spqORKae(ES5oEprVxulp(b'|\xff\xc6'), '\144' + chr(0b1001000 + 0o35) + chr(99) + chr(0b1101111) + chr(9187 - 9087) + chr(0b11 + 0o142))(chr(3786 - 3669) + chr(0b1110100) + chr(102) + chr(45) + '\070') + lKSl3irCMAog[h3Vc_4wxEbgd] + sCt46bvI_uYd) if NRyzjubHS1qf or not roI3spqORKae(aHUqKstZLeS6.path, roI3spqORKae(ES5oEprVxulp(b't\xc4\xa1\x96\xc4\xc1V\xa7\xd4\x94\xabp'), chr(0b0 + 0o144) + '\x65' + chr(1414 - 1315) + chr(0b10000 + 0o137) + chr(0b1100100) + '\x65')('\x75' + chr(3444 - 3328) + chr(8462 - 8360) + '\055' + '\070'))(bfhbSh5_xEIs): dVamRRpm0eOX(roI3spqORKae(ES5oEprVxulp(b".\xb7\xc8\xcf\x87\xb1f\x9a\xd2\x97\x880\xc1\xf7\xfe\x11?\x03)j\xb7,\xa7\xf4\x15\x83O\xbaA\xabv\xe3*-\xaa'\xf2J"), chr(0b1100100) + '\145' + chr(99) + chr(111) + '\144' + '\145')(chr(0b101 + 0o160) + '\164' + chr(102) + chr(0b10001 + 0o34) + '\x38') % bfhbSh5_xEIs) roI3spqORKae(FtNJN3RgnJYj, roI3spqORKae(ES5oEprVxulp(b'c\xe0\x8f\xb5\xe7\xe7t\xb1\xd2\xb9\xb2#'), chr(100) + '\145' + chr(0b1010 + 0o131) + chr(7022 - 6911) + '\x64' + chr(0b110110 + 0o57))(chr(117) + chr(0b1011010 + 0o32) + chr(102) + chr(0b101101) + '\x38'))(bfhbSh5_xEIs, LMcCiF4czwpp, format=fOiEtRdmgBKv) else: dVamRRpm0eOX(roI3spqORKae(ES5oEprVxulp(b'.\xb7\xc8\xcf\x87\xb1m\x8d\xd6\xd8\x952\xcd\xeb\xeeC\x04?`t\xa2i\xa6\xe5\x1f\x84R\xbcA\xec0\xec/$\xf5=\xf7\x1c\xc7'), '\x64' + chr(0b1100101) + chr(0b11110 + 0o105) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(116) + chr(821 - 719) + chr(0b10100 + 0o31) + '\x38') % bfhbSh5_xEIs) if wQP8Ce_xjr7O: dVamRRpm0eOX(roI3spqORKae(ES5oEprVxulp(b'.\xb7\xc8\xc2\x8a\xc2H\x8b\xd2\x88\x93*\xcf\xb9\xef^\x01>d\x7f\xe5,\xbb\xed\x19\x85R\xfb'), chr(100) + chr(0b11000 + 0o115) + chr(99) + chr(0b1101111) + chr(100) + '\x65')(chr(0b1110101) + '\x74' + chr(0b10111 + 0o117) + chr(0b10010 + 0o33) + '\070')) else: dVamRRpm0eOX(roI3spqORKae(ES5oEprVxulp(b".\xb7\xc8\xc2\x8a\xd4[\x92\xcd\x8a\x8e-\xc6\xfe\xb9g\x02'|w\xa0:\xf9"), chr(2059 - 1959) + '\145' + chr(99) + chr(0b110001 + 0o76) + '\x64' + '\145')(chr(117) + '\164' + chr(4422 - 4320) + '\055' + chr(0b111000))) for h3Vc_4wxEbgd in roI3spqORKae(CAiS90HLyGDX, roI3spqORKae(ES5oEprVxulp(b'e\xf2\x91\x9c'), '\x64' + chr(0b1010010 + 0o23) + chr(0b1100011) + chr(111) + chr(1989 - 1889) + '\145')(chr(0b1001010 + 0o53) + '\164' + '\146' + chr(0b101101) + '\070'))(): bfhbSh5_xEIs = aHUqKstZLeS6.path.Y4yM9BcfTCNq(_zPndKq6xMgp._pSYqrosNb95, roI3spqORKae(ES5oEprVxulp(b'c\xe5\x81'), chr(0b111110 + 0o46) + '\145' + '\143' + chr(0b100 + 0o153) + chr(0b1100100) + chr(0b1100101))(chr(117) + '\x74' + '\146' + chr(760 - 715) + chr(1763 - 1707)), lKSl3irCMAog[h3Vc_4wxEbgd] + MyBS4pSfISDY) if NRyzjubHS1qf or not roI3spqORKae(aHUqKstZLeS6.path, roI3spqORKae(ES5oEprVxulp(b't\xc4\xa1\x96\xc4\xc1V\xa7\xd4\x94\xabp'), '\144' + '\145' + chr(0b1100011) + chr(0b1101111) + chr(0b100110 + 0o76) + '\x65')('\165' + chr(116) + chr(923 - 821) + chr(1529 - 1484) + '\x38'))(bfhbSh5_xEIs): dVamRRpm0eOX(roI3spqORKae(ES5oEprVxulp(b'.\xb7\xc8\xcf\x87\xb1s\x90\xc7\x88\x9b6\xc1\xf7\xfe\x11\x1b$eo\xa8,\xe3\xfb\x1f\x9bC\xef\x0f\xaec'), chr(0b110101 + 0o57) + chr(0b1100101) + chr(99) + chr(10092 - 9981) + chr(0b101011 + 0o71) + chr(0b1100101))(chr(0b1100011 + 0o22) + chr(5139 - 5023) + chr(102) + chr(0b101101) + chr(0b111000)) % bfhbSh5_xEIs) HY_mwZTwsNwl = nDF4gVNx0u9Q.int32 if h3Vc_4wxEbgd == roI3spqORKae(ES5oEprVxulp(b'x\xf6\x9a\x8a\xcb'), '\144' + '\145' + chr(5383 - 5284) + chr(11500 - 11389) + chr(100) + chr(0b1100010 + 0o3))(chr(117) + chr(116) + '\146' + chr(0b101101) + chr(56)) else nDF4gVNx0u9Q.float32 RPCRorQZSDUy = _zPndKq6xMgp.cortex_to_image((CAiS90HLyGDX[h3Vc_4wxEbgd], MxcHT8QGGjHk[h3Vc_4wxEbgd]), method=roI3spqORKae(ES5oEprVxulp(b'`\xf2\x89\x9d\xcf\xe2W'), chr(0b1001010 + 0o32) + chr(101) + '\x63' + chr(0b1101111) + chr(100) + chr(101))('\x75' + chr(0b1101100 + 0o10) + chr(102) + chr(45) + '\070') if h3Vc_4wxEbgd == roI3spqORKae(ES5oEprVxulp(b'x\xf6\x9a\x8a\xcb'), chr(100) + chr(0b1100 + 0o131) + chr(0b1000100 + 0o37) + '\157' + '\x64' + '\x65')(chr(8298 - 8181) + chr(4238 - 4122) + chr(0b111110 + 0o50) + chr(735 - 690) + '\x38') else roI3spqORKae(ES5oEprVxulp(b'b\xfe\x86\x8a\xcb\xe3'), chr(9386 - 9286) + chr(0b1100101) + '\x63' + chr(0b1100011 + 0o14) + '\x64' + chr(3811 - 3710))(chr(7453 - 7336) + chr(116) + chr(0b1011010 + 0o14) + '\055' + '\070'), dtype=HY_mwZTwsNwl) dVamRRpm0eOX(roI3spqORKae(ES5oEprVxulp(b'.\xb7\xc8\xcf\x87\xb1f\x9a\xd2\x97\x880\xc1\xf7\xfe\x11\x1b$eo\xa8,\xe3\xfb\x1f\x9bC\xef\x0f\xaec'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(10010 - 9899) + chr(0b1001000 + 0o34) + '\145')(chr(0b110111 + 0o76) + chr(116) + chr(102) + '\055' + chr(0b111000)) % bfhbSh5_xEIs) roI3spqORKae(FtNJN3RgnJYj, roI3spqORKae(ES5oEprVxulp(b'c\xe0\x8f\xb5\xe7\xe7t\xb1\xd2\xb9\xb2#'), '\x64' + '\145' + chr(0b1100011) + chr(0b111110 + 0o61) + '\144' + chr(0b1001011 + 0o32))('\x75' + chr(0b100110 + 0o116) + chr(0b1100110) + chr(45) + chr(0b100 + 0o64)))(bfhbSh5_xEIs, RPCRorQZSDUy, like=_zPndKq6xMgp) else: dVamRRpm0eOX(roI3spqORKae(ES5oEprVxulp(b'.\xb7\xc8\xcf\x87\xb1m\x8d\xd6\xd8\x952\xcd\xeb\xeeC\x04?`t\xa2i\xa6\xe5\x1f\x84R\xbcA\xec0\xec/$\xf5=\xf7\x1c\xc7'), chr(0b1100100) + '\145' + chr(0b110011 + 0o60) + '\x6f' + chr(2049 - 1949) + chr(0b11011 + 0o112))(chr(0b1110101) + chr(0b1110100) + '\x66' + '\x2d' + '\070') % bfhbSh5_xEIs) dVamRRpm0eOX(roI3spqORKae(ES5oEprVxulp(b'.\xb7\xc8\xbc\xdf\xf3I\x87\xc1\x8c\xdaa\xdb\xb9\xffX\x03"zr\xa0-\xe2'), chr(0b110100 + 0o60) + chr(101) + chr(0b1010001 + 0o22) + chr(111) + '\144' + chr(101))(chr(0b1001100 + 0o51) + '\x74' + '\x66' + chr(980 - 935) + chr(0b101010 + 0o16)) % roI3spqORKae(_zPndKq6xMgp, roI3spqORKae(ES5oEprVxulp(b']\xdb\xbe\xad\x98\xd3s\xa3\xfd\x95\xb3!'), chr(0b1111 + 0o125) + chr(0b1100101) + chr(0b1100011) + chr(0b1100101 + 0o12) + chr(0b1001011 + 0o31) + chr(6914 - 6813))(chr(0b1110101) + chr(116) + '\146' + chr(45) + chr(56)))) return nzTpIcepk0o8(chr(0b110000) + '\157' + '\x30', 8)
bb4242/sdnotify
sdnotify/__init__.py
SystemdNotifier.notify
def notify(self, state): """Send a notification to systemd. state is a string; see the man page of sd_notify (http://www.freedesktop.org/software/systemd/man/sd_notify.html) for a description of the allowable values. Normally this method silently ignores exceptions (for example, if the systemd notification socket is not available) to allow applications to function on non-systemd based systems. However, setting debug=True will cause this method to raise any exceptions generated to the caller, to aid in debugging.""" try: self.socket.sendall(_b(state)) except: if self.debug: raise
python
def notify(self, state): """Send a notification to systemd. state is a string; see the man page of sd_notify (http://www.freedesktop.org/software/systemd/man/sd_notify.html) for a description of the allowable values. Normally this method silently ignores exceptions (for example, if the systemd notification socket is not available) to allow applications to function on non-systemd based systems. However, setting debug=True will cause this method to raise any exceptions generated to the caller, to aid in debugging.""" try: self.socket.sendall(_b(state)) except: if self.debug: raise
[ "def", "notify", "(", "self", ",", "state", ")", ":", "try", ":", "self", ".", "socket", ".", "sendall", "(", "_b", "(", "state", ")", ")", "except", ":", "if", "self", ".", "debug", ":", "raise" ]
Send a notification to systemd. state is a string; see the man page of sd_notify (http://www.freedesktop.org/software/systemd/man/sd_notify.html) for a description of the allowable values. Normally this method silently ignores exceptions (for example, if the systemd notification socket is not available) to allow applications to function on non-systemd based systems. However, setting debug=True will cause this method to raise any exceptions generated to the caller, to aid in debugging.
[ "Send", "a", "notification", "to", "systemd", ".", "state", "is", "a", "string", ";", "see", "the", "man", "page", "of", "sd_notify", "(", "http", ":", "//", "www", ".", "freedesktop", ".", "org", "/", "software", "/", "systemd", "/", "man", "/", "sd...
d349a649d961b02df4755efa2e21807940227c4d
https://github.com/bb4242/sdnotify/blob/d349a649d961b02df4755efa2e21807940227c4d/sdnotify/__init__.py#L45-L59
train
Send a notification to systemd.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8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Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(2232 - 2184) + '\157' + chr(51) + chr(0b110101) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(0b10101 + 0o132) + chr(0b1010 + 0o50) + '\063' + '\x36', 0o10), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(0b11001 + 0o126) + '\x32' + chr(1961 - 1908) + chr(50), 32258 - 32250), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(111) + '\x36' + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b11 + 0o55) + '\157' + chr(51) + chr(0b110001) + chr(0b11110 + 0o23), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b11100 + 0o25) + '\067' + '\x33', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x32' + chr(0b100110 + 0o15), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\062' + chr(2917 - 2862) + chr(2582 - 2531), 3892 - 3884), nzTpIcepk0o8(chr(968 - 920) + chr(0b1101111) + '\x33' + chr(0b110010) + chr(52), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110000 + 0o1) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b101101 + 0o4) + chr(0b110 + 0o55) + chr(0b100001 + 0o20), 0b1000), nzTpIcepk0o8(chr(2024 - 1976) + chr(7976 - 7865) + chr(0b110 + 0o55) + chr(54) + chr(0b100000 + 0o24), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x32' + chr(0b101101 + 0o5) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b1101111) + '\061' + chr(52) + '\065', 3223 - 3215), nzTpIcepk0o8('\060' + chr(10434 - 10323) + '\x31' + '\x37' + chr(589 - 536), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1186 - 1135), 3994 - 3986), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(111) + '\x33' + chr(51), ord("\x08")), nzTpIcepk0o8(chr(1362 - 1314) + chr(4331 - 4220) + chr(0b110011) + chr(0b1100 + 0o47), 8), nzTpIcepk0o8(chr(1573 - 1525) + '\157' + '\062' + '\x33' + '\066', 8), nzTpIcepk0o8('\060' + '\157' + '\x33' + chr(55) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(0b1101110 + 0o1) + '\x35' + '\063', 24485 - 24477), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1554 - 1504) + chr(52) + '\x33', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010) + chr(0b110011) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(9041 - 8930) + chr(1001 - 948) + '\061', 63888 - 63880), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b1010 + 0o47) + '\066', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + chr(2528 - 2476) + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + chr(805 - 756) + chr(0b110101), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(49) + chr(1845 - 1795) + chr(49), 0b1000), nzTpIcepk0o8(chr(376 - 328) + chr(111) + '\x32' + chr(688 - 633) + chr(0b110011), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b10000 + 0o41) + '\060' + chr(0b11 + 0o56), 18553 - 18545), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(507 - 453) + chr(0b100 + 0o63), 52193 - 52185), nzTpIcepk0o8(chr(48) + chr(1399 - 1288) + chr(50) + chr(1212 - 1159) + '\x34', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011) + '\061' + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b1010 + 0o46) + '\x6f' + chr(0b11011 + 0o26) + chr(1119 - 1069) + chr(52), 35247 - 35239), nzTpIcepk0o8('\060' + '\157' + chr(0b100 + 0o57) + chr(0b111 + 0o53), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + '\x31' + '\x36', 8), nzTpIcepk0o8(chr(2145 - 2097) + chr(0b10110 + 0o131) + '\062' + '\x33' + '\x35', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + chr(0b11010 + 0o26) + '\061', 8), nzTpIcepk0o8(chr(0b101100 + 0o4) + '\157' + '\x31' + chr(0b110101) + '\062', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b100011 + 0o16) + chr(0b110110) + '\067', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1000110 + 0o51) + chr(0b100110 + 0o17) + '\060', 10108 - 10100)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xc0'), chr(100) + '\x65' + chr(2086 - 1987) + chr(0b1101111) + chr(6732 - 6632) + '\x65')('\x75' + chr(0b1110100) + chr(3642 - 3540) + chr(45) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def P3FOOIPkqt0c(hXMPsSrOQzbh, VMBC47Reoq4Q): try: roI3spqORKae(hXMPsSrOQzbh.socket, roI3spqORKae(ES5oEprVxulp(b'\x9d\xfb\xc4P\xa8\x17\x7f'), chr(100) + chr(101) + '\143' + chr(0b1001001 + 0o46) + chr(1605 - 1505) + chr(101))('\165' + chr(0b1110100) + chr(102) + chr(1117 - 1072) + chr(0b111000)))(H_k_TbhOxdOo(VMBC47Reoq4Q)) except UtiWT6f6p9yZ: if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x89\xdf\x93n\xf0\x1f|\x8d\x81`\x1c\xae'), chr(5354 - 5254) + '\145' + chr(0b1011101 + 0o6) + chr(0b1101111) + chr(100) + chr(0b110001 + 0o64))('\x75' + '\x74' + '\146' + '\055' + '\x38')): raise
madisona/django-google-maps
django_google_maps/fields.py
typename
def typename(obj): """Returns the type of obj as a string. More descriptive and specific than type(obj), and safe for any object, unlike __class__.""" if hasattr(obj, '__class__'): return getattr(obj, '__class__').__name__ else: return type(obj).__name__
python
def typename(obj): """Returns the type of obj as a string. More descriptive and specific than type(obj), and safe for any object, unlike __class__.""" if hasattr(obj, '__class__'): return getattr(obj, '__class__').__name__ else: return type(obj).__name__
[ "def", "typename", "(", "obj", ")", ":", "if", "hasattr", "(", "obj", ",", "'__class__'", ")", ":", "return", "getattr", "(", "obj", ",", "'__class__'", ")", ".", "__name__", "else", ":", "return", "type", "(", "obj", ")", ".", "__name__" ]
Returns the type of obj as a string. More descriptive and specific than type(obj), and safe for any object, unlike __class__.
[ "Returns", "the", "type", "of", "obj", "as", "a", "string", ".", "More", "descriptive", "and", "specific", "than", "type", "(", "obj", ")", "and", "safe", "for", "any", "object", "unlike", "__class__", "." ]
d5e9d20d677069ea01d5e074210c01f21314e370
https://github.com/madisona/django-google-maps/blob/d5e9d20d677069ea01d5e074210c01f21314e370/django_google_maps/fields.py#L26-L32
train
Returns the type of obj as a string. More descriptive and specific than type ( obj ) and safe for any object unlike __class__.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UI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_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(0b1101111) + chr(51) + chr(0b1010 + 0o47) + '\061', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001) + '\x31' + '\x30', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32', 31213 - 31205), nzTpIcepk0o8(chr(0b110000) + chr(0b11011 + 0o124) + '\061' + chr(0b1101 + 0o51) + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\x32' + '\x36' + '\064', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1000 + 0o147) + '\063' + chr(0b110011) + '\065', 0o10), nzTpIcepk0o8(chr(2083 - 2035) + chr(111) + chr(0b110011) + '\061' + chr(49), 8), nzTpIcepk0o8(chr(1315 - 1267) + '\x6f' + '\x33' + chr(0b110001) + chr(1409 - 1356), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\x32' + chr(53) + '\x37', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + '\x30' + '\x35', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + chr(0b110000 + 0o4) + '\x33', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + chr(52) + chr(49), 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\x32' + '\060' + '\x30', 0b1000), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(111) + chr(0b101111 + 0o3) + chr(0b110001) + chr(54), 0o10), nzTpIcepk0o8('\060' + chr(0b100111 + 0o110) + chr(0b110 + 0o55) + chr(52) + '\x35', 33358 - 33350), nzTpIcepk0o8('\x30' + chr(111) + '\x33' + chr(49) + chr(0b11011 + 0o32), 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(50) + '\063' + chr(681 - 626), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101101 + 0o2) + '\x31' + '\067' + '\064', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(816 - 765) + chr(53) + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(111) + '\x33' + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(111) + chr(0b110001) + '\060' + chr(53), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1001000 + 0o47) + chr(0b11110 + 0o24) + chr(49) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1000010 + 0o55) + chr(0b110001) + '\x31' + '\x30', 8), nzTpIcepk0o8(chr(48) + chr(0b111111 + 0o60) + chr(0b110001) + '\x32' + chr(1551 - 1502), 48363 - 48355), nzTpIcepk0o8(chr(0b101000 + 0o10) + '\x6f' + chr(0b0 + 0o63) + chr(0b110011), 21497 - 21489), nzTpIcepk0o8('\060' + chr(0b1101111) + '\061' + '\065' + '\x33', 48484 - 48476), nzTpIcepk0o8(chr(1875 - 1827) + chr(2409 - 2298) + chr(1346 - 1297) + '\x32' + chr(0b1000 + 0o57), 0o10), nzTpIcepk0o8(chr(2107 - 2059) + chr(6195 - 6084) + chr(1068 - 1013) + chr(0b110111), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x36' + chr(0b110011), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b1000 + 0o52) + '\061' + '\060', 8), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110011 + 0o3) + '\065', 9467 - 9459), nzTpIcepk0o8(chr(1923 - 1875) + '\157' + chr(51) + '\x32' + chr(2403 - 2352), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b110000 + 0o7) + chr(0b101000 + 0o10), 0o10), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(0b1101111) + chr(0b110111) + '\x37', 8), nzTpIcepk0o8('\x30' + chr(5055 - 4944) + chr(52) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(3741 - 3630) + chr(55) + chr(49), 0o10), nzTpIcepk0o8(chr(1384 - 1336) + chr(6254 - 6143) + chr(0b10111 + 0o33) + chr(0b11001 + 0o31) + chr(0b110000), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(53) + chr(0b1101 + 0o45), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b1010010 + 0o35) + chr(0b110101) + chr(0b100010 + 0o16), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xe7'), chr(0b1000000 + 0o44) + chr(9781 - 9680) + chr(99) + chr(0b101 + 0o152) + chr(100) + chr(0b1100101))(chr(10239 - 10122) + chr(0b1110100) + chr(5500 - 5398) + chr(1346 - 1301) + chr(0b100 + 0o64)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def wBjFukR9RjB8(kIMfkyypPTcC): if dRKdVnHPFq7C(kIMfkyypPTcC, roI3spqORKae(ES5oEprVxulp(b'\x96\x17a\x18\xd5\xae\xba\x92\xf0'), chr(5601 - 5501) + '\145' + chr(0b1010111 + 0o14) + chr(8120 - 8009) + chr(4242 - 4142) + '\145')(chr(0b1110101) + chr(5351 - 5235) + chr(0b1100110) + chr(45) + chr(56))): return roI3spqORKae(roI3spqORKae(kIMfkyypPTcC, roI3spqORKae(ES5oEprVxulp(b'\x96\x17a\x18\xd5\xae\xba\x92\xf0'), chr(5129 - 5029) + chr(0b1011 + 0o132) + '\x63' + chr(11550 - 11439) + chr(4100 - 4000) + chr(10189 - 10088))(chr(0b110011 + 0o102) + '\164' + '\146' + chr(0b101101) + chr(0b100100 + 0o24))), roI3spqORKae(ES5oEprVxulp(b'\x88\x11v0\xe6\xb1\xb8\xa8\xff\xf5\x97\xd0'), '\144' + chr(0b1100101) + '\x63' + chr(10956 - 10845) + chr(0b1100100) + chr(0b1001101 + 0o30))('\165' + chr(3669 - 3553) + '\146' + '\x2d' + chr(266 - 210))) else: return roI3spqORKae(MJ07XsN5uFgW(kIMfkyypPTcC), roI3spqORKae(ES5oEprVxulp(b'\x88\x11v0\xe6\xb1\xb8\xa8\xff\xf5\x97\xd0'), chr(100) + chr(0b110100 + 0o61) + chr(99) + chr(111) + chr(6653 - 6553) + chr(0b1100101))('\x75' + chr(116) + chr(0b101100 + 0o72) + chr(45) + '\070'))
barnumbirr/coinmarketcap
coinmarketcap/core.py
Market.stats
def stats(self, **kwargs): """ This endpoint displays the global data found at the top of coinmarketcap.com. Optional parameters: (string) convert - return pricing info in terms of another currency. Valid fiat currency values are: "AUD", "BRL", "CAD", "CHF", "CLP", "CNY", "CZK", "DKK", "EUR", "GBP", "HKD", "HUF", "IDR", "ILS", "INR", "JPY", "KRW", "MXN", "MYR", "NOK", "NZD", "PHP", "PKR", "PLN", "RUB", "SEK", "SGD", "THB", "TRY", "TWD", "ZAR" Valid cryptocurrency values are: "BTC", "ETH" "XRP", "LTC", and "BCH" """ params = {} params.update(kwargs) response = self.__request('global/', params) return response
python
def stats(self, **kwargs): """ This endpoint displays the global data found at the top of coinmarketcap.com. Optional parameters: (string) convert - return pricing info in terms of another currency. Valid fiat currency values are: "AUD", "BRL", "CAD", "CHF", "CLP", "CNY", "CZK", "DKK", "EUR", "GBP", "HKD", "HUF", "IDR", "ILS", "INR", "JPY", "KRW", "MXN", "MYR", "NOK", "NZD", "PHP", "PKR", "PLN", "RUB", "SEK", "SGD", "THB", "TRY", "TWD", "ZAR" Valid cryptocurrency values are: "BTC", "ETH" "XRP", "LTC", and "BCH" """ params = {} params.update(kwargs) response = self.__request('global/', params) return response
[ "def", "stats", "(", "self", ",", "*", "*", "kwargs", ")", ":", "params", "=", "{", "}", "params", ".", "update", "(", "kwargs", ")", "response", "=", "self", ".", "__request", "(", "'global/'", ",", "params", ")", "return", "response" ]
This endpoint displays the global data found at the top of coinmarketcap.com. Optional parameters: (string) convert - return pricing info in terms of another currency. Valid fiat currency values are: "AUD", "BRL", "CAD", "CHF", "CLP", "CNY", "CZK", "DKK", "EUR", "GBP", "HKD", "HUF", "IDR", "ILS", "INR", "JPY", "KRW", "MXN", "MYR", "NOK", "NZD", "PHP", "PKR", "PLN", "RUB", "SEK", "SGD", "THB", "TRY", "TWD", "ZAR" Valid cryptocurrency values are: "BTC", "ETH" "XRP", "LTC", and "BCH"
[ "This", "endpoint", "displays", "the", "global", "data", "found", "at", "the", "top", "of", "coinmarketcap", ".", "com", "." ]
d1d76a73bc48a64a4c2883dd28c6199bfbd3ebc6
https://github.com/barnumbirr/coinmarketcap/blob/d1d76a73bc48a64a4c2883dd28c6199bfbd3ebc6/coinmarketcap/core.py#L98-L114
train
This endpoint displays the global data found at the top of coinmarketcap. com.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175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PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(1433 - 1322) + '\x33' + chr(467 - 416) + chr(1488 - 1438), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(2228 - 2178) + '\x30' + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b110 + 0o52) + '\157' + '\064' + chr(0b1100 + 0o47), 0b1000), nzTpIcepk0o8('\x30' + chr(2727 - 2616) + '\x33' + chr(0b110010) + chr(48), 6494 - 6486), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\x6f' + '\x31' + chr(50) + '\064', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\063' + '\x31', 47884 - 47876), nzTpIcepk0o8(chr(48) + chr(0b100110 + 0o111) + '\061' + chr(0b101111 + 0o5) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(0b11111 + 0o120) + chr(0b110010) + chr(308 - 258), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + '\x34' + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + chr(785 - 730) + '\x32', 2052 - 2044), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + chr(1590 - 1542) + chr(0b101000 + 0o13), 29001 - 28993), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(0b1101111) + chr(0b110001) + chr(0b1100 + 0o45) + chr(0b101111 + 0o3), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1011010 + 0o25) + '\062' + chr(0b110101) + '\x31', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + chr(55) + chr(2364 - 2312), 0b1000), nzTpIcepk0o8(chr(870 - 822) + chr(7084 - 6973) + '\063' + chr(50) + chr(1718 - 1664), 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b1101111) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b11001 + 0o27) + '\x6f' + chr(0b110011) + chr(0b110110) + chr(1608 - 1559), 0o10), nzTpIcepk0o8('\x30' + chr(6911 - 6800) + chr(50) + chr(2026 - 1975) + '\x30', 11561 - 11553), nzTpIcepk0o8('\060' + chr(111) + '\x32' + '\x31' + '\x35', ord("\x08")), nzTpIcepk0o8(chr(269 - 221) + chr(111) + '\061' + chr(0b110100) + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(2362 - 2251) + chr(0b110011) + '\061' + chr(53), 30314 - 30306), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(0b1101111) + '\x31' + chr(0b10000 + 0o41) + '\065', 0b1000), nzTpIcepk0o8('\060' + chr(3124 - 3013) + '\063' + chr(0b110000) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(760 - 712) + chr(0b1000010 + 0o55) + '\x37' + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1538 - 1484) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b101110 + 0o101) + chr(50) + '\x36' + '\065', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b11010 + 0o31) + '\x33' + chr(0b11 + 0o64), 0o10), nzTpIcepk0o8(chr(370 - 322) + chr(0b110001 + 0o76) + chr(51) + chr(51) + '\x36', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\062' + chr(0b110111) + chr(1515 - 1467), 44852 - 44844), nzTpIcepk0o8('\x30' + '\157' + chr(51) + chr(55) + chr(991 - 942), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x37' + chr(53), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(702 - 652) + '\x33' + '\062', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + chr(50) + chr(0b110100), 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + chr(0b110010) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(157 - 109) + chr(0b1101111) + chr(0b110001) + chr(290 - 240) + chr(0b110000), 292 - 284), nzTpIcepk0o8('\x30' + chr(2706 - 2595) + chr(0b110011) + chr(0b110011) + '\064', 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\061' + chr(0b110101) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b1101111) + chr(49), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(497 - 447) + chr(53) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b101 + 0o56) + chr(51) + chr(0b110000), 4683 - 4675)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1838 - 1790) + chr(1027 - 916) + '\x35' + '\060', 17536 - 17528)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xf4'), '\144' + '\145' + chr(0b1100000 + 0o3) + chr(111) + chr(100) + chr(8722 - 8621))(chr(12014 - 11897) + chr(11816 - 11700) + '\x66' + '\x2d' + chr(0b1101 + 0o53)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def lhLZcWIiifT1(hXMPsSrOQzbh, **q5n0sHDDTy90): GVgFAYMz7Sw8 = {} roI3spqORKae(GVgFAYMz7Sw8, roI3spqORKae(ES5oEprVxulp(b'\x90\xdfH\xe2\x1d@$#\xc7\x1f\xf2$'), chr(0b100101 + 0o77) + chr(5851 - 5750) + chr(99) + '\x6f' + chr(100) + chr(4904 - 4803))(chr(117) + chr(116) + '\x66' + chr(45) + '\x38'))(q5n0sHDDTy90) k2zzaFDtbuhL = hXMPsSrOQzbh.__request(roI3spqORKae(ES5oEprVxulp(b'\xbd\xecL\xb25uI'), chr(7017 - 6917) + chr(0b1100101) + chr(99) + chr(3526 - 3415) + chr(0b1100100) + '\x65')(chr(0b1010010 + 0o43) + '\x74' + chr(102) + chr(0b10101 + 0o30) + chr(0b100 + 0o64)), GVgFAYMz7Sw8) return k2zzaFDtbuhL
bigjason/django-choices
djchoices/choices.py
DjangoChoices.get_choice
def get_choice(cls, value): """ Return the underlying :class:`ChoiceItem` for a given value. """ attribute_for_value = cls.attributes[value] return cls._fields[attribute_for_value]
python
def get_choice(cls, value): """ Return the underlying :class:`ChoiceItem` for a given value. """ attribute_for_value = cls.attributes[value] return cls._fields[attribute_for_value]
[ "def", "get_choice", "(", "cls", ",", "value", ")", ":", "attribute_for_value", "=", "cls", ".", "attributes", "[", "value", "]", "return", "cls", ".", "_fields", "[", "attribute_for_value", "]" ]
Return the underlying :class:`ChoiceItem` for a given value.
[ "Return", "the", "underlying", ":", "class", ":", "ChoiceItem", "for", "a", "given", "value", "." ]
9632a5308d153d46787ebceb0138990f60d1f86f
https://github.com/bigjason/django-choices/blob/9632a5308d153d46787ebceb0138990f60d1f86f/djchoices/choices.py#L192-L197
train
Return the underlying : class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DRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(941 - 893) + '\x6f' + chr(832 - 782) + '\x34' + '\x36', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(2237 - 2187) + chr(0b110 + 0o56) + chr(2365 - 2313), ord("\x08")), nzTpIcepk0o8(chr(0b100101 + 0o13) + '\x6f' + chr(50) + chr(52) + '\066', 8), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b1011000 + 0o27) + chr(0b110001 + 0o2) + chr(2476 - 2426) + '\x32', 7090 - 7082), nzTpIcepk0o8(chr(1949 - 1901) + '\157' + '\063' + '\x31' + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\x30' + chr(2002 - 1891) + chr(0b10111 + 0o34) + chr(54), 53838 - 53830), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + chr(0b10010 + 0o44) + chr(0b10000 + 0o47), ord("\x08")), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1101111) + '\x31' + chr(48) + chr(0b110111), 22791 - 22783), nzTpIcepk0o8(chr(2190 - 2142) + '\x6f' + chr(0b101000 + 0o14) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(11592 - 11481) + chr(0b100010 + 0o20) + chr(52) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(1980 - 1932) + '\x6f' + chr(49) + chr(0b100110 + 0o20) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(2165 - 2117) + '\x6f' + chr(0b11 + 0o60), 0b1000), nzTpIcepk0o8('\x30' + chr(4769 - 4658) + chr(0b10001 + 0o40) + chr(1076 - 1025) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(759 - 711) + chr(1374 - 1263) + chr(1575 - 1525) + chr(53) + chr(1320 - 1269), 25580 - 25572), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b11010 + 0o27) + chr(0b110011), 10389 - 10381), nzTpIcepk0o8(chr(0b110000) + chr(10166 - 10055) + '\063' + '\066' + chr(0b110111), 8), nzTpIcepk0o8(chr(0b1101 + 0o43) + '\157' + chr(1903 - 1848), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\063' + chr(2518 - 2465) + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x34' + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(1835 - 1787) + '\x6f' + '\x37' + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(9077 - 8966) + chr(0b110001) + '\x35' + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\x30' + chr(8528 - 8417) + '\x31' + '\062' + '\063', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1011111 + 0o20) + chr(2213 - 2162) + '\x37', 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\061' + chr(1222 - 1170) + chr(0b10001 + 0o37), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + chr(716 - 663) + '\x30', 0o10), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\157' + chr(0b110 + 0o55) + chr(0b110111), 8), nzTpIcepk0o8('\x30' + chr(0b100 + 0o153) + chr(430 - 381) + chr(340 - 285) + chr(0b101110 + 0o11), ord("\x08")), nzTpIcepk0o8(chr(1063 - 1015) + '\157' + '\x32' + chr(53) + '\x37', 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(51) + chr(0b110100) + chr(0b110111), 43937 - 43929), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(69 - 20) + '\x37' + '\061', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b1110 + 0o45) + chr(0b11000 + 0o37) + chr(55), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + '\060' + chr(49), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(52) + chr(0b110001 + 0o5), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100101 + 0o15) + chr(0b10111 + 0o33) + '\062', 20526 - 20518), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(9866 - 9755) + chr(0b11101 + 0o25) + '\x34' + chr(0b110100), 8), nzTpIcepk0o8(chr(74 - 26) + chr(0b1101111) + chr(50) + '\x34', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b101011 + 0o14) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b111001 + 0o66) + '\x32' + chr(55) + chr(2000 - 1952), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + chr(0b110111) + chr(0b100101 + 0o13), ord("\x08")), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(111) + chr(50) + chr(55), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(111) + chr(53) + '\060', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x88'), '\144' + '\x65' + chr(0b101010 + 0o71) + chr(111) + chr(100) + chr(3786 - 3685))('\x75' + chr(1451 - 1335) + chr(102) + chr(45) + chr(0b1110 + 0o52)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def J_LRheLyb3VG(_1vzISbJ_R2i, uV9iBiw0y_Mp): dLYNZgYwmFr8 = _1vzISbJ_R2i.L1bW0NdD70xD[uV9iBiw0y_Mp] return roI3spqORKae(_1vzISbJ_R2i, roI3spqORKae(ES5oEprVxulp(b'\xd5\xea\xfe\x87\xbf(\x80!E\x94\x171'), chr(100) + chr(0b1000101 + 0o40) + '\143' + '\x6f' + chr(0b101110 + 0o66) + chr(101))(chr(117) + chr(0b11111 + 0o125) + chr(7876 - 7774) + chr(1004 - 959) + chr(56)))[dLYNZgYwmFr8]
HHammond/PrettyPandas
prettypandas/formatters.py
_surpress_formatting_errors
def _surpress_formatting_errors(fn): """ I know this is dangerous and the wrong way to solve the problem, but when using both row and columns summaries it's easier to just swallow errors so users can format their tables how they need. """ @wraps(fn) def inner(*args, **kwargs): try: return fn(*args, **kwargs) except ValueError: return "" return inner
python
def _surpress_formatting_errors(fn): """ I know this is dangerous and the wrong way to solve the problem, but when using both row and columns summaries it's easier to just swallow errors so users can format their tables how they need. """ @wraps(fn) def inner(*args, **kwargs): try: return fn(*args, **kwargs) except ValueError: return "" return inner
[ "def", "_surpress_formatting_errors", "(", "fn", ")", ":", "@", "wraps", "(", "fn", ")", "def", "inner", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "try", ":", "return", "fn", "(", "*", "args", ",", "*", "*", "kwargs", ")", "except", "V...
I know this is dangerous and the wrong way to solve the problem, but when using both row and columns summaries it's easier to just swallow errors so users can format their tables how they need.
[ "I", "know", "this", "is", "dangerous", "and", "the", "wrong", "way", "to", "solve", "the", "problem", "but", "when", "using", "both", "row", "and", "columns", "summaries", "it", "s", "easier", "to", "just", "swallow", "errors", "so", "users", "can", "fo...
99a814ffc3aa61f66eaf902afaa4b7802518d33a
https://github.com/HHammond/PrettyPandas/blob/99a814ffc3aa61f66eaf902afaa4b7802518d33a/prettypandas/formatters.py#L12-L24
train
Wrap a function to swallow errors in the resultset tables.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxu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96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1307 - 1259) + chr(111) + chr(539 - 488) + '\x36' + chr(0b110010), 0o10), nzTpIcepk0o8(chr(330 - 282) + '\157' + chr(0b0 + 0o61) + chr(328 - 278) + '\x30', 0b1000), nzTpIcepk0o8(chr(555 - 507) + chr(0b100010 + 0o115) + chr(1030 - 981) + chr(1172 - 1122) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(1098 - 1050) + '\x6f' + '\x31' + chr(0b110000) + chr(0b110000), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + chr(0b110111) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(1849 - 1801) + chr(3244 - 3133) + '\063' + chr(2153 - 2098) + chr(601 - 549), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(49) + chr(0b101001 + 0o14) + chr(0b110100), 41843 - 41835), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(0b1101111) + chr(50) + chr(53) + chr(0b110101), 45888 - 45880), nzTpIcepk0o8(chr(0b110000) + chr(0b1011000 + 0o27) + chr(0b110001) + chr(48) + chr(0b1 + 0o65), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1110 + 0o141) + '\x31' + chr(0b11001 + 0o34) + chr(0b101100 + 0o10), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1423 - 1372) + chr(0b110000) + '\061', 35189 - 35181), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2398 - 2349) + '\065' + chr(0b101 + 0o56), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1010010 + 0o35) + '\x31' + chr(49) + chr(496 - 446), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\063' + chr(1209 - 1158) + chr(0b110011), 0o10), nzTpIcepk0o8('\x30' + chr(0b1011111 + 0o20) + '\x31' + chr(1807 - 1757) + '\066', 0o10), nzTpIcepk0o8('\x30' + chr(11442 - 11331) + chr(0b110010) + chr(0b11011 + 0o31) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b101 + 0o53) + '\157' + chr(0b110010) + chr(0b110001) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(1999 - 1951) + '\x6f' + chr(2477 - 2427) + '\x34' + chr(53), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1479 - 1430) + chr(0b110100) + '\066', 18745 - 18737), nzTpIcepk0o8(chr(48) + '\157' + chr(50) + chr(0b110011 + 0o0) + '\062', 0b1000), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(1332 - 1221) + '\x31' + chr(0b11 + 0o61) + '\x37', 56296 - 56288), nzTpIcepk0o8(chr(1078 - 1030) + chr(0b1011100 + 0o23) + chr(0b110111) + chr(0b110100), 29550 - 29542), nzTpIcepk0o8(chr(0b11111 + 0o21) + '\157' + chr(0b110001) + chr(0b10111 + 0o34) + '\x37', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001) + '\061' + chr(2306 - 2253), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(81 - 30) + chr(0b110001) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1893 - 1844) + chr(0b110011) + chr(2060 - 2005), 8), nzTpIcepk0o8('\060' + chr(0b1010100 + 0o33) + '\x33' + '\063' + chr(1765 - 1717), 0o10), nzTpIcepk0o8(chr(1101 - 1053) + chr(111) + chr(0b110010) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(48) + chr(4812 - 4701) + '\062' + chr(52) + chr(1356 - 1306), 0b1000), nzTpIcepk0o8(chr(1915 - 1867) + '\157' + chr(0b110111) + chr(51), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b11010 + 0o30) + chr(0b110011) + '\x36', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + chr(2105 - 2054) + chr(48), 8), nzTpIcepk0o8('\x30' + chr(4006 - 3895) + chr(1950 - 1899) + '\067' + chr(0b1111 + 0o44), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + chr(0b110111) + chr(0b1101 + 0o44), 28213 - 28205), nzTpIcepk0o8(chr(48) + chr(111) + chr(49) + chr(0b110010) + '\x33', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50) + chr(0b110011 + 0o4) + chr(1617 - 1569), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b11010 + 0o31) + '\060' + chr(52), 0b1000), nzTpIcepk0o8(chr(0b1 + 0o57) + '\157' + chr(107 - 57) + '\064' + '\x37', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + '\x31' + '\065', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(111) + chr(53) + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xdc'), chr(0b1100100) + '\x65' + chr(2567 - 2468) + chr(3788 - 3677) + chr(100) + chr(0b1100101))('\x75' + chr(116) + chr(102) + '\055' + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Bn780rFFllwY(oo8448oP2LJ8): @pyQaWxg2ZDJP(oo8448oP2LJ8) def E1EkuSWeEBUc(*eemPYp2vtTSr, **q5n0sHDDTy90): try: return oo8448oP2LJ8(*eemPYp2vtTSr, **q5n0sHDDTy90) except WbNHlDKpyPtQ: return roI3spqORKae(ES5oEprVxulp(b''), '\x64' + '\145' + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(0b101001 + 0o74))('\x75' + chr(2918 - 2802) + chr(9217 - 9115) + '\x2d' + chr(0b111000)) return E1EkuSWeEBUc
HHammond/PrettyPandas
prettypandas/formatters.py
_format_numer
def _format_numer(number_format, prefix='', suffix=''): """Format a number to a string.""" @_surpress_formatting_errors def inner(v): if isinstance(v, Number): return ("{{}}{{:{}}}{{}}" .format(number_format) .format(prefix, v, suffix)) else: raise TypeError("Numberic type required.") return inner
python
def _format_numer(number_format, prefix='', suffix=''): """Format a number to a string.""" @_surpress_formatting_errors def inner(v): if isinstance(v, Number): return ("{{}}{{:{}}}{{}}" .format(number_format) .format(prefix, v, suffix)) else: raise TypeError("Numberic type required.") return inner
[ "def", "_format_numer", "(", "number_format", ",", "prefix", "=", "''", ",", "suffix", "=", "''", ")", ":", "@", "_surpress_formatting_errors", "def", "inner", "(", "v", ")", ":", "if", "isinstance", "(", "v", ",", "Number", ")", ":", "return", "(", "\...
Format a number to a string.
[ "Format", "a", "number", "to", "a", "string", "." ]
99a814ffc3aa61f66eaf902afaa4b7802518d33a
https://github.com/HHammond/PrettyPandas/blob/99a814ffc3aa61f66eaf902afaa4b7802518d33a/prettypandas/formatters.py#L27-L37
train
Format a number to a string.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_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BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(631 - 583) + chr(0b100001 + 0o116) + chr(51) + '\067', 18058 - 18050), nzTpIcepk0o8(chr(0b110000) + chr(10816 - 10705) + chr(0b11110 + 0o24) + chr(0b110111), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\x33' + '\x31' + chr(0b10100 + 0o35), 29794 - 29786), nzTpIcepk0o8('\060' + '\157' + '\x34' + chr(335 - 281), 14287 - 14279), nzTpIcepk0o8(chr(797 - 749) + chr(0b1001000 + 0o47) + chr(0b10110 + 0o34) + '\x32' + chr(50), ord("\x08")), nzTpIcepk0o8(chr(1860 - 1812) + chr(111) + chr(0b1110 + 0o44) + chr(0b101111 + 0o5) + chr(0b110001 + 0o6), 0o10), nzTpIcepk0o8('\060' + chr(5736 - 5625) + chr(49) + chr(0b110010) + chr(0b110110), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1000 + 0o53) + '\x33' + chr(2073 - 2020), 0b1000), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b1101111) + '\063' + '\x32' + chr(53), ord("\x08")), nzTpIcepk0o8(chr(203 - 155) + chr(0b1101111) + chr(50) + chr(52) + '\066', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(50) + chr(50) + '\x34', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\064' + chr(2362 - 2309), 15291 - 15283), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(0b1010100 + 0o33) + '\x31' + chr(758 - 703) + '\063', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31' + chr(0b101011 + 0o6) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b11100 + 0o24) + '\x6f' + chr(0b110010) + chr(0b110100) + chr(875 - 824), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(51) + '\064' + '\x35', 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\157' + chr(0b101111 + 0o2) + chr(497 - 449) + chr(0b101101 + 0o4), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(4405 - 4294) + chr(323 - 273) + '\x32' + '\x34', 8), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(111) + chr(49) + '\x32' + chr(0b100110 + 0o21), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(49) + '\x36' + chr(55), 0b1000), nzTpIcepk0o8('\x30' + chr(0b100010 + 0o115) + chr(0b110 + 0o55) + '\063' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110011) + chr(1340 - 1287) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(2800 - 2689) + chr(0b11001 + 0o30) + chr(0b110110) + chr(48), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\x37' + '\x31', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1873 - 1822) + '\x33' + chr(831 - 782), 0o10), nzTpIcepk0o8(chr(48) + chr(12303 - 12192) + chr(53) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(1260 - 1212) + '\x6f' + chr(0b1111 + 0o42) + chr(53) + '\063', 0b1000), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b1000010 + 0o55) + chr(0b1110 + 0o43) + chr(52), 0o10), nzTpIcepk0o8(chr(774 - 726) + chr(0b100 + 0o153) + '\061' + chr(48) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(53) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(129 - 81) + '\157' + chr(0b1101 + 0o44) + '\x30' + chr(49), 8), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b1100101 + 0o12) + '\063' + '\061' + '\x30', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\061' + chr(0b100010 + 0o20) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\x6f' + chr(0b110001) + chr(49), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x32' + '\x34', 0o10), nzTpIcepk0o8('\060' + chr(0b111110 + 0o61) + '\061' + '\061' + chr(784 - 729), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b100100 + 0o17) + chr(0b110110) + '\060', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(1661 - 1609) + chr(1330 - 1278), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b110011 + 0o74) + '\062' + chr(0b100 + 0o62), 42785 - 42777)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1667 - 1619) + chr(4804 - 4693) + chr(0b110101) + '\060', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'1'), '\x64' + '\x65' + chr(0b1100011) + chr(3890 - 3779) + '\144' + chr(101))(chr(0b1000001 + 0o64) + chr(116) + '\146' + '\055' + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def mmz4wIVFNRVT(qNwzi8d9TT5o, ZJwZgaHE72Po=roI3spqORKae(ES5oEprVxulp(b''), chr(5569 - 5469) + chr(0b110011 + 0o62) + chr(99) + chr(7728 - 7617) + '\x64' + chr(0b1100101))('\x75' + chr(6302 - 6186) + chr(0b1100011 + 0o3) + chr(0b101101) + chr(56)), biRCFepsLie5=roI3spqORKae(ES5oEprVxulp(b''), chr(0b1000000 + 0o44) + '\x65' + chr(99) + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(0b1001101 + 0o50) + chr(0b1011000 + 0o34) + chr(8590 - 8488) + chr(0b101101) + chr(56))): @Bn780rFFllwY def E1EkuSWeEBUc(r7AA1pbLjb44): if suIjIS24Zkqw(r7AA1pbLjb44, IIRMJG_g3EWu): return roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'dl\xb4[\xe9\xdcl`\xa0\xa8\xdb\xef^\x063'), '\x64' + chr(10065 - 9964) + chr(331 - 232) + '\x6f' + '\144' + chr(0b1000110 + 0o37))(chr(0b1110101) + chr(0b1110100) + chr(102) + chr(45) + chr(412 - 356)).format(qNwzi8d9TT5o), roI3spqORKae(ES5oEprVxulp(b'n$\xfam\xd5\x940t\x8c\x8a\xe5\xde'), chr(2691 - 2591) + chr(0b1100101) + chr(0b1100000 + 0o3) + chr(111) + '\144' + chr(0b1000101 + 0o40))(chr(0b1110101) + chr(0b1110001 + 0o3) + chr(6095 - 5993) + '\055' + '\070'))(ZJwZgaHE72Po, r7AA1pbLjb44, biRCFepsLie5) else: raise jZIjKu8IFANs(roI3spqORKae(ES5oEprVxulp(b'Qb\xa4D\xf7\xd5?x\xfd\xa1\xdf\xe4@[<\xc6\x944\xfd%\x12\xbc\xc1'), '\x64' + chr(0b110111 + 0o56) + '\143' + chr(0b110 + 0o151) + '\144' + '\145')(chr(117) + chr(8163 - 8047) + '\146' + '\x2d' + '\070')) return E1EkuSWeEBUc
HHammond/PrettyPandas
prettypandas/formatters.py
as_percent
def as_percent(precision=2, **kwargs): """Convert number to percentage string. Parameters: ----------- :param v: numerical value to be converted :param precision: int decimal places to round to """ if not isinstance(precision, Integral): raise TypeError("Precision must be an integer.") return _surpress_formatting_errors( _format_numer(".{}%".format(precision)) )
python
def as_percent(precision=2, **kwargs): """Convert number to percentage string. Parameters: ----------- :param v: numerical value to be converted :param precision: int decimal places to round to """ if not isinstance(precision, Integral): raise TypeError("Precision must be an integer.") return _surpress_formatting_errors( _format_numer(".{}%".format(precision)) )
[ "def", "as_percent", "(", "precision", "=", "2", ",", "*", "*", "kwargs", ")", ":", "if", "not", "isinstance", "(", "precision", ",", "Integral", ")", ":", "raise", "TypeError", "(", "\"Precision must be an integer.\"", ")", "return", "_surpress_formatting_error...
Convert number to percentage string. Parameters: ----------- :param v: numerical value to be converted :param precision: int decimal places to round to
[ "Convert", "number", "to", "percentage", "string", "." ]
99a814ffc3aa61f66eaf902afaa4b7802518d33a
https://github.com/HHammond/PrettyPandas/blob/99a814ffc3aa61f66eaf902afaa4b7802518d33a/prettypandas/formatters.py#L40-L54
train
Convert a number to a percentage string.
GiP5xwVCF98Z,B3LV8Eo811Ma,bI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Error,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + chr(410 - 356) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(672 - 624) + '\x6f' + chr(50) + chr(0b110011) + chr(2061 - 2006), 0b1000), nzTpIcepk0o8(chr(240 - 192) + chr(0b1101111) + chr(141 - 90) + chr(1816 - 1768) + chr(0b11011 + 0o34), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(49) + chr(0b110010) + chr(672 - 619), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110010) + '\x36' + chr(0b110100), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b11101 + 0o25) + chr(0b110000 + 0o0) + '\060', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b1111 + 0o42) + chr(117 - 64) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1101111) + chr(2048 - 1998) + chr(1988 - 1933) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(48) + chr(1846 - 1735) + chr(0b11011 + 0o27) + chr(0b110011) + chr(0b101100 + 0o6), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\067' + '\x31', 60505 - 60497), nzTpIcepk0o8(chr(48) + chr(111) + chr(1214 - 1165) + '\067', 0o10), nzTpIcepk0o8('\060' + chr(0b11111 + 0o120) + '\x33' + chr(0b11 + 0o55) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b11001 + 0o30) + chr(52) + '\065', 1000 - 992), nzTpIcepk0o8('\060' + chr(12274 - 12163) + chr(1720 - 1670) + chr(50), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b111011 + 0o64) + chr(0b110010) + chr(0b1 + 0o57) + chr(0b1000 + 0o57), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b10010 + 0o37) + chr(51) + chr(0b110000), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(50) + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\061' + chr(2086 - 2034) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b1010000 + 0o37) + chr(0b110010) + '\061' + chr(1936 - 1886), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\063' + '\x31' + '\x31', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1001101 + 0o42) + chr(833 - 780) + chr(0b110101), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1100011 + 0o14) + '\x31' + '\x33' + chr(2110 - 2060), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(1040 - 991) + '\x37', 8), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(0b1101111) + chr(51) + '\061' + '\x31', 8), nzTpIcepk0o8('\060' + chr(3832 - 3721) + chr(2310 - 2261) + '\x31', 0b1000), nzTpIcepk0o8(chr(1227 - 1179) + chr(10751 - 10640) + chr(2146 - 2097) + chr(0b110100 + 0o2), 53076 - 53068), nzTpIcepk0o8(chr(0b110000) + chr(0b1101000 + 0o7) + chr(0b110010) + chr(0b101001 + 0o7) + '\x35', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1010010 + 0o35) + chr(0b100101 + 0o16) + chr(0b110100) + '\x34', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + chr(452 - 401) + chr(263 - 210), 55984 - 55976), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + chr(1807 - 1753), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b101101 + 0o5) + chr(54), 52290 - 52282), nzTpIcepk0o8(chr(1971 - 1923) + chr(0b110110 + 0o71) + '\061' + '\x31' + chr(0b110010), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(488 - 437) + '\063' + '\x36', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + '\x32' + '\063', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b101111 + 0o2) + '\x35' + chr(55), 0o10), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(0b1101111) + chr(2381 - 2332) + chr(0b110011) + chr(2343 - 2294), 65372 - 65364), nzTpIcepk0o8(chr(1237 - 1189) + chr(0b1101111) + chr(54) + chr(1036 - 981), 47631 - 47623), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b1000 + 0o51) + '\x36' + chr(2860 - 2805), 50299 - 50291), nzTpIcepk0o8('\060' + chr(111) + chr(49) + '\064', 57611 - 57603), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + chr(0b10 + 0o64) + chr(1011 - 963), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x35' + '\x30', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x99'), '\x64' + chr(0b1100101) + '\143' + '\x6f' + chr(9940 - 9840) + '\x65')(chr(0b1110101) + chr(116) + '\x66' + chr(903 - 858) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def caljZM__ZeGN(nx86o4xB5DE7=nzTpIcepk0o8(chr(2070 - 2022) + chr(2559 - 2448) + chr(783 - 733), ord("\x08")), **q5n0sHDDTy90): if not suIjIS24Zkqw(nx86o4xB5DE7, _dFCoXi84lCa): raise jZIjKu8IFANs(roI3spqORKae(ES5oEprVxulp(b'\xe7\xed\xa26\xdd\xf3\x01\xd5\xf4\x19b\xb0\x16f\xa7:pA\xeb\xa7\r3a\xbdli\xe0\x96s'), '\x64' + chr(0b1000110 + 0o37) + '\x63' + chr(0b1000000 + 0o57) + chr(0b1100100) + chr(101))(chr(0b110101 + 0o100) + chr(0b100101 + 0o117) + chr(8273 - 8171) + chr(45) + '\x38')) return Bn780rFFllwY(mmz4wIVFNRVT(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\x99\xe4\xbap'), '\x64' + '\x65' + chr(0b1100011) + '\x6f' + chr(7420 - 7320) + chr(101))(chr(2683 - 2566) + chr(0b1001010 + 0o52) + '\x66' + '\055' + chr(1488 - 1432)), roI3spqORKae(ES5oEprVxulp(b'\xc6\xac\xf4\x1e\xf3\xb3\x0e\xd5\xcbfL\x8f'), '\x64' + chr(0b111010 + 0o53) + '\x63' + '\x6f' + chr(7848 - 7748) + '\x65')(chr(117) + chr(12722 - 12606) + '\146' + '\x2d' + chr(56)))(nx86o4xB5DE7)))
HHammond/PrettyPandas
prettypandas/formatters.py
as_unit
def as_unit(unit, precision=2, location='suffix'): """Convert value to unit. Parameters: ----------- :param v: numerical value :param unit: string of unit :param precision: int decimal places to round to :param location: 'prefix' or 'suffix' representing where the currency symbol falls relative to the value """ if not isinstance(precision, Integral): raise TypeError("Precision must be an integer.") if location == 'prefix': formatter = partial(_format_numer, prefix=unit) elif location == 'suffix': formatter = partial(_format_numer, suffix=unit) else: raise ValueError("location must be either 'prefix' or 'suffix'.") return _surpress_formatting_errors( formatter("0.{}f".format(precision)) )
python
def as_unit(unit, precision=2, location='suffix'): """Convert value to unit. Parameters: ----------- :param v: numerical value :param unit: string of unit :param precision: int decimal places to round to :param location: 'prefix' or 'suffix' representing where the currency symbol falls relative to the value """ if not isinstance(precision, Integral): raise TypeError("Precision must be an integer.") if location == 'prefix': formatter = partial(_format_numer, prefix=unit) elif location == 'suffix': formatter = partial(_format_numer, suffix=unit) else: raise ValueError("location must be either 'prefix' or 'suffix'.") return _surpress_formatting_errors( formatter("0.{}f".format(precision)) )
[ "def", "as_unit", "(", "unit", ",", "precision", "=", "2", ",", "location", "=", "'suffix'", ")", ":", "if", "not", "isinstance", "(", "precision", ",", "Integral", ")", ":", "raise", "TypeError", "(", "\"Precision must be an integer.\"", ")", "if", "locatio...
Convert value to unit. Parameters: ----------- :param v: numerical value :param unit: string of unit :param precision: int decimal places to round to :param location: 'prefix' or 'suffix' representing where the currency symbol falls relative to the value
[ "Convert", "value", "to", "unit", "." ]
99a814ffc3aa61f66eaf902afaa4b7802518d33a
https://github.com/HHammond/PrettyPandas/blob/99a814ffc3aa61f66eaf902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HWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(0b1101111) + chr(0b110001) + chr(49) + chr(0b110011 + 0o0), 42733 - 42725), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b10110 + 0o131) + chr(2295 - 2245) + '\x35', 22952 - 22944), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + '\064' + '\x31', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b10100 + 0o36) + chr(0b110011) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(862 - 814) + chr(7329 - 7218) + chr(51) + chr(794 - 743) + chr(1367 - 1313), 0o10), nzTpIcepk0o8('\x30' + chr(0b1000110 + 0o51) + chr(50) + '\062' + chr(2212 - 2164), 0b1000), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(111) + '\x32' + '\065' + chr(48), 0o10), nzTpIcepk0o8(chr(48) + chr(0b111011 + 0o64) + '\x32' + '\x31' + chr(0b110101), 0b1000), nzTpIcepk0o8('\x30' + chr(0b110010 + 0o75) + '\063', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + chr(0b110110) + chr(0b110 + 0o53), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101001 + 0o6) + chr(0b11110 + 0o23) + chr(0b100001 + 0o21) + chr(0b1001 + 0o54), 23507 - 23499), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + '\066' + '\067', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b100110 + 0o15) + chr(1248 - 1200) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(1261 - 1213) + chr(6890 - 6779) + '\x36' + chr(54), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1001011 + 0o44) + chr(791 - 740) + chr(689 - 634) + chr(2116 - 2061), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110110) + '\x37', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101 + 0o54) + '\x32' + '\064', 0b1000), nzTpIcepk0o8(chr(218 - 170) + '\157' + chr(0b110011) + chr(2113 - 2063) + chr(0b100100 + 0o20), 61419 - 61411), nzTpIcepk0o8(chr(1794 - 1746) + chr(0b1101111) + chr(0b1 + 0o62) + chr(51) + '\060', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b10101 + 0o34) + chr(50) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1111 + 0o140) + chr(0b110010) + '\063' + '\x35', 5254 - 5246), nzTpIcepk0o8('\060' + '\x6f' + '\063' + chr(987 - 938) + '\062', ord("\x08")), nzTpIcepk0o8('\060' + chr(3883 - 3772) + chr(0b101000 + 0o11) + chr(0b110110) + '\061', 9721 - 9713), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b111110 + 0o61) + '\062' + chr(0b1000 + 0o57) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1101 + 0o46) + '\061' + chr(0b11101 + 0o32), ord("\x08")), nzTpIcepk0o8(chr(1092 - 1044) + chr(1202 - 1091) + '\063' + chr(55) + chr(0b110011 + 0o2), 29584 - 29576), nzTpIcepk0o8(chr(0b1011 + 0o45) + '\157' + chr(1214 - 1164) + chr(50) + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1101111) + '\x31' + chr(0b110011) + '\067', ord("\x08")), nzTpIcepk0o8(chr(1612 - 1564) + chr(11422 - 11311) + '\x33' + chr(55) + chr(55), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + '\x35' + chr(50), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(869 - 818) + chr(0b110000) + '\061', 60563 - 60555), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b0 + 0o61) + '\063' + chr(49), 0o10), nzTpIcepk0o8(chr(1416 - 1368) + '\x6f' + '\x34' + chr(0b10000 + 0o41), ord("\x08")), nzTpIcepk0o8(chr(2052 - 2004) + chr(8971 - 8860) + '\x33' + '\x35', ord("\x08")), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(9855 - 9744) + chr(0b101000 + 0o14), 0o10), nzTpIcepk0o8(chr(114 - 66) + '\157' + chr(0b100100 + 0o17) + chr(429 - 376) + chr(0b11010 + 0o32), 37736 - 37728), nzTpIcepk0o8('\060' + chr(2101 - 1990) + chr(0b110011) + chr(52) + chr(0b110011), 56752 - 56744), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(0b100010 + 0o17), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + '\x30' + chr(0b110101), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b1101 + 0o46) + chr(2907 - 2852) + chr(364 - 312), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b1100110 + 0o11) + '\x35' + chr(0b110000), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'e'), chr(100) + '\145' + chr(7632 - 7533) + chr(0b1101111) + '\144' + chr(0b1001000 + 0o35))(chr(0b1110101) + '\164' + chr(102) + '\x2d' + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Ns7AhuVrYR68(FMmD16A2grCG, nx86o4xB5DE7=nzTpIcepk0o8('\060' + '\157' + chr(0b110010), 4359 - 4351), y87dwGy_Qoj4=roI3spqORKae(ES5oEprVxulp(b'8`\x07\xf9\xb7\xe8'), chr(0b1001101 + 0o27) + '\x65' + chr(0b1100011) + chr(10799 - 10688) + chr(788 - 688) + '\x65')(chr(0b1100100 + 0o21) + '\164' + chr(102) + chr(667 - 622) + chr(0b111000))): if not suIjIS24Zkqw(nx86o4xB5DE7, _dFCoXi84lCa): raise jZIjKu8IFANs(roI3spqORKae(ES5oEprVxulp(b'\x1bg\x04\xfc\xb7\xe3\xc1\xe2m\xd18\x82\xb7B\xdfU1\xf4\xb99\xbd\xa3\x1f\xca\xaa\x9a\xf4-\xd1'), chr(0b1100100) + chr(101) + chr(0b1100011) + '\x6f' + chr(9636 - 9536) + '\x65')(chr(11545 - 11428) + '\164' + '\146' + '\055' + '\070')) if y87dwGy_Qoj4 == roI3spqORKae(ES5oEprVxulp(b';g\x04\xf9\xb7\xe8'), chr(0b1100100) + chr(101) + chr(0b100 + 0o137) + chr(0b110010 + 0o75) + '\144' + chr(101))('\x75' + chr(0b1001011 + 0o51) + chr(102) + chr(1877 - 1832) + chr(0b111000)): Cn6yf2gY02SW = v_5JLGL_2DSR(mmz4wIVFNRVT, prefix=FMmD16A2grCG) elif y87dwGy_Qoj4 == roI3spqORKae(ES5oEprVxulp(b'8`\x07\xf9\xb7\xe8'), '\x64' + '\x65' + '\143' + chr(11828 - 11717) + chr(0b1100100) + '\x65')(chr(1199 - 1082) + chr(9617 - 9501) + chr(6560 - 6458) + chr(905 - 860) + '\x38'): Cn6yf2gY02SW = v_5JLGL_2DSR(mmz4wIVFNRVT, suffix=FMmD16A2grCG) else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b"'z\x02\xfe\xaa\xf9\xc7\xe3#\x9c \x84\xb0\x16\x9dRt\xb1\xb1#\xf5\xaf\x03\x9e\xe8\x8d\xe3:\x99\x03\xb9~\x01rv\xcc\xc4j0\x9a-|\x19\xb8\xf0"), chr(0b1100100) + '\145' + chr(0b110110 + 0o55) + '\157' + chr(1294 - 1194) + '\145')('\165' + '\164' + '\x66' + chr(1866 - 1821) + chr(642 - 586))) return Bn780rFFllwY(Cn6yf2gY02SW(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'{;\x1a\xe2\xb8'), '\144' + '\145' + chr(0b1100011) + chr(111) + chr(3281 - 3181) + '\145')(chr(117) + chr(116) + chr(1159 - 1057) + chr(0b101101) + '\x38'), roI3spqORKae(ES5oEprVxulp(b':&R\xd4\x99\xa3\xce\xe2R\xae\x16\xbd'), chr(0b1011111 + 0o5) + chr(5989 - 5888) + '\143' + '\157' + chr(8852 - 8752) + chr(0b10000 + 0o125))('\165' + chr(0b1100 + 0o150) + chr(0b110011 + 0o63) + chr(0b101001 + 0o4) + chr(0b101011 + 0o15)))(nx86o4xB5DE7)))
HHammond/PrettyPandas
prettypandas/summarizer.py
Aggregate.apply
def apply(self, df): """Compute aggregate over DataFrame""" if self.subset: if _axis_is_rows(self.axis): df = df[self.subset] if _axis_is_cols(self.axis): df = df.loc[self.subset] result = df.agg(self.func, axis=self.axis, *self.args, **self.kwargs) result.name = self.title return result
python
def apply(self, df): """Compute aggregate over DataFrame""" if self.subset: if _axis_is_rows(self.axis): df = df[self.subset] if _axis_is_cols(self.axis): df = df.loc[self.subset] result = df.agg(self.func, axis=self.axis, *self.args, **self.kwargs) result.name = self.title return result
[ "def", "apply", "(", "self", ",", "df", ")", ":", "if", "self", ".", "subset", ":", "if", "_axis_is_rows", "(", "self", ".", "axis", ")", ":", "df", "=", "df", "[", "self", ".", "subset", "]", "if", "_axis_is_cols", "(", "self", ".", "axis", ")",...
Compute aggregate over DataFrame
[ "Compute", "aggregate", "over", "DataFrame" ]
99a814ffc3aa61f66eaf902afaa4b7802518d33a
https://github.com/HHammond/PrettyPandas/blob/99a814ffc3aa61f66eaf902afaa4b7802518d33a/prettypandas/summarizer.py#L53-L64
train
Compute aggregate over DataFrame df
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,T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IptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + '\x6f' + chr(50) + chr(860 - 807) + chr(0b110110), 542 - 534), nzTpIcepk0o8('\x30' + '\157' + chr(49) + '\061', 0o10), nzTpIcepk0o8(chr(2042 - 1994) + chr(111) + chr(0b110011) + '\x37' + chr(0b110110), 0o10), nzTpIcepk0o8(chr(48) + chr(2738 - 2627) + '\061' + '\x32' + '\x34', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110100) + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b1100011 + 0o14) + '\x31' + chr(722 - 671) + chr(50), 61329 - 61321), nzTpIcepk0o8('\x30' + chr(0b1011 + 0o144) + '\062' + chr(0b110110) + chr(497 - 443), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b10111 + 0o130) + '\x36' + chr(48), ord("\x08")), nzTpIcepk0o8('\060' + chr(8594 - 8483) + chr(137 - 86) + chr(0b110101) + '\062', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110100) + '\063', ord("\x08")), nzTpIcepk0o8(chr(2025 - 1977) + chr(1404 - 1293) + '\062' + chr(0b1000 + 0o50) + chr(1855 - 1806), 34367 - 34359), nzTpIcepk0o8(chr(1174 - 1126) + chr(0b1101111) + chr(0b11000 + 0o32) + '\066' + '\x33', 0o10), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(5227 - 5116) + chr(0b110 + 0o54) + chr(153 - 103) + '\x34', 0o10), nzTpIcepk0o8('\x30' + chr(0b101000 + 0o107) + '\063' + chr(0b110001 + 0o3) + '\x30', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + chr(0b110001) + chr(0b110101), 0o10), nzTpIcepk0o8('\x30' + chr(0b101111 + 0o100) + chr(1109 - 1059) + '\062' + '\060', 0o10), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(111) + chr(0b110011) + '\065', 0b1000), nzTpIcepk0o8('\x30' + chr(0b111100 + 0o63) + chr(0b1001 + 0o55) + '\063', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x34', 0b1000), nzTpIcepk0o8(chr(2080 - 2032) + '\x6f' + chr(2296 - 2243) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + '\065' + chr(0b110101), 17499 - 17491), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(10353 - 10242) + '\062' + chr(326 - 277) + chr(2517 - 2464), 27401 - 27393), nzTpIcepk0o8(chr(48) + '\x6f' + '\060', 28479 - 28471), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32' + '\066' + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\x6f' + '\x31' + chr(1384 - 1335) + chr(1850 - 1798), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + '\x37' + '\063', ord("\x08")), nzTpIcepk0o8(chr(1729 - 1681) + chr(0b1101111) + chr(49) + chr(2212 - 2163) + '\x32', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + '\066' + chr(54), 0b1000), nzTpIcepk0o8(chr(1255 - 1207) + chr(11121 - 11010) + chr(1945 - 1895) + chr(50) + chr(53), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(49) + '\x30', 21677 - 21669), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + chr(0b110100) + '\062', ord("\x08")), nzTpIcepk0o8('\060' + chr(6973 - 6862) + chr(0b110000 + 0o2) + '\063' + chr(0b110000), 36875 - 36867), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x34' + chr(0b101110 + 0o5), 8), nzTpIcepk0o8(chr(1689 - 1641) + chr(0b1101111) + chr(0b110011) + chr(0b110010) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(2496 - 2446) + '\x35' + chr(812 - 757), 0b1000), nzTpIcepk0o8('\x30' + chr(0b110010 + 0o75) + chr(2294 - 2245) + '\065' + '\x35', 8), nzTpIcepk0o8('\060' + '\x6f' + chr(176 - 125) + chr(49) + '\x35', 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1001110 + 0o41) + '\x31' + chr(0b101110 + 0o4) + chr(1152 - 1101), 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(2808 - 2697) + '\063' + chr(0b10 + 0o56) + '\061', 36570 - 36562), nzTpIcepk0o8(chr(829 - 781) + chr(4210 - 4099) + chr(0b110011) + '\067' + '\x37', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\x6f' + chr(0b110101) + '\060', 8556 - 8548)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x80'), chr(0b1010101 + 0o17) + chr(5909 - 5808) + chr(3319 - 3220) + chr(111) + '\144' + '\145')(chr(0b1111 + 0o146) + chr(0b1110100) + chr(0b1100110) + '\055' + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def VpiTlG1R9Ule(hXMPsSrOQzbh, jpOn8DNZxbbx): if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b"\xdd|\x9c'G."), chr(0b100111 + 0o75) + chr(101) + chr(99) + '\x6f' + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(102) + chr(0b101101) + chr(1423 - 1367))): if z9OTZn41Vyka(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xe4M\xc7d\x10*\xc0I\xa9o\xc9\x82'), chr(100) + chr(0b1100 + 0o131) + '\x63' + chr(0b1101111) + chr(6397 - 6297) + chr(0b1100101))(chr(6613 - 6496) + '\164' + chr(8876 - 8774) + '\x2d' + chr(0b111000)))): jpOn8DNZxbbx = jpOn8DNZxbbx[hXMPsSrOQzbh.subset] if EFIW7ER9Rmy5(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xe4M\xc7d\x10*\xc0I\xa9o\xc9\x82'), chr(0b1001010 + 0o32) + chr(0b1 + 0o144) + chr(99) + '\157' + '\x64' + '\145')('\165' + chr(10916 - 10800) + chr(0b100000 + 0o106) + chr(0b101101) + '\x38'))): jpOn8DNZxbbx = jpOn8DNZxbbx.UQ8hRiBoHcn5[hXMPsSrOQzbh.subset] POx95m7SPOVy = jpOn8DNZxbbx.agg(hXMPsSrOQzbh.h0klhChk4Vv6, *hXMPsSrOQzbh.eemPYp2vtTSr, axis=hXMPsSrOQzbh.JD902pvyCLH1, **hXMPsSrOQzbh.q5n0sHDDTy90) POx95m7SPOVy.SLVB2BPA_mIe = hXMPsSrOQzbh.OO0tRW9aj_xh return POx95m7SPOVy
HHammond/PrettyPandas
prettypandas/summarizer.py
Formatter.apply
def apply(self, styler): """Apply Summary over Pandas Styler""" return styler.format(self.formatter, *self.args, **self.kwargs)
python
def apply(self, styler): """Apply Summary over Pandas Styler""" return styler.format(self.formatter, *self.args, **self.kwargs)
[ "def", "apply", "(", "self", ",", "styler", ")", ":", "return", "styler", ".", "format", "(", "self", ".", "formatter", ",", "*", "self", ".", "args", ",", "*", "*", "self", ".", "kwargs", ")" ]
Apply Summary over Pandas Styler
[ "Apply", "Summary", "over", "Pandas", "Styler" ]
99a814ffc3aa61f66eaf902afaa4b7802518d33a
https://github.com/HHammond/PrettyPandas/blob/99a814ffc3aa61f66eaf902afaa4b7802518d33a/prettypandas/summarizer.py#L85-L87
train
Apply Summary over Pandas Styler
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v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OIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110 + 0o54) + chr(49) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(8723 - 8612) + '\x32' + '\x36' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(0b11010 + 0o125) + '\x31' + chr(2812 - 2758) + chr(2829 - 2775), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\063' + chr(0b101111 + 0o5) + chr(48), 27010 - 27002), nzTpIcepk0o8(chr(622 - 574) + chr(10620 - 10509) + '\062' + '\x30' + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(643 - 595) + chr(0b1101111) + chr(354 - 305) + chr(1461 - 1409) + '\x32', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100110 + 0o14) + '\x30' + '\061', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + chr(53), 0b1000), nzTpIcepk0o8(chr(0b10 + 0o56) + '\157' + chr(1921 - 1871) + '\x36' + chr(53), ord("\x08")), nzTpIcepk0o8('\060' + chr(10825 - 10714) + chr(1799 - 1750) + '\x30' + '\064', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + chr(0b100 + 0o55) + chr(1167 - 1116), 8), nzTpIcepk0o8('\060' + chr(111) + chr(49) + '\x35' + chr(427 - 375), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110111) + chr(1228 - 1175), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(7855 - 7744) + chr(0b110101) + '\x34', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + '\062' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + chr(0b1101 + 0o50) + chr(52), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(49) + chr(0b101110 + 0o10) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(48) + chr(185 - 74) + chr(539 - 488) + '\x30', 50782 - 50774), nzTpIcepk0o8('\x30' + chr(0b10011 + 0o134) + chr(0b1 + 0o60) + chr(0b110010 + 0o1) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(54) + chr(55), 0b1000), nzTpIcepk0o8(chr(48) + chr(3290 - 3179) + chr(0b110001) + '\064' + chr(0b110010), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\064' + chr(55), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x35' + chr(50), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(1886 - 1837) + '\064' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(1549 - 1501) + chr(0b1101111) + '\063' + chr(0b11111 + 0o21), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1370 - 1316) + '\x30', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(2397 - 2286) + chr(2326 - 2277) + chr(52) + chr(0b110110), 55809 - 55801), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110 + 0o60) + '\067', 8), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + '\x32' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(48) + chr(9553 - 9442) + chr(0b110010) + '\065' + '\x32', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(51) + '\067' + chr(0b110111), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(51) + chr(54) + chr(0b10110 + 0o41), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b11010 + 0o30) + chr(0b110110) + chr(0b110000), 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(54) + chr(352 - 304), 8), nzTpIcepk0o8(chr(680 - 632) + chr(111) + chr(0b110001) + chr(0b11110 + 0o23) + chr(0b11101 + 0o27), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(5630 - 5519) + chr(0b0 + 0o61) + chr(0b1111 + 0o43) + '\x32', 23933 - 23925), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1950 - 1901) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1100100 + 0o13) + '\063' + chr(0b1111 + 0o42) + '\064', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x32' + '\x31' + chr(300 - 251), 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b1101111) + chr(1144 - 1093) + '\062' + chr(1959 - 1905), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(111) + chr(0b110101) + chr(0b110000), 18868 - 18860)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xa5'), chr(100) + chr(747 - 646) + '\143' + '\157' + chr(7394 - 7294) + chr(101))('\x75' + chr(0b1001000 + 0o54) + '\x66' + chr(0b101101) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def VpiTlG1R9Ule(hXMPsSrOQzbh, pOe_UOsGsV6s): return roI3spqORKae(pOe_UOsGsV6s, roI3spqORKae(ES5oEprVxulp(b'\xfa\x83E\xab\xc3Q\xe7b\xe4\x1b\xc8&'), '\x64' + '\x65' + chr(0b1100011) + '\157' + '\x64' + chr(0b110 + 0o137))('\x75' + '\x74' + '\x66' + chr(1871 - 1826) + chr(56)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xc8\xde@\x99\xe2P\xe6T\x85v\xd8;'), chr(4130 - 4030) + chr(7267 - 7166) + '\143' + chr(10510 - 10399) + chr(1245 - 1145) + chr(0b111110 + 0o47))(chr(117) + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + chr(56))), *roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xee\xd5\x1b\xb0\xdd\x12\xb3{\xc1\x10\xd8\x1e'), chr(0b1100100) + chr(7788 - 7687) + '\x63' + chr(0b1101111) + '\144' + chr(0b1100101))(chr(117) + chr(0b1110100) + chr(102) + chr(45) + chr(56))), **roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xfa\x85\x18\xd0\xf7*\xc5I\xe1=\xb2\\'), '\x64' + chr(0b1010000 + 0o25) + chr(0b1100011) + '\157' + '\144' + '\145')(chr(0b110 + 0o157) + chr(0b1110100) + '\x66' + chr(45) + chr(56))))
HHammond/PrettyPandas
prettypandas/summarizer.py
PrettyPandas._apply_summaries
def _apply_summaries(self): """Add all summary rows and columns.""" def as_frame(r): if isinstance(r, pd.Series): return r.to_frame() else: return r df = self.data if df.index.nlevels > 1: raise ValueError( "You cannot currently have both summary rows and columns on a " "MultiIndex." ) _df = df if self.summary_rows: rows = pd.concat([agg.apply(_df) for agg in self._cleaned_summary_rows], axis=1).T df = pd.concat([df, as_frame(rows)], axis=0) if self.summary_cols: cols = pd.concat([agg.apply(_df) for agg in self._cleaned_summary_cols], axis=1) df = pd.concat([df, as_frame(cols)], axis=1) return df
python
def _apply_summaries(self): """Add all summary rows and columns.""" def as_frame(r): if isinstance(r, pd.Series): return r.to_frame() else: return r df = self.data if df.index.nlevels > 1: raise ValueError( "You cannot currently have both summary rows and columns on a " "MultiIndex." ) _df = df if self.summary_rows: rows = pd.concat([agg.apply(_df) for agg in self._cleaned_summary_rows], axis=1).T df = pd.concat([df, as_frame(rows)], axis=0) if self.summary_cols: cols = pd.concat([agg.apply(_df) for agg in self._cleaned_summary_cols], axis=1) df = pd.concat([df, as_frame(cols)], axis=1) return df
[ "def", "_apply_summaries", "(", "self", ")", ":", "def", "as_frame", "(", "r", ")", ":", "if", "isinstance", "(", "r", ",", "pd", ".", "Series", ")", ":", "return", "r", ".", "to_frame", "(", ")", "else", ":", "return", "r", "df", "=", "self", "....
Add all summary rows and columns.
[ "Add", "all", "summary", "rows", "and", "columns", "." ]
99a814ffc3aa61f66eaf902afaa4b7802518d33a
https://github.com/HHammond/PrettyPandas/blob/99a814ffc3aa61f66eaf902afaa4b7802518d33a/prettypandas/summarizer.py#L162-L190
train
Add all summary rows and columns.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2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z6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(0b1010 + 0o145) + '\063' + chr(0b1110 + 0o43) + '\x36', 0b1000), nzTpIcepk0o8(chr(241 - 193) + chr(111) + chr(1956 - 1906) + chr(0b110101 + 0o2) + '\066', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + chr(1434 - 1382) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(48) + chr(276 - 165) + chr(0b110001) + '\x36' + chr(55), 9267 - 9259), nzTpIcepk0o8('\x30' + chr(4282 - 4171) + chr(0b110100) + chr(0b10110 + 0o40), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + '\x33' + '\x35', 43901 - 43893), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b1101111) + chr(0b110100) + chr(2124 - 2074), 0b1000), nzTpIcepk0o8(chr(0b100111 + 0o11) + '\157' + chr(0b110011) + chr(0b1100 + 0o45) + '\x31', 0o10), nzTpIcepk0o8(chr(48) + chr(2279 - 2168) + '\x36' + '\x35', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(484 - 373) + chr(1248 - 1197) + '\066' + '\x36', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(2059 - 2010) + '\x32' + '\x31', 20433 - 20425), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1881 - 1831) + chr(0b111 + 0o56), 0o10), nzTpIcepk0o8(chr(1797 - 1749) + chr(0b11000 + 0o127) + chr(0b101010 + 0o12) + chr(0b110111), 43035 - 43027), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + chr(1384 - 1330) + '\061', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + '\066' + '\x36', 8), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b10101 + 0o132) + chr(2129 - 2078) + chr(54) + '\064', 0b1000), nzTpIcepk0o8(chr(0b101010 + 0o6) + '\157' + chr(0b100111 + 0o13) + chr(2494 - 2442) + '\x30', 21804 - 21796), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + chr(1057 - 1005) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b1101111) + '\x31' + chr(49) + chr(0b101000 + 0o13), 0b1000), nzTpIcepk0o8(chr(1864 - 1816) + '\x6f' + chr(0b110101) + '\x30', 62596 - 62588), nzTpIcepk0o8(chr(48) + chr(4991 - 4880) + chr(51) + '\x34' + chr(0b100001 + 0o17), 0o10), nzTpIcepk0o8(chr(0b101100 + 0o4) + '\157' + chr(0b110010) + chr(54) + '\x33', 55658 - 55650), nzTpIcepk0o8(chr(1067 - 1019) + '\x6f' + chr(0b101110 + 0o10) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(621 - 572) + chr(0b110111) + chr(195 - 146), 0o10), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b1101111) + '\063' + chr(0b100 + 0o61) + chr(0b1101 + 0o52), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(51) + chr(1914 - 1860) + '\063', 22264 - 22256), nzTpIcepk0o8(chr(1982 - 1934) + chr(0b1101111) + chr(2103 - 2052) + '\x32' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1000011 + 0o54) + chr(0b101110 + 0o4) + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b1010 + 0o46) + '\157' + chr(49) + chr(0b100000 + 0o26) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(49) + chr(0b110010 + 0o0), 16587 - 16579), nzTpIcepk0o8('\060' + chr(111) + '\x32' + chr(0b100101 + 0o15) + chr(0b111 + 0o51), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(49) + chr(0b11011 + 0o27) + chr(1639 - 1590), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + '\067' + chr(2680 - 2628), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + chr(0b11000 + 0o35), 0o10), nzTpIcepk0o8(chr(150 - 102) + chr(111) + chr(50) + '\066' + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(1422 - 1374) + chr(111) + chr(0b110010) + chr(0b110001) + '\062', 0o10), nzTpIcepk0o8(chr(0b111 + 0o51) + '\x6f' + chr(1312 - 1263) + chr(0b110110) + '\x34', 8), nzTpIcepk0o8(chr(0b1101 + 0o43) + '\x6f' + '\x31' + chr(1028 - 977), 0o10), nzTpIcepk0o8(chr(985 - 937) + chr(0b1101111) + chr(0b110001 + 0o1) + chr(0b1101 + 0o50), 8), nzTpIcepk0o8(chr(2085 - 2037) + chr(0b1011011 + 0o24) + chr(0b110011) + chr(0b1011 + 0o46) + chr(626 - 578), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(623 - 575) + '\157' + chr(0b111 + 0o56) + '\060', 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xe0'), chr(0b1100100) + chr(0b1100001 + 0o4) + '\x63' + '\x6f' + chr(100) + '\145')('\x75' + chr(116) + '\146' + chr(1285 - 1240) + chr(2293 - 2237)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def XStPtl9osSJb(hXMPsSrOQzbh): def DhIEaYMVJK6q(LCrwg7lcbmU9): if suIjIS24Zkqw(LCrwg7lcbmU9, roI3spqORKae(HLKt4sa1j9hm, roI3spqORKae(ES5oEprVxulp(b'\x9d\xdb\xd6\x1eC\xae'), chr(0b1100100) + chr(101) + chr(99) + chr(0b1101111) + chr(2503 - 2403) + chr(101))(chr(0b1110101) + chr(11947 - 11831) + chr(0b1010101 + 0o21) + chr(422 - 377) + chr(0b10100 + 0o44)))): return roI3spqORKae(LCrwg7lcbmU9, roI3spqORKae(ES5oEprVxulp(b'\xba\xd1\xfb\x11T\xbcO\xac'), chr(0b110010 + 0o62) + chr(5657 - 5556) + chr(99) + chr(0b100110 + 0o111) + chr(0b111010 + 0o52) + chr(0b1100101))(chr(117) + chr(0b10 + 0o162) + chr(3724 - 3622) + chr(45) + chr(0b11101 + 0o33)))() else: return LCrwg7lcbmU9 jpOn8DNZxbbx = hXMPsSrOQzbh.FfKOThdpoDTb if roI3spqORKae(jpOn8DNZxbbx.index, roI3spqORKae(ES5oEprVxulp(b'\xa0\xd2\xc1\x01C\xb1Q'), '\144' + chr(0b1100101) + '\143' + chr(111) + chr(100) + chr(0b1100101))(chr(0b10101 + 0o140) + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(94 - 38))) > nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001), ord("\x08")): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\x97\xd1\xd1WE\xbcL\xa7Z\x82qvR\xc3\x84\x91\xce\x93\'Q\xc0\xdbP\x0f\x8a\xd3\xb3}\x00b\xb0"\x89`\xda\xeb\x06r5\xba\xa1\xc9\xd7WG\xb3F\xe9V\x99=`J\xdf\x85\xd4\xcf\x89kI\xc0\xfeD\x15\x9b\x9a\x98|\x10o\xe8\x7f'), chr(100) + chr(8232 - 8131) + chr(628 - 529) + chr(932 - 821) + '\x64' + chr(7009 - 6908))(chr(9191 - 9074) + chr(0b1110100) + chr(0b10100 + 0o122) + chr(45) + '\x38')) BIdRT7CdHvAT = jpOn8DNZxbbx if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xbd\xcb\xc9\x1aG\xaf[\x96G\x99&f'), '\x64' + chr(2216 - 2115) + '\143' + '\x6f' + chr(3867 - 3767) + chr(7211 - 7110))(chr(0b1110101) + chr(0b1110100) + chr(1213 - 1111) + '\055' + chr(1432 - 1376))): AUW_CJJJXKka = HLKt4sa1j9hm.concat([KjmsF1_kSrCG.apply(BIdRT7CdHvAT) for KjmsF1_kSrCG in hXMPsSrOQzbh._cleaned_summary_rows], axis=nzTpIcepk0o8(chr(0b110000) + chr(0b111100 + 0o63) + chr(0b11111 + 0o22), 8)).hq6XE4_Nhd6R jpOn8DNZxbbx = HLKt4sa1j9hm.concat([jpOn8DNZxbbx, DhIEaYMVJK6q(AUW_CJJJXKka)], axis=nzTpIcepk0o8(chr(2282 - 2234) + chr(111) + chr(1506 - 1458), 0o10)) if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xbd\xcb\xc9\x1aG\xaf[\x96V\x99=f'), chr(0b1100100) + '\x65' + chr(99) + chr(709 - 598) + '\144' + chr(0b1100101))(chr(10217 - 10100) + chr(10163 - 10047) + '\146' + chr(0b101101 + 0o0) + '\070')): Y2QfnnvVOo8E = HLKt4sa1j9hm.concat([KjmsF1_kSrCG.apply(BIdRT7CdHvAT) for KjmsF1_kSrCG in hXMPsSrOQzbh._cleaned_summary_cols], axis=nzTpIcepk0o8('\x30' + chr(111) + '\061', 8)) jpOn8DNZxbbx = HLKt4sa1j9hm.concat([jpOn8DNZxbbx, DhIEaYMVJK6q(Y2QfnnvVOo8E)], axis=nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(111) + chr(0b110000 + 0o1), 8)) return jpOn8DNZxbbx
HHammond/PrettyPandas
prettypandas/summarizer.py
PrettyPandas.style
def style(self): """Add summaries and convert to Pandas Styler""" row_titles = [a.title for a in self._cleaned_summary_rows] col_titles = [a.title for a in self._cleaned_summary_cols] row_ix = pd.IndexSlice[row_titles, :] col_ix = pd.IndexSlice[:, col_titles] def handle_na(df): df.loc[col_ix] = df.loc[col_ix].fillna('') df.loc[row_ix] = df.loc[row_ix].fillna('') return df styler = ( self .frame .pipe(handle_na) .style .applymap(lambda r: 'font-weight: 900', subset=row_ix) .applymap(lambda r: 'font-weight: 900', subset=col_ix) ) for formatter in self.formatters: styler = formatter.apply(styler) return styler
python
def style(self): """Add summaries and convert to Pandas Styler""" row_titles = [a.title for a in self._cleaned_summary_rows] col_titles = [a.title for a in self._cleaned_summary_cols] row_ix = pd.IndexSlice[row_titles, :] col_ix = pd.IndexSlice[:, col_titles] def handle_na(df): df.loc[col_ix] = df.loc[col_ix].fillna('') df.loc[row_ix] = df.loc[row_ix].fillna('') return df styler = ( self .frame .pipe(handle_na) .style .applymap(lambda r: 'font-weight: 900', subset=row_ix) .applymap(lambda r: 'font-weight: 900', subset=col_ix) ) for formatter in self.formatters: styler = formatter.apply(styler) return styler
[ "def", "style", "(", "self", ")", ":", "row_titles", "=", "[", "a", ".", "title", "for", "a", "in", "self", ".", "_cleaned_summary_rows", "]", "col_titles", "=", "[", "a", ".", "title", "for", "a", "in", "self", ".", "_cleaned_summary_cols", "]", "row_...
Add summaries and convert to Pandas Styler
[ "Add", "summaries", "and", "convert", "to", "Pandas", "Styler" ]
99a814ffc3aa61f66eaf902afaa4b7802518d33a
https://github.com/HHammond/PrettyPandas/blob/99a814ffc3aa61f66eaf902afaa4b7802518d33a/prettypandas/summarizer.py#L202-L226
train
Add summaries and convert to Pandas Styler
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZ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MV,typojWN5Phrq,gufQJgTAhMnI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + '\x6f' + '\064' + chr(620 - 565), 0b1000), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(2317 - 2206) + chr(1255 - 1205) + '\x33' + chr(0b110101), 60089 - 60081), nzTpIcepk0o8(chr(1105 - 1057) + chr(0b1101111) + chr(1234 - 1184), 0b1000), nzTpIcepk0o8(chr(1060 - 1012) + chr(0b1101111) + chr(2483 - 2433) + '\061' + '\065', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(10398 - 10287) + chr(0b1111 + 0o42) + '\x35' + chr(435 - 387), ord("\x08")), nzTpIcepk0o8(chr(0b10100 + 0o34) + '\x6f' + chr(2325 - 2275) + chr(0b110 + 0o52) + '\x32', 36649 - 36641), nzTpIcepk0o8(chr(48) + '\157' + chr(0b1000 + 0o51) + chr(2174 - 2126) + chr(53), 24162 - 24154), nzTpIcepk0o8('\x30' + chr(5413 - 5302) + chr(0b10000 + 0o43) + chr(1783 - 1734) + '\x37', 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x31' + chr(0b110110) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b10111 + 0o32) + chr(0b1010 + 0o54) + chr(54), 0b1000), nzTpIcepk0o8(chr(934 - 886) + chr(111) + chr(723 - 673) + chr(51) + chr(49), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001) + chr(0b11 + 0o56) + chr(0b110000 + 0o0), 0o10), nzTpIcepk0o8(chr(0b101 + 0o53) + '\157' + chr(1346 - 1296) + chr(51) + chr(0b110101), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + chr(0b11101 + 0o31) + '\x32', 28012 - 28004), nzTpIcepk0o8(chr(0b110000) + chr(11934 - 11823) + '\061' + chr(0b10010 + 0o44) + chr(1824 - 1770), 8), nzTpIcepk0o8(chr(252 - 204) + chr(0b1101111) + chr(49) + chr(0b11001 + 0o34) + chr(53), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + '\x31' + chr(1748 - 1693), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(5754 - 5643) + '\x32' + '\064' + chr(1698 - 1650), 37407 - 37399), nzTpIcepk0o8(chr(1017 - 969) + chr(111) + '\x33' + chr(0b10001 + 0o44) + chr(0b110111), 12297 - 12289), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010) + chr(0b110010) + chr(0b10101 + 0o40), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b11010 + 0o31) + '\061' + '\062', 0o10), nzTpIcepk0o8(chr(1595 - 1547) + chr(111) + '\062' + chr(2565 - 2511) + chr(1773 - 1724), 50002 - 49994), nzTpIcepk0o8('\x30' + chr(0b100011 + 0o114) + chr(555 - 506) + chr(1595 - 1547) + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b1101111) + chr(0b110010) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(9814 - 9703) + '\065' + '\065', ord("\x08")), nzTpIcepk0o8(chr(289 - 241) + '\157' + '\x33' + '\x36' + '\062', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + chr(0b110001) + chr(0b101010 + 0o12), 0o10), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\x6f' + '\x31' + chr(51) + chr(0b1110 + 0o43), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\063' + chr(0b100101 + 0o14) + chr(0b100011 + 0o21), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(734 - 685) + '\x30' + '\x32', 0b1000), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(111) + chr(1370 - 1321) + '\063', 0o10), nzTpIcepk0o8('\x30' + chr(0b1100110 + 0o11) + '\x31' + chr(0b10111 + 0o40) + '\060', 36881 - 36873), nzTpIcepk0o8(chr(0b11010 + 0o26) + '\x6f' + chr(0b100001 + 0o21) + chr(310 - 255) + chr(55), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110111) + chr(0b100 + 0o56), 0o10), nzTpIcepk0o8(chr(0b110 + 0o52) + '\157' + '\x32' + '\x31' + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31' + '\x36' + '\x30', 0o10), nzTpIcepk0o8('\x30' + chr(0b101000 + 0o107) + chr(0b110011) + '\067' + chr(0b11110 + 0o23), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\x34' + chr(1516 - 1467), 13790 - 13782), nzTpIcepk0o8(chr(482 - 434) + chr(0b1101111) + '\x31' + '\061' + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b10000 + 0o40) + '\157' + '\063' + chr(51) + chr(54), 53366 - 53358)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(111) + '\x35' + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\t'), '\x64' + '\145' + '\143' + '\x6f' + chr(0b1100100) + chr(0b1100101))(chr(0b1011001 + 0o34) + chr(116) + chr(0b10100 + 0o122) + chr(1595 - 1550) + chr(1938 - 1882)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def EPLc722o35c6(hXMPsSrOQzbh): VaoZwZo0S3_K = [AQ9ceR9AaoT1.OO0tRW9aj_xh for AQ9ceR9AaoT1 in hXMPsSrOQzbh._cleaned_summary_rows] xlozGgqNe1TP = [AQ9ceR9AaoT1.OO0tRW9aj_xh for AQ9ceR9AaoT1 in hXMPsSrOQzbh._cleaned_summary_cols] VCD2TmzNQmSq = HLKt4sa1j9hm.IndexSlice[VaoZwZo0S3_K, :] TtrW9LyPZmdO = HLKt4sa1j9hm.IndexSlice[:, xlozGgqNe1TP] def AI2WimOdhpBq(jpOn8DNZxbbx): jpOn8DNZxbbx.UQ8hRiBoHcn5[TtrW9LyPZmdO] = jpOn8DNZxbbx.loc[TtrW9LyPZmdO].fillna(roI3spqORKae(ES5oEprVxulp(b''), chr(2490 - 2390) + '\x65' + chr(0b1100011) + chr(6525 - 6414) + chr(100) + chr(0b1100101))(chr(117) + chr(4005 - 3889) + chr(444 - 342) + chr(0b101101) + '\x38')) jpOn8DNZxbbx.UQ8hRiBoHcn5[VCD2TmzNQmSq] = jpOn8DNZxbbx.loc[VCD2TmzNQmSq].fillna(roI3spqORKae(ES5oEprVxulp(b''), '\144' + chr(101) + '\x63' + chr(111) + chr(0b110100 + 0o60) + chr(5351 - 5250))(chr(117) + chr(5743 - 5627) + '\x66' + chr(638 - 593) + chr(809 - 753))) return jpOn8DNZxbbx pOe_UOsGsV6s = hXMPsSrOQzbh.frame.pipe(AI2WimOdhpBq).style.applymap(lambda LCrwg7lcbmU9: roI3spqORKae(ES5oEprVxulp(b'A\xf2l\xf9E\xf5 \xa6\x12\x1e\xedr\xbdKF]'), chr(0b1010001 + 0o23) + chr(101) + chr(0b1010010 + 0o21) + chr(0b1101111) + '\144' + chr(5671 - 5570))('\165' + chr(0b10101 + 0o137) + chr(5735 - 5633) + chr(0b101101) + chr(0b10010 + 0o46)), subset=VCD2TmzNQmSq).applymap(lambda LCrwg7lcbmU9: roI3spqORKae(ES5oEprVxulp(b'A\xf2l\xf9E\xf5 \xa6\x12\x1e\xedr\xbdKF]'), '\144' + chr(0b11 + 0o142) + chr(3496 - 3397) + '\157' + '\x64' + chr(0b1100101))(chr(117) + chr(0b1110100) + chr(0b1100110) + chr(0b10000 + 0o35) + chr(0b101101 + 0o13)), subset=TtrW9LyPZmdO) for Cn6yf2gY02SW in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'A\xf2p\xe0\t\xf61\xaa\x07\x05'), chr(0b1000010 + 0o42) + '\x65' + chr(0b1100011) + chr(5293 - 5182) + '\144' + '\x65')(chr(10358 - 10241) + chr(0b1110 + 0o146) + chr(0b1100110) + chr(45) + '\x38')): pOe_UOsGsV6s = Cn6yf2gY02SW.apply(pOe_UOsGsV6s) return pOe_UOsGsV6s
HHammond/PrettyPandas
prettypandas/summarizer.py
PrettyPandas.summary
def summary(self, func=methodcaller('sum'), title='Total', axis=0, subset=None, *args, **kwargs): """Add multiple summary rows or columns to the dataframe. Parameters ---------- :param func: function to be used for a summary. :param titles: Title for this summary column. :param axis: Same as numpy and pandas axis argument. A value of None will cause the summary to be applied to both rows and columns. :param args: Positional arguments passed to all the functions. :param kwargs: Keyword arguments passed to all the functions. The results of summary can be chained together. """ if axis is None: return ( self .summary( func=func, title=title, axis=0, subset=subset, *args, **kwargs ) .summary( func=func, title=title, axis=1, subset=subset, *args, **kwargs ) ) else: agg = Aggregate(title, func, subset=subset, axis=axis, *args, **kwargs) return self._add_summary(agg)
python
def summary(self, func=methodcaller('sum'), title='Total', axis=0, subset=None, *args, **kwargs): """Add multiple summary rows or columns to the dataframe. Parameters ---------- :param func: function to be used for a summary. :param titles: Title for this summary column. :param axis: Same as numpy and pandas axis argument. A value of None will cause the summary to be applied to both rows and columns. :param args: Positional arguments passed to all the functions. :param kwargs: Keyword arguments passed to all the functions. The results of summary can be chained together. """ if axis is None: return ( self .summary( func=func, title=title, axis=0, subset=subset, *args, **kwargs ) .summary( func=func, title=title, axis=1, subset=subset, *args, **kwargs ) ) else: agg = Aggregate(title, func, subset=subset, axis=axis, *args, **kwargs) return self._add_summary(agg)
[ "def", "summary", "(", "self", ",", "func", "=", "methodcaller", "(", "'sum'", ")", ",", "title", "=", "'Total'", ",", "axis", "=", "0", ",", "subset", "=", "None", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "axis", "is", "None", ...
Add multiple summary rows or columns to the dataframe. Parameters ---------- :param func: function to be used for a summary. :param titles: Title for this summary column. :param axis: Same as numpy and pandas axis argument. A value of None will cause the summary to be applied to both rows and columns. :param args: Positional arguments passed to all the functions. :param kwargs: Keyword arguments passed to all the functions. The results of summary can be chained together.
[ "Add", "multiple", "summary", "rows", "or", "columns", "to", "the", "dataframe", "." ]
99a814ffc3aa61f66eaf902afaa4b7802518d33a
https://github.com/HHammond/PrettyPandas/blob/99a814ffc3aa61f66eaf902afaa4b7802518d33a/prettypandas/summarizer.py#L240-L285
train
Adds multiple summary rows or columns to the dataframe.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU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ttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(830 - 781) + chr(52) + chr(49), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + chr(0b101011 + 0o14) + chr(50), 0o10), nzTpIcepk0o8(chr(426 - 378) + '\x6f' + '\x37', 0b1000), nzTpIcepk0o8(chr(1776 - 1728) + chr(0b1101111) + chr(50) + chr(0b110101) + '\x32', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + '\063' + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b0 + 0o60) + '\157' + chr(0b110010) + chr(0b100000 + 0o27) + chr(0b101000 + 0o10), 0o10), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(111) + '\x33' + chr(1908 - 1855) + chr(0b110001), 34180 - 34172), nzTpIcepk0o8(chr(1011 - 963) + chr(0b1000100 + 0o53) + '\x33' + chr(452 - 404) + '\x31', 0o10), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(2410 - 2299) + '\061' + '\x36' + chr(0b101 + 0o54), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(265 - 213) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(11035 - 10924) + chr(0b110001) + chr(823 - 768) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(467 - 419) + chr(0b1101111) + chr(52), 0b1000), nzTpIcepk0o8(chr(0b1110 + 0o42) + '\x6f' + chr(0b110010) + chr(0b100011 + 0o21) + chr(0b101000 + 0o10), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + chr(51) + '\060', 46168 - 46160), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\157' + chr(0b10000 + 0o41) + chr(1701 - 1647) + chr(53), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(1723 - 1673) + chr(51) + chr(0b1000 + 0o50), 8), nzTpIcepk0o8('\060' + '\157' + '\x31' + '\067' + chr(2293 - 2239), 8), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001) + chr(50) + '\064', ord("\x08")), nzTpIcepk0o8(chr(972 - 924) + '\157' + chr(52) + '\x34', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + '\067' + chr(2418 - 2366), 11304 - 11296), nzTpIcepk0o8(chr(0b110000) + chr(0b1101001 + 0o6) + chr(1609 - 1560) + chr(0b110101) + chr(0b100000 + 0o23), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110000 + 0o3) + chr(52) + '\x36', 11905 - 11897), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(4072 - 3961) + '\x34' + chr(53), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2029 - 1978) + chr(52) + chr(55), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b110010 + 0o75) + chr(0b110010) + chr(0b110100), 0b1000), nzTpIcepk0o8('\x30' + chr(0b110001 + 0o76) + chr(49) + chr(0b110001) + '\x31', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\x31' + chr(0b110000) + chr(0b11100 + 0o24), 3399 - 3391), nzTpIcepk0o8(chr(0b101111 + 0o1) + '\x6f' + chr(368 - 318), ord("\x08")), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(111) + chr(50) + chr(244 - 194) + chr(972 - 922), 41234 - 41226), nzTpIcepk0o8(chr(0b110000) + chr(0b10110 + 0o131) + '\063' + chr(0b110101) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010 + 0o4) + chr(0b100000 + 0o22), ord("\x08")), nzTpIcepk0o8(chr(427 - 379) + chr(0b1100010 + 0o15) + chr(0b110011) + '\061' + chr(0b1000 + 0o56), 10783 - 10775), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(111) + chr(2338 - 2288) + '\x32' + '\065', 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\067' + chr(55), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1010000 + 0o37) + chr(0b110011) + chr(1765 - 1710) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(2060 - 2012) + chr(0b1101111) + chr(0b110011) + chr(0b110110) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1691 - 1641) + chr(0b110010) + chr(0b110110), 55544 - 55536), nzTpIcepk0o8(chr(208 - 160) + chr(0b1101111) + chr(49) + chr(0b100001 + 0o25) + chr(2146 - 2092), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(4660 - 4549) + chr(49) + chr(0b110000) + chr(1370 - 1320), 34082 - 34074), nzTpIcepk0o8('\060' + chr(0b1100010 + 0o15) + chr(0b100011 + 0o20) + '\064' + chr(0b100111 + 0o13), 31965 - 31957)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(5896 - 5785) + chr(0b10011 + 0o42) + chr(1101 - 1053), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'O'), '\144' + '\145' + '\x63' + chr(1811 - 1700) + chr(100) + '\145')(chr(117) + '\164' + '\x66' + chr(0b101101) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def QEXp0HPqz7Se(hXMPsSrOQzbh, h0klhChk4Vv6=sUrokxTNBmNA(roI3spqORKae(ES5oEprVxulp(b'\x12\x0fj'), chr(0b11011 + 0o111) + '\x65' + chr(99) + chr(0b1101111) + chr(2100 - 2000) + '\145')('\165' + '\x74' + '\x66' + chr(898 - 853) + chr(2534 - 2478))), OO0tRW9aj_xh=roI3spqORKae(ES5oEprVxulp(b'5\x15s\xcb2'), chr(0b1010 + 0o132) + '\x65' + chr(0b1100011) + '\157' + chr(0b1100010 + 0o2) + '\145')(chr(5223 - 5106) + chr(0b1110100) + chr(0b100101 + 0o101) + chr(2011 - 1966) + chr(56)), JD902pvyCLH1=nzTpIcepk0o8('\060' + chr(0b110101 + 0o72) + chr(1442 - 1394), 0o10), kw37P8hgNdNY=None, *eemPYp2vtTSr, **q5n0sHDDTy90): if JD902pvyCLH1 is None: return roI3spqORKae(hXMPsSrOQzbh.summary(*eemPYp2vtTSr, func=h0klhChk4Vv6, title=OO0tRW9aj_xh, axis=nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110000), 8), subset=kw37P8hgNdNY, **q5n0sHDDTy90), roI3spqORKae(ES5oEprVxulp(b'0?_\xdan\xf0\xb9\xb0\x0b\x15-a'), '\144' + '\145' + chr(2041 - 1942) + chr(111) + chr(100) + chr(101))(chr(0b1010011 + 0o42) + chr(0b1110100) + chr(3251 - 3149) + chr(155 - 110) + chr(0b101 + 0o63)))(*eemPYp2vtTSr, func=h0klhChk4Vv6, title=OO0tRW9aj_xh, axis=nzTpIcepk0o8(chr(1314 - 1266) + '\157' + chr(0b1100 + 0o45), ord("\x08")), subset=kw37P8hgNdNY, **q5n0sHDDTy90) else: KjmsF1_kSrCG = tn9GjrVo18UX(OO0tRW9aj_xh, h0klhChk4Vv6, *eemPYp2vtTSr, subset=kw37P8hgNdNY, axis=JD902pvyCLH1, **q5n0sHDDTy90) return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'>\x1bc\xce\x01\xcb\x9c\xac\x1cC\x0c}'), chr(100) + chr(101) + '\x63' + '\x6f' + '\x64' + chr(3469 - 3368))('\165' + chr(0b1110100) + '\x66' + chr(0b101101) + chr(886 - 830)))(KjmsF1_kSrCG)
HHammond/PrettyPandas
prettypandas/summarizer.py
PrettyPandas.as_percent
def as_percent(self, precision=2, *args, **kwargs): """Format subset as percentages :param precision: Decimal precision :param subset: Pandas subset """ f = Formatter(as_percent(precision), args, kwargs) return self._add_formatter(f)
python
def as_percent(self, precision=2, *args, **kwargs): """Format subset as percentages :param precision: Decimal precision :param subset: Pandas subset """ f = Formatter(as_percent(precision), args, kwargs) return self._add_formatter(f)
[ "def", "as_percent", "(", "self", ",", "precision", "=", "2", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "f", "=", "Formatter", "(", "as_percent", "(", "precision", ")", ",", "args", ",", "kwargs", ")", "return", "self", ".", "_add_formatte...
Format subset as percentages :param precision: Decimal precision :param subset: Pandas subset
[ "Format", "subset", "as", "percentages" ]
99a814ffc3aa61f66eaf902afaa4b7802518d33a
https://github.com/HHammond/PrettyPandas/blob/99a814ffc3aa61f66eaf902afaa4b7802518d33a/prettypandas/summarizer.py#L335-L342
train
Format the subset as percentages.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZR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oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + chr(0b110111) + '\067', 0o10), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(0b1101111) + chr(0b10 + 0o60) + chr(53) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(77 - 29) + chr(0b1101111) + '\065' + chr(0b110011), 27642 - 27634), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\062' + chr(0b110011) + '\x34', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1000 + 0o147) + '\x32' + '\x34' + chr(53), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\063' + '\064' + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x32' + chr(2208 - 2158), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x34' + chr(48), 0b1000), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b1101111) + chr(0b110001 + 0o6) + '\x34', 0b1000), nzTpIcepk0o8(chr(0b10110 + 0o32) + '\157' + chr(0b110001) + chr(49) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(1258 - 1210) + chr(0b101111 + 0o100) + chr(53) + chr(1978 - 1930), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\060' + chr(12166 - 12055) + '\061' + '\x36' + chr(514 - 464), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b111111 + 0o60) + '\062' + chr(0b10010 + 0o36) + chr(0b110000 + 0o5), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\062' + '\062' + chr(0b10010 + 0o36), 0o10), nzTpIcepk0o8('\x30' + chr(0b101001 + 0o106) + chr(0b110101) + chr(1422 - 1370), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001) + chr(0b100 + 0o63) + chr(573 - 520), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(244 - 194) + '\x37' + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b1101 + 0o43) + '\x6f' + chr(49) + '\x36' + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(6540 - 6429) + '\063' + chr(253 - 201) + chr(0b11100 + 0o33), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31' + chr(0b110011) + '\061', 0o10), nzTpIcepk0o8(chr(0b101100 + 0o4) + '\x6f' + chr(0b110001) + chr(481 - 433) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(3133 - 3022) + chr(49) + chr(55), ord("\x08")), nzTpIcepk0o8('\060' + chr(1719 - 1608) + chr(1039 - 990) + chr(1440 - 1392) + chr(0b11110 + 0o27), 0o10), nzTpIcepk0o8(chr(223 - 175) + chr(0b1101111) + '\x32' + chr(0b110100) + '\x37', 0b1000), nzTpIcepk0o8(chr(48) + chr(12078 - 11967) + '\063' + chr(1987 - 1938) + chr(1843 - 1789), ord("\x08")), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1101111) + '\062' + chr(0b110101) + chr(2668 - 2616), 0o10), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(111) + '\063' + chr(0b110001) + chr(55), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(1197 - 1148) + chr(0b110011) + chr(0b0 + 0o62), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(51) + '\x32' + chr(172 - 122), 45449 - 45441), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110010) + chr(0b110011) + chr(1075 - 1021), 0o10), nzTpIcepk0o8(chr(2029 - 1981) + chr(111) + '\063' + chr(54) + chr(0b100001 + 0o26), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(11120 - 11009) + chr(0b1101 + 0o46) + chr(0b110101), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(666 - 617) + chr(806 - 758) + '\x33', 0b1000), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(0b1101111) + chr(49) + chr(1266 - 1217) + '\065', 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(210 - 158) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(0b110000) + chr(0b111 + 0o57), ord("\x08")), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(111) + '\x32' + chr(54) + '\064', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + '\x36' + '\064', ord("\x08")), nzTpIcepk0o8('\060' + chr(1775 - 1664) + '\x33' + chr(50) + chr(2095 - 2043), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(11306 - 11195) + chr(53) + '\060', 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'Q'), chr(0b111001 + 0o53) + chr(0b1011100 + 0o11) + chr(99) + '\x6f' + chr(0b1100100) + chr(0b1100101))('\x75' + chr(0b10100 + 0o140) + chr(0b111000 + 0o56) + chr(45) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def caljZM__ZeGN(hXMPsSrOQzbh, nx86o4xB5DE7=nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(1771 - 1660) + chr(50), 0b1000), *eemPYp2vtTSr, **q5n0sHDDTy90): _R8IKF5IwAfX = PyeDDkvygOuz(caljZM__ZeGN(nx86o4xB5DE7), eemPYp2vtTSr, q5n0sHDDTy90) return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b' \xccO\xf8\xfa\x83}RQ,\\e\x17\xf7'), '\x64' + chr(0b110010 + 0o63) + chr(0b1100011) + chr(11201 - 11090) + '\144' + chr(101))(chr(0b1001 + 0o154) + chr(0b101111 + 0o105) + chr(0b1100110) + '\x2d' + chr(56)))(_R8IKF5IwAfX)
HHammond/PrettyPandas
prettypandas/summarizer.py
PrettyPandas.as_currency
def as_currency(self, currency='USD', locale=LOCALE_OBJ, *args, **kwargs): """Format subset as currency :param currency: Currency :param locale: Babel locale for currency formatting :param subset: Pandas subset """ f = Formatter( as_currency(currency=currency, locale=locale), args, kwargs ) return self._add_formatter(f)
python
def as_currency(self, currency='USD', locale=LOCALE_OBJ, *args, **kwargs): """Format subset as currency :param currency: Currency :param locale: Babel locale for currency formatting :param subset: Pandas subset """ f = Formatter( as_currency(currency=currency, locale=locale), args, kwargs ) return self._add_formatter(f)
[ "def", "as_currency", "(", "self", ",", "currency", "=", "'USD'", ",", "locale", "=", "LOCALE_OBJ", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "f", "=", "Formatter", "(", "as_currency", "(", "currency", "=", "currency", ",", "locale", "=", ...
Format subset as currency :param currency: Currency :param locale: Babel locale for currency formatting :param subset: Pandas subset
[ "Format", "subset", "as", "currency" ]
99a814ffc3aa61f66eaf902afaa4b7802518d33a
https://github.com/HHammond/PrettyPandas/blob/99a814ffc3aa61f66eaf902afaa4b7802518d33a/prettypandas/summarizer.py#L344-L356
train
Format subset as currency
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT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,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + chr(48), 0b1000), nzTpIcepk0o8(chr(48) + chr(9905 - 9794) + '\x31' + '\x33' + '\x35', 15720 - 15712), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b11101 + 0o24) + chr(0b110110) + '\064', 0b1000), nzTpIcepk0o8(chr(48) + chr(4207 - 4096) + '\x31' + '\x36' + chr(48), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b11011 + 0o26) + chr(1300 - 1250) + chr(0b1010 + 0o52), 45102 - 45094), nzTpIcepk0o8('\060' + '\157' + chr(54) + chr(1798 - 1745), 0b1000), nzTpIcepk0o8('\060' + chr(2815 - 2704) + chr(707 - 658) + '\x36' + '\065', 0o10), nzTpIcepk0o8(chr(2094 - 2046) + chr(0b100111 + 0o110) + chr(2484 - 2434) + '\067' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(2130 - 2082) + chr(8701 - 8590) + chr(2346 - 2296) + '\x36' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1001000 + 0o47) + chr(52) + chr(0b101101 + 0o10), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(2262 - 2209) + '\x34', 51065 - 51057), nzTpIcepk0o8(chr(2058 - 2010) + chr(0b1101111) + chr(0b110011) + '\x36' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b11110 + 0o22) + '\157' + chr(1253 - 1202) + '\065' + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(0b110000 + 0o0) + '\157' + chr(1468 - 1419) + chr(0b110100) + '\063', 0b1000), nzTpIcepk0o8('\060' + chr(0b1001 + 0o146) + chr(0b100 + 0o61) + chr(50), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\x32' + chr(0b110001) + chr(1726 - 1675), 0o10), nzTpIcepk0o8('\060' + chr(0b1101011 + 0o4) + chr(0b110010) + chr(0b110010 + 0o1) + '\063', ord("\x08")), nzTpIcepk0o8(chr(136 - 88) + '\157' + chr(50) + '\067' + chr(53), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1073 - 1022) + '\x33', 42682 - 42674), nzTpIcepk0o8('\x30' + chr(0b1011101 + 0o22) + chr(49) + chr(53) + chr(2075 - 2027), 2342 - 2334), nzTpIcepk0o8('\x30' + chr(0b1101000 + 0o7) + chr(0b110010) + '\x31' + chr(1317 - 1268), 21512 - 21504), nzTpIcepk0o8('\060' + chr(0b1011011 + 0o24) + chr(50) + chr(879 - 825) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b1001011 + 0o44) + chr(1301 - 1252) + '\x36' + '\063', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b100011 + 0o17) + '\x31' + '\x37', 0o10), nzTpIcepk0o8('\x30' + chr(0b10111 + 0o130) + chr(49) + '\x33' + chr(0b11110 + 0o25), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b100010 + 0o21) + '\x30' + '\x30', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(2638 - 2527) + chr(0b110001) + chr(0b10000 + 0o46) + chr(48), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1242 - 1191) + chr(48) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(111) + chr(49) + chr(49) + '\066', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(1264 - 1213) + chr(51) + chr(51), 45126 - 45118), nzTpIcepk0o8('\x30' + '\157' + '\064' + chr(0b10101 + 0o34), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1010110 + 0o31) + chr(0b1101 + 0o44) + chr(0b11010 + 0o30) + '\067', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1972 - 1919), 32959 - 32951), nzTpIcepk0o8('\x30' + '\x6f' + chr(49) + chr(0b10011 + 0o41) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b110 + 0o52) + '\157' + '\061' + chr(0b1011 + 0o47) + chr(1440 - 1390), 0b1000), nzTpIcepk0o8(chr(869 - 821) + '\x6f' + chr(0b110011) + '\x37' + chr(915 - 863), 1935 - 1927), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + '\064' + chr(215 - 161), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + '\067' + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b1001 + 0o53) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(48) + chr(0b100000 + 0o117) + chr(0b1101 + 0o44) + '\x35', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(643 - 590) + chr(0b110000), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'6'), chr(0b1100100) + chr(101) + chr(99) + chr(111) + chr(0b1000110 + 0o36) + '\x65')(chr(1908 - 1791) + '\x74' + '\146' + '\x2d' + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def nm2hMEWVgHAU(hXMPsSrOQzbh, zRxh0_30Fcyp=roI3spqORKae(ES5oEprVxulp(b'M\x0e0'), chr(0b1100100) + chr(0b1100101) + chr(4512 - 4413) + chr(111) + '\144' + chr(0b1011001 + 0o14))(chr(5761 - 5644) + '\164' + chr(102) + chr(0b101010 + 0o3) + '\x38'), MIRLOzmYqiJ8=CBw8GA6Bxeaz, *eemPYp2vtTSr, **q5n0sHDDTy90): _R8IKF5IwAfX = PyeDDkvygOuz(nm2hMEWVgHAU(currency=zRxh0_30Fcyp, locale=MIRLOzmYqiJ8), eemPYp2vtTSr, q5n0sHDDTy90) return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'G<\x10\x14\x0bS\x1a\xc8\xddDX\x87\x8f\x11'), chr(100) + chr(0b1001101 + 0o30) + '\x63' + '\x6f' + '\144' + chr(4884 - 4783))(chr(7908 - 7791) + chr(0b1001111 + 0o45) + '\146' + '\x2d' + '\x38'))(_R8IKF5IwAfX)
HHammond/PrettyPandas
prettypandas/summarizer.py
PrettyPandas.as_unit
def as_unit(self, unit, location='suffix', *args, **kwargs): """Format subset as with units :param unit: string to use as unit :param location: prefix or suffix :param subset: Pandas subset """ f = Formatter( as_unit(unit, location=location), args, kwargs ) return self._add_formatter(f)
python
def as_unit(self, unit, location='suffix', *args, **kwargs): """Format subset as with units :param unit: string to use as unit :param location: prefix or suffix :param subset: Pandas subset """ f = Formatter( as_unit(unit, location=location), args, kwargs ) return self._add_formatter(f)
[ "def", "as_unit", "(", "self", ",", "unit", ",", "location", "=", "'suffix'", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "f", "=", "Formatter", "(", "as_unit", "(", "unit", ",", "location", "=", "location", ")", ",", "args", ",", "kwargs"...
Format subset as with units :param unit: string to use as unit :param location: prefix or suffix :param subset: Pandas subset
[ "Format", "subset", "as", "with", "units" ]
99a814ffc3aa61f66eaf902afaa4b7802518d33a
https://github.com/HHammond/PrettyPandas/blob/99a814ffc3aa61f66eaf902afaa4b7802518d33a/prettypandas/summarizer.py#L358-L370
train
Format subset as with units
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,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vi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + '\065' + '\x31', 0b1000), nzTpIcepk0o8('\x30' + chr(0b111010 + 0o65) + chr(0b111 + 0o52) + chr(569 - 514) + '\061', 45083 - 45075), nzTpIcepk0o8(chr(48) + chr(7130 - 7019) + '\061' + chr(0b11101 + 0o27) + '\x30', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x37' + '\067', 0o10), nzTpIcepk0o8('\060' + chr(0b10010 + 0o135) + '\x32' + chr(53) + chr(0b1001 + 0o54), 0o10), nzTpIcepk0o8(chr(1629 - 1581) + chr(0b1100001 + 0o16) + chr(2315 - 2264) + chr(52) + '\x36', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + chr(53) + chr(1208 - 1155), 0b1000), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\157' + chr(0b101110 + 0o4) + '\x35' + '\x30', ord("\x08")), nzTpIcepk0o8(chr(105 - 57) + chr(0b1010000 + 0o37) + chr(0b10 + 0o61) + chr(681 - 632) + chr(0b101111 + 0o5), 22371 - 22363), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110011) + '\x37' + '\x34', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b101010 + 0o15), 15363 - 15355), nzTpIcepk0o8(chr(517 - 469) + chr(0b1101111) + chr(0b1110 + 0o43) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(5145 - 5034) + '\063' + '\x36' + chr(54), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101011 + 0o4) + chr(51) + '\x33' + chr(0b110111), 58534 - 58526), nzTpIcepk0o8('\x30' + chr(0b1001101 + 0o42) + '\x31' + chr(51) + chr(0b1001 + 0o55), ord("\x08")), nzTpIcepk0o8(chr(406 - 358) + chr(111) + chr(0b110001) + chr(53) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b11111 + 0o21) + '\157' + chr(49) + chr(142 - 93) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(0b1101111) + '\x34' + chr(55), 0b1000), nzTpIcepk0o8('\x30' + chr(0b110011 + 0o74) + chr(1019 - 970) + chr(0b11010 + 0o30) + '\062', 5013 - 5005), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(7112 - 7001) + chr(0b110 + 0o55) + chr(0b110111) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(1331 - 1283) + '\x6f' + chr(0b110001) + chr(52) + '\061', 0o10), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(0b1101111) + chr(0b110001) + '\x30' + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(855 - 807) + chr(111) + '\x33' + chr(0b110100) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(2081 - 2033) + chr(5444 - 5333) + chr(0b110011 + 0o0) + chr(54) + '\067', ord("\x08")), nzTpIcepk0o8(chr(1970 - 1922) + chr(1852 - 1741) + chr(0b110011) + '\062' + chr(0b1001 + 0o51), 0o10), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(111) + chr(0b100110 + 0o15) + '\063' + '\x30', 0b1000), nzTpIcepk0o8(chr(1578 - 1530) + '\157' + '\x31' + chr(54) + chr(51), 5705 - 5697), nzTpIcepk0o8('\060' + '\157' + '\x31' + chr(0b110001) + '\063', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b1 + 0o62) + chr(54), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1110 + 0o141) + '\061' + chr(50) + chr(49), 0b1000), nzTpIcepk0o8(chr(1083 - 1035) + chr(9190 - 9079) + chr(1850 - 1799) + '\066' + chr(0b110100 + 0o1), 2306 - 2298), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b1 + 0o156) + chr(0b110010) + chr(2385 - 2335) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1011001 + 0o26) + chr(932 - 883) + chr(865 - 816) + '\064', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1547 - 1496) + chr(2099 - 2050) + '\065', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1011011 + 0o24) + chr(0b110011) + '\x37' + chr(0b101 + 0o56), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x33' + chr(633 - 580) + chr(1038 - 989), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(49) + chr(0b110100), 6352 - 6344), nzTpIcepk0o8('\x30' + chr(111) + chr(229 - 179) + '\063', 25102 - 25094), nzTpIcepk0o8(chr(2262 - 2214) + '\x6f' + '\063' + '\x32' + chr(335 - 286), ord("\x08")), nzTpIcepk0o8(chr(0b10011 + 0o35) + '\x6f' + chr(0b110111) + chr(0b110000), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1100 + 0o143) + chr(53) + '\060', 2602 - 2594)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'G'), chr(100) + chr(101) + chr(1525 - 1426) + chr(8332 - 8221) + chr(0b1100100) + chr(101))(chr(0b100001 + 0o124) + '\164' + '\x66' + chr(45) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Ns7AhuVrYR68(hXMPsSrOQzbh, FMmD16A2grCG, y87dwGy_Qoj4=roI3spqORKae(ES5oEprVxulp(b'\x1a\x0c\x06Y\xc4\x9e'), chr(0b1100100) + '\145' + '\143' + '\157' + chr(100) + '\145')('\x75' + '\x74' + '\x66' + '\x2d' + chr(506 - 450)), *eemPYp2vtTSr, **q5n0sHDDTy90): _R8IKF5IwAfX = PyeDDkvygOuz(Ns7AhuVrYR68(FMmD16A2grCG, location=y87dwGy_Qoj4), eemPYp2vtTSr, q5n0sHDDTy90) return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'6\x18\x04[\xf2\x80\x02\xda\xa1\x9ds|\x93\xad'), '\x64' + chr(101) + chr(0b1100011) + chr(12255 - 12144) + chr(0b100111 + 0o75) + chr(2682 - 2581))(chr(315 - 198) + chr(0b10110 + 0o136) + chr(102) + '\x2d' + '\x38'))(_R8IKF5IwAfX)
TUT-ARG/sed_eval
sed_eval/sound_event.py
SoundEventMetrics.result_report_overall
def result_report_overall(self): """Report overall results Returns ------- str result report in string format """ results = self.results_overall_metrics() output = self.ui.section_header('Overall metrics (micro-average)', indent=2) + '\n' if results['f_measure']: output += self.ui.line('F-measure', indent=2) + '\n' output += self.ui.data(field='F-measure (F1)', value=float(results['f_measure']['f_measure']) * 100, unit='%', indent=4) + '\n' output += self.ui.data(field='Precision', value=float(results['f_measure']['precision']) * 100, unit='%', indent=4) + '\n' output += self.ui.data(field='Recall', value=float(results['f_measure']['recall']) * 100, unit='%', indent=4) + '\n' if results['error_rate']: output += self.ui.line('Error rate', indent=2) + '\n' output += self.ui.data(field='Error rate (ER)', value=float(results['error_rate']['error_rate']), indent=4) + '\n' output += self.ui.data(field='Substitution rate', value=float(results['error_rate']['substitution_rate']), indent=4) + '\n' output += self.ui.data(field='Deletion rate', value=float(results['error_rate']['deletion_rate']), indent=4) + '\n' output += self.ui.data(field='Insertion rate', value=float(results['error_rate']['insertion_rate']), indent=4) + '\n' if results['accuracy']: output += self.ui.line('Accuracy', indent=2) + '\n' output += self.ui.data(field='Sensitivity', value=float(results['accuracy']['sensitivity']*100), unit='%', indent=4) + '\n' output += self.ui.data(field='Specificity', value=float(results['accuracy']['specificity'] * 100), unit='%', indent=4) + '\n' output += self.ui.data(field='Balanced accuracy', value=float(results['accuracy']['balanced_accuracy'] * 100), unit='%', indent=4) + '\n' output += self.ui.data(field='Accuracy', value=float(results['accuracy']['accuracy'] * 100), unit='%', indent=4) + '\n' return output
python
def result_report_overall(self): """Report overall results Returns ------- str result report in string format """ results = self.results_overall_metrics() output = self.ui.section_header('Overall metrics (micro-average)', indent=2) + '\n' if results['f_measure']: output += self.ui.line('F-measure', indent=2) + '\n' output += self.ui.data(field='F-measure (F1)', value=float(results['f_measure']['f_measure']) * 100, unit='%', indent=4) + '\n' output += self.ui.data(field='Precision', value=float(results['f_measure']['precision']) * 100, unit='%', indent=4) + '\n' output += self.ui.data(field='Recall', value=float(results['f_measure']['recall']) * 100, unit='%', indent=4) + '\n' if results['error_rate']: output += self.ui.line('Error rate', indent=2) + '\n' output += self.ui.data(field='Error rate (ER)', value=float(results['error_rate']['error_rate']), indent=4) + '\n' output += self.ui.data(field='Substitution rate', value=float(results['error_rate']['substitution_rate']), indent=4) + '\n' output += self.ui.data(field='Deletion rate', value=float(results['error_rate']['deletion_rate']), indent=4) + '\n' output += self.ui.data(field='Insertion rate', value=float(results['error_rate']['insertion_rate']), indent=4) + '\n' if results['accuracy']: output += self.ui.line('Accuracy', indent=2) + '\n' output += self.ui.data(field='Sensitivity', value=float(results['accuracy']['sensitivity']*100), unit='%', indent=4) + '\n' output += self.ui.data(field='Specificity', value=float(results['accuracy']['specificity'] * 100), unit='%', indent=4) + '\n' output += self.ui.data(field='Balanced accuracy', value=float(results['accuracy']['balanced_accuracy'] * 100), unit='%', indent=4) + '\n' output += self.ui.data(field='Accuracy', value=float(results['accuracy']['accuracy'] * 100), unit='%', indent=4) + '\n' return output
[ "def", "result_report_overall", "(", "self", ")", ":", "results", "=", "self", ".", "results_overall_metrics", "(", ")", "output", "=", "self", ".", "ui", ".", "section_header", "(", "'Overall metrics (micro-average)'", ",", "indent", "=", "2", ")", "+", "'\\n...
Report overall results Returns ------- str result report in string format
[ "Report", "overall", "results" ]
0cb1b6d11ceec4fe500cc9b31079c9d8666ed6eb
https://github.com/TUT-ARG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JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(2143 - 2095) + '\157' + chr(51) + chr(0b110111) + chr(0b11100 + 0o33), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\066' + chr(0b110110), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1100000 + 0o17) + chr(0b1100 + 0o52) + '\063', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1010110 + 0o31) + chr(0b110011) + chr(1046 - 998) + chr(1177 - 1126), 0b1000), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b1010001 + 0o36) + chr(1003 - 952) + chr(1163 - 1112), 0b1000), nzTpIcepk0o8('\060' + chr(7517 - 7406) + chr(49) + '\x30', 7445 - 7437), nzTpIcepk0o8(chr(1057 - 1009) + '\x6f' + chr(0b110001) + chr(0b110100) + '\064', 33683 - 33675), nzTpIcepk0o8('\060' + '\x6f' + '\063' + '\062' + chr(2106 - 2055), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(5923 - 5812) + '\x34' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + chr(0b110100) + '\060', ord("\x08")), nzTpIcepk0o8(chr(2052 - 2004) + chr(0b1101111) + chr(53) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(1717 - 1667) + '\063' + '\x34', 0b1000), nzTpIcepk0o8('\x30' + chr(11885 - 11774) + chr(51) + chr(0b110011) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b1101111) + chr(0b110110) + chr(0b10110 + 0o34), 29630 - 29622), nzTpIcepk0o8('\060' + chr(0b101001 + 0o106) + '\x32' + '\061' + chr(0b110011 + 0o1), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + chr(52) + chr(1680 - 1625), 11460 - 11452), nzTpIcepk0o8('\x30' + '\x6f' + chr(50) + '\x34' + '\063', 0o10), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\157' + chr(0b101010 + 0o11) + chr(0b110110 + 0o1) + chr(0b110111), 8), nzTpIcepk0o8(chr(1918 - 1870) + '\x6f' + chr(1419 - 1368) + chr(720 - 669), 8), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(5487 - 5376) + chr(0b101011 + 0o6) + '\067' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b110110 + 0o71) + '\x31' + chr(51) + chr(294 - 245), 0b1000), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(111) + chr(0b110010) + chr(0b1100 + 0o44) + chr(49), 0b1000), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(111) + chr(50) + chr(0b1000 + 0o54) + '\061', 0b1000), nzTpIcepk0o8(chr(486 - 438) + chr(0b1101111) + '\063' + '\x30' + chr(53), 0b1000), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(111) + chr(1003 - 952) + chr(440 - 392) + chr(49), 43829 - 43821), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011) + chr(0b10011 + 0o42) + '\x33', 18712 - 18704), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b11100 + 0o30) + chr(49), ord("\x08")), nzTpIcepk0o8('\x30' + chr(9504 - 9393) + '\x32' + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b1011 + 0o45) + '\157' + '\x36' + chr(0b100000 + 0o22), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + chr(0b110100) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1011011 + 0o24) + chr(0b110010) + chr(940 - 892) + '\x36', 0o10), nzTpIcepk0o8('\x30' + chr(0b111110 + 0o61) + '\067' + chr(51), 53848 - 53840), nzTpIcepk0o8(chr(48) + chr(0b111111 + 0o60) + chr(955 - 901) + '\x31', 0o10), nzTpIcepk0o8('\x30' + chr(0b1001100 + 0o43) + '\x36' + chr(0b110101 + 0o2), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b11011 + 0o30) + '\x32' + chr(0b100 + 0o63), ord("\x08")), nzTpIcepk0o8(chr(1976 - 1928) + chr(111) + '\062' + chr(55), 0o10), nzTpIcepk0o8(chr(1925 - 1877) + '\x6f' + chr(0b100 + 0o57) + '\063' + '\064', 8), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1627 - 1573) + chr(1058 - 1008), 8), nzTpIcepk0o8('\x30' + chr(0b1011100 + 0o23) + chr(0b110001) + chr(0b110 + 0o52) + chr(0b110001), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1011001 + 0o26) + chr(53) + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xd1'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(100) + chr(5626 - 5525))(chr(4359 - 4242) + chr(116) + chr(102) + '\x2d' + chr(1477 - 1421)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def LNUp8qADvKPa(hXMPsSrOQzbh): v3B6eeO_B_ws = hXMPsSrOQzbh.results_overall_metrics() toKQXlEvBKaK = hXMPsSrOQzbh.ui.section_header(roI3spqORKae(ES5oEprVxulp(b'\xb0@gA\xa2wdD\xbeE\x94_\xf5\xbfA\xac\x8f\xce\x96x\x0b6\xac\xc0\xb3\xa4\x99@rW\x8b'), chr(0b1100100) + chr(8311 - 8210) + chr(99) + chr(111) + chr(5989 - 5889) + '\145')(chr(117) + '\x74' + chr(0b1100110) + chr(0b11000 + 0o25) + '\070'), indent=nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x32', 8)) + roI3spqORKae(ES5oEprVxulp(b'\xf5'), '\144' + '\x65' + '\x63' + '\x6f' + chr(9567 - 9467) + '\x65')(chr(117) + '\x74' + chr(102) + chr(1838 - 1793) + chr(0b101110 + 0o12)) if v3B6eeO_B_ws[roI3spqORKae(ES5oEprVxulp(b'\x99ioV\xa2h}\x16\xb6'), chr(0b1100100) + chr(3590 - 3489) + '\143' + chr(0b100011 + 0o114) + chr(0b1100100) + '\x65')(chr(263 - 146) + '\164' + '\146' + chr(0b101000 + 0o5) + '\070')]: toKQXlEvBKaK += hXMPsSrOQzbh.ui.ffiOpFBWGmZU(roI3spqORKae(ES5oEprVxulp(b'\xb9\x1boV\xa2h}\x16\xb6'), '\144' + chr(0b111011 + 0o52) + '\x63' + '\x6f' + chr(100) + '\145')('\165' + chr(0b1110100) + chr(102) + '\055' + chr(0b11011 + 0o35)), indent=nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x32', 8)) + roI3spqORKae(ES5oEprVxulp(b'\xf5'), chr(0b1100100) + chr(101) + chr(99) + chr(3770 - 3659) + chr(3824 - 3724) + '\145')('\x75' + '\164' + chr(102) + chr(45) + '\070') toKQXlEvBKaK += hXMPsSrOQzbh.ui.FfKOThdpoDTb(field=roI3spqORKae(ES5oEprVxulp(b'\xb9\x1boV\xa2h}\x16\xb6\x00\xc8k\xad\xf5'), '\x64' + chr(0b1100101) + '\x63' + chr(1277 - 1166) + '\144' + chr(7052 - 6951))('\x75' + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(1569 - 1513)), value=jLW6pRf2DSRk(v3B6eeO_B_ws[roI3spqORKae(ES5oEprVxulp(b'\x99ioV\xa2h}\x16\xb6'), chr(0b100 + 0o140) + chr(2479 - 2378) + chr(99) + '\x6f' + chr(0b1100100) + chr(7708 - 7607))(chr(0b1110101) + chr(2674 - 2558) + '\146' + chr(45) + chr(76 - 20))][roI3spqORKae(ES5oEprVxulp(b'\x99ioV\xa2h}\x16\xb6'), chr(100) + chr(7788 - 7687) + chr(0b1100011) + chr(111) + chr(100) + '\145')(chr(1804 - 1687) + chr(0b1110100) + chr(0b101100 + 0o72) + '\055' + chr(3032 - 2976))]) * nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(0b1101111) + '\x31' + '\064' + '\064', 8), unit=roI3spqORKae(ES5oEprVxulp(b'\xda'), '\x64' + '\x65' + '\x63' + chr(0b1101111) + '\x64' + chr(0b1010111 + 0o16))(chr(0b1110101) + chr(116) + chr(8353 - 8251) + chr(0b101101) + chr(1725 - 1669)), indent=nzTpIcepk0o8('\x30' + chr(111) + chr(52), 0b1000)) + roI3spqORKae(ES5oEprVxulp(b'\xf5'), chr(0b101000 + 0o74) + chr(0b1100101) + '\143' + chr(4264 - 4153) + '\144' + chr(0b111100 + 0o51))(chr(10713 - 10596) + chr(0b1110100) + '\x66' + chr(0b100 + 0o51) + chr(1707 - 1651)) toKQXlEvBKaK += hXMPsSrOQzbh.ui.FfKOThdpoDTb(field=roI3spqORKae(ES5oEprVxulp(b'\xafDgP\xaaha\x0b\xbd'), '\x64' + '\x65' + chr(0b1100011) + chr(11057 - 10946) + chr(0b1011011 + 0o11) + chr(0b101110 + 0o67))(chr(10532 - 10415) + chr(0b100010 + 0o122) + chr(0b10010 + 0o124) + chr(0b101101) + chr(310 - 254)), value=jLW6pRf2DSRk(v3B6eeO_B_ws[roI3spqORKae(ES5oEprVxulp(b'\x99ioV\xa2h}\x16\xb6'), '\x64' + chr(0b1001101 + 0o30) + chr(6430 - 6331) + chr(111) + '\144' + chr(0b100101 + 0o100))('\x75' + chr(0b1110100) + chr(102) + chr(1314 - 1269) + chr(1822 - 1766))][roI3spqORKae(ES5oEprVxulp(b'\x8fDgP\xaaha\x0b\xbd'), chr(0b1000110 + 0o36) + chr(0b1000 + 0o135) + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(0b1000011 + 0o42))(chr(117 - 0) + chr(116) + chr(0b10111 + 0o117) + chr(45) + chr(0b111000))]) * nzTpIcepk0o8(chr(48) + '\157' + '\x31' + chr(0b110100) + chr(52), 8), unit=roI3spqORKae(ES5oEprVxulp(b'\xda'), chr(0b11101 + 0o107) + chr(0b1100101 + 0o0) + '\143' + chr(10973 - 10862) + chr(100) + chr(0b1100101))(chr(0b1110101) + '\164' + chr(1618 - 1516) + '\x2d' + '\070'), indent=nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b1011010 + 0o25) + chr(1747 - 1695), 8)) + roI3spqORKae(ES5oEprVxulp(b'\xf5'), chr(100) + '\145' + chr(0b1100011) + chr(111) + '\144' + '\145')(chr(117) + chr(0b1010101 + 0o37) + chr(5350 - 5248) + '\055' + chr(56)) toKQXlEvBKaK += hXMPsSrOQzbh.ui.FfKOThdpoDTb(field=roI3spqORKae(ES5oEprVxulp(b'\xadSaR\xafw'), chr(0b1100100) + chr(7994 - 7893) + chr(8026 - 7927) + '\x6f' + chr(0b1100100) + '\x65')(chr(12750 - 12633) + '\x74' + chr(102) + chr(0b11000 + 0o25) + chr(2208 - 2152)), value=jLW6pRf2DSRk(v3B6eeO_B_ws[roI3spqORKae(ES5oEprVxulp(b'\x99ioV\xa2h}\x16\xb6'), chr(0b1011110 + 0o6) + chr(101) + chr(0b101110 + 0o65) + '\x6f' + '\144' + '\145')('\165' + '\x74' + chr(0b1100110) + chr(0b101101) + chr(0b111000))][roI3spqORKae(ES5oEprVxulp(b'\x8dSaR\xafw'), chr(100) + '\x65' + chr(99) + chr(0b1101111) + '\x64' + chr(9149 - 9048))('\x75' + chr(116) + chr(7176 - 7074) + chr(1148 - 1103) + chr(56))]) * nzTpIcepk0o8(chr(0b110000) + chr(0b1010000 + 0o37) + '\x31' + '\x34' + chr(0b101011 + 0o11), 8), unit=roI3spqORKae(ES5oEprVxulp(b'\xda'), chr(0b1100100) + chr(0b110001 + 0o64) + '\x63' + chr(111) + '\144' + '\145')(chr(0b1000010 + 0o63) + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + '\x38'), indent=nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b100111 + 0o15), 8)) + roI3spqORKae(ES5oEprVxulp(b'\xf5'), chr(100) + chr(0b1100101) + chr(9714 - 9615) + chr(0b1101111) + chr(6373 - 6273) + '\145')(chr(117) + '\164' + chr(102) + '\x2d' + chr(3092 - 3036)) if v3B6eeO_B_ws[roI3spqORKae(ES5oEprVxulp(b'\x9aDp\\\xb1Dz\x05\xa7E'), '\144' + chr(6913 - 6812) + chr(1106 - 1007) + chr(0b1011100 + 0o23) + chr(640 - 540) + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(0b1100110) + '\x2d' + chr(0b10101 + 0o43))]: toKQXlEvBKaK += hXMPsSrOQzbh.ui.ffiOpFBWGmZU(roI3spqORKae(ES5oEprVxulp(b'\xbaDp\\\xb1;z\x05\xa7E'), chr(6253 - 6153) + chr(0b1000101 + 0o40) + chr(0b11 + 0o140) + '\157' + chr(0b110011 + 0o61) + '\x65')(chr(117) + chr(116) + '\146' + chr(1318 - 1273) + '\070'), indent=nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(824 - 774), 8)) + roI3spqORKae(ES5oEprVxulp(b'\xf5'), chr(0b100001 + 0o103) + '\145' + chr(0b1010010 + 0o21) + '\157' + chr(0b100110 + 0o76) + chr(3944 - 3843))(chr(0b1110101) + chr(116) + chr(0b1100110) + '\x2d' + '\x38') toKQXlEvBKaK += hXMPsSrOQzbh.ui.FfKOThdpoDTb(field=roI3spqORKae(ES5oEprVxulp(b'\xbaDp\\\xb1;z\x05\xa7E\xc0\x05\xd9\x8e\x1b'), chr(100) + chr(0b1100000 + 0o5) + chr(0b1010101 + 0o16) + '\157' + chr(8063 - 7963) + chr(0b1100101))(chr(13587 - 13470) + chr(0b1110100) + '\x66' + chr(45) + chr(56)), value=jLW6pRf2DSRk(v3B6eeO_B_ws[roI3spqORKae(ES5oEprVxulp(b'\x9aDp\\\xb1Dz\x05\xa7E'), '\x64' + chr(6994 - 6893) + chr(5853 - 5754) + '\157' + chr(8627 - 8527) + '\145')('\165' + chr(116) + chr(9707 - 9605) + chr(45) + chr(2858 - 2802))][roI3spqORKae(ES5oEprVxulp(b'\x9aDp\\\xb1Dz\x05\xa7E'), chr(0b1001111 + 0o25) + '\x65' + chr(0b110111 + 0o54) + chr(6747 - 6636) + '\x64' + chr(101))(chr(5951 - 5834) + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + '\070')]), indent=nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(111) + chr(52), 8)) + roI3spqORKae(ES5oEprVxulp(b'\xf5'), chr(0b1100 + 0o130) + '\145' + chr(5156 - 5057) + chr(111) + chr(0b1011010 + 0o12) + chr(0b100010 + 0o103))(chr(0b1110101) + chr(7131 - 7015) + chr(102) + chr(0b101101) + chr(1868 - 1812)) toKQXlEvBKaK += hXMPsSrOQzbh.ui.FfKOThdpoDTb(field=roI3spqORKae(ES5oEprVxulp(b'\xacC`@\xb7r|\x11\xa7I\x8fC\xbc\xaeS\xf8\xc2'), chr(100) + '\145' + chr(0b1000011 + 0o40) + chr(111) + chr(6528 - 6428) + '\145')(chr(0b1110101) + chr(5508 - 5392) + '\146' + chr(0b101 + 0o50) + '\070'), value=jLW6pRf2DSRk(v3B6eeO_B_ws[roI3spqORKae(ES5oEprVxulp(b'\x9aDp\\\xb1Dz\x05\xa7E'), '\144' + '\x65' + chr(99) + '\157' + chr(5411 - 5311) + chr(0b1100101))('\165' + chr(0b1110100) + chr(102) + chr(1042 - 997) + chr(0b111000))][roI3spqORKae(ES5oEprVxulp(b'\x8cC`@\xb7r|\x11\xa7I\x8fC\xc3\xaeS\xf8\xc2'), '\144' + '\145' + chr(99) + chr(0b1101111) + chr(100) + '\145')(chr(0b1110101) + chr(116) + '\146' + chr(1964 - 1919) + '\070')]), indent=nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b1101111) + chr(0b100111 + 0o15), 8)) + roI3spqORKae(ES5oEprVxulp(b'\xf5'), chr(0b1101 + 0o127) + chr(0b111 + 0o136) + '\x63' + '\x6f' + chr(0b10 + 0o142) + chr(6084 - 5983))(chr(7388 - 7271) + chr(116) + chr(0b101011 + 0o73) + chr(373 - 328) + '\x38') toKQXlEvBKaK += hXMPsSrOQzbh.ui.FfKOThdpoDTb(field=roI3spqORKae(ES5oEprVxulp(b'\xbbSnV\xb7rg\n\xf3R\x81Y\xf9'), '\x64' + chr(8910 - 8809) + chr(0b1011000 + 0o13) + chr(111) + '\144' + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(45) + chr(56)), value=jLW6pRf2DSRk(v3B6eeO_B_ws[roI3spqORKae(ES5oEprVxulp(b'\x9aDp\\\xb1Dz\x05\xa7E'), '\x64' + chr(0b111100 + 0o51) + chr(99) + chr(111) + '\x64' + '\x65')('\165' + chr(116) + chr(0b110111 + 0o57) + chr(1813 - 1768) + chr(56))][roI3spqORKae(ES5oEprVxulp(b'\x9bSnV\xb7rg\n\x8cR\x81Y\xf9'), chr(100) + '\x65' + chr(0b1100011) + '\157' + '\x64' + chr(0b1100101))(chr(0b1010011 + 0o42) + '\x74' + chr(102) + '\x2d' + chr(56))]), indent=nzTpIcepk0o8('\060' + chr(0b11111 + 0o120) + chr(1832 - 1780), 8)) + roI3spqORKae(ES5oEprVxulp(b'\xf5'), chr(0b100010 + 0o102) + chr(101) + '\143' + '\x6f' + chr(0b1011001 + 0o13) + chr(0b1100001 + 0o4))(chr(0b1110101) + '\x74' + chr(102) + chr(0b101101) + '\x38') toKQXlEvBKaK += hXMPsSrOQzbh.ui.FfKOThdpoDTb(field=roI3spqORKae(ES5oEprVxulp(b'\xb6XqV\xb1oa\x0b\xbd\x00\x92L\xe8\xb9'), '\x64' + chr(101) + chr(3760 - 3661) + chr(111) + '\144' + chr(0b1100101))(chr(0b111111 + 0o66) + chr(116) + chr(2079 - 1977) + '\055' + chr(0b1010 + 0o56)), value=jLW6pRf2DSRk(v3B6eeO_B_ws[roI3spqORKae(ES5oEprVxulp(b'\x9aDp\\\xb1Dz\x05\xa7E'), chr(100) + '\x65' + chr(0b1100011 + 0o0) + chr(0b1101111) + chr(100) + chr(4540 - 4439))('\x75' + chr(0b1110100) + '\x66' + chr(1737 - 1692) + chr(0b100011 + 0o25))][roI3spqORKae(ES5oEprVxulp(b'\x96XqV\xb1oa\x0b\xbd\x7f\x92L\xe8\xb9'), chr(2119 - 2019) + chr(0b100100 + 0o101) + chr(7379 - 7280) + chr(0b1101111) + '\144' + chr(0b110000 + 0o65))('\x75' + chr(0b1110100) + chr(0b1011111 + 0o7) + '\055' + '\070')]), indent=nzTpIcepk0o8('\060' + '\x6f' + '\x34', 8)) + roI3spqORKae(ES5oEprVxulp(b'\xf5'), '\x64' + chr(0b111001 + 0o54) + chr(99) + '\x6f' + chr(0b1001 + 0o133) + '\x65')(chr(117) + chr(5073 - 4957) + '\146' + '\x2d' + chr(0b111000)) if v3B6eeO_B_ws[roI3spqORKae(ES5oEprVxulp(b'\x9eUaF\xb1zk\x1d'), '\144' + chr(4470 - 4369) + chr(99) + chr(8408 - 8297) + chr(100) + '\145')('\x75' + chr(8184 - 8068) + '\146' + '\055' + '\070')]: toKQXlEvBKaK += hXMPsSrOQzbh.ui.ffiOpFBWGmZU(roI3spqORKae(ES5oEprVxulp(b'\xbeUaF\xb1zk\x1d'), '\x64' + '\x65' + '\x63' + chr(0b1101111) + chr(100) + chr(1910 - 1809))('\165' + '\x74' + '\146' + '\x2d' + chr(0b1011 + 0o55)), indent=nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(111) + '\062', 8)) + roI3spqORKae(ES5oEprVxulp(b'\xf5'), chr(100) + '\x65' + '\143' + '\157' + '\x64' + chr(0b1000111 + 0o36))(chr(0b1110101) + '\164' + chr(0b1100110) + chr(0b1010 + 0o43) + '\070') toKQXlEvBKaK += hXMPsSrOQzbh.ui.FfKOThdpoDTb(field=roI3spqORKae(ES5oEprVxulp(b'\xacSl@\xaaoa\x12\xbaT\x99'), '\144' + '\x65' + '\143' + '\157' + '\x64' + '\145')(chr(117) + chr(0b1110100) + chr(0b1100110) + '\x2d' + '\070'), value=jLW6pRf2DSRk(v3B6eeO_B_ws[roI3spqORKae(ES5oEprVxulp(b'\x9eUaF\xb1zk\x1d'), chr(0b1100100) + chr(101) + chr(674 - 575) + '\157' + chr(100) + chr(0b1100101))(chr(0b1011001 + 0o34) + chr(0b10 + 0o162) + '\146' + chr(0b101101) + '\x38')][roI3spqORKae(ES5oEprVxulp(b'\x8cSl@\xaaoa\x12\xbaT\x99'), chr(2716 - 2616) + '\145' + chr(8302 - 8203) + chr(3811 - 3700) + '\x64' + chr(3751 - 3650))('\165' + chr(7391 - 7275) + '\x66' + chr(966 - 921) + chr(0b111000))] * nzTpIcepk0o8(chr(1610 - 1562) + chr(8439 - 8328) + chr(1857 - 1808) + chr(0b110100) + chr(52), 8)), unit=roI3spqORKae(ES5oEprVxulp(b'\xda'), chr(100) + chr(101) + '\x63' + chr(12188 - 12077) + chr(6058 - 5958) + chr(0b101100 + 0o71))('\165' + chr(4452 - 4336) + chr(102) + chr(45) + chr(1842 - 1786)), indent=nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(8592 - 8481) + chr(0b110100), 8)) + roI3spqORKae(ES5oEprVxulp(b'\xf5'), '\x64' + chr(101) + chr(0b1100011) + chr(111) + chr(8609 - 8509) + '\x65')(chr(1161 - 1044) + chr(0b110010 + 0o102) + chr(0b101110 + 0o70) + chr(45) + '\070') toKQXlEvBKaK += hXMPsSrOQzbh.ui.FfKOThdpoDTb(field=roI3spqORKae(ES5oEprVxulp(b'\xacFgP\xaa}a\x07\xbaT\x99'), chr(7688 - 7588) + chr(0b1100101) + chr(0b1100011) + chr(0b111110 + 0o61) + chr(0b1100100) + chr(0b100010 + 0o103))('\x75' + chr(0b1011010 + 0o32) + chr(0b1100110) + chr(0b1 + 0o54) + chr(0b111000)), value=jLW6pRf2DSRk(v3B6eeO_B_ws[roI3spqORKae(ES5oEprVxulp(b'\x9eUaF\xb1zk\x1d'), chr(6274 - 6174) + chr(101) + '\143' + chr(111) + chr(0b1100100) + '\x65')(chr(117) + chr(0b1110100) + chr(102) + chr(607 - 562) + '\x38')][roI3spqORKae(ES5oEprVxulp(b'\x8cFgP\xaa}a\x07\xbaT\x99'), chr(100) + chr(1300 - 1199) + chr(99) + '\x6f' + chr(100) + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(3604 - 3502) + chr(45) + chr(664 - 608))] * nzTpIcepk0o8('\x30' + chr(4293 - 4182) + '\061' + chr(52) + '\x34', 8)), unit=roI3spqORKae(ES5oEprVxulp(b'\xda'), '\144' + '\145' + chr(7427 - 7328) + chr(111) + chr(0b1100100) + chr(6558 - 6457))('\x75' + '\x74' + chr(102) + '\x2d' + chr(344 - 288)), indent=nzTpIcepk0o8('\x30' + chr(0b1101111) + '\064', 8)) + roI3spqORKae(ES5oEprVxulp(b'\xf5'), chr(0b1000011 + 0o41) + chr(0b1100101) + '\x63' + chr(0b110111 + 0o70) + chr(100) + '\145')('\x75' + chr(116) + chr(0b1100110) + chr(45) + chr(0b111000)) toKQXlEvBKaK += hXMPsSrOQzbh.ui.FfKOThdpoDTb(field=roI3spqORKae(ES5oEprVxulp(b'\xbdWnR\xadxm\x00\xf3A\x83N\xe9\xaeS\xef\xde'), chr(100) + chr(0b1100101) + chr(0b110100 + 0o57) + chr(1527 - 1416) + chr(0b1100100) + chr(0b1100101))('\165' + chr(0b1110011 + 0o1) + '\x66' + chr(45) + chr(2246 - 2190)), value=jLW6pRf2DSRk(v3B6eeO_B_ws[roI3spqORKae(ES5oEprVxulp(b'\x9eUaF\xb1zk\x1d'), '\144' + chr(666 - 565) + chr(1374 - 1275) + chr(111) + chr(100) + chr(101))('\x75' + chr(0b1110100) + chr(0b1010111 + 0o17) + '\055' + '\x38')][roI3spqORKae(ES5oEprVxulp(b'\x9dWnR\xadxm\x00\x8cA\x83N\xe9\xaeS\xef\xde'), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(5316 - 5205) + chr(0b1010011 + 0o21) + chr(0b1011101 + 0o10))('\165' + chr(0b1110100) + '\146' + chr(0b101101) + chr(825 - 769))] * nzTpIcepk0o8(chr(48) + chr(111) + chr(0b11111 + 0o22) + chr(0b110100) + '\064', 8)), unit=roI3spqORKae(ES5oEprVxulp(b'\xda'), '\144' + '\145' + '\x63' + chr(0b1101111) + '\x64' + chr(0b1100101))('\x75' + '\x74' + chr(6793 - 6691) + '\055' + '\x38'), indent=nzTpIcepk0o8('\060' + chr(6142 - 6031) + chr(52), 8)) + roI3spqORKae(ES5oEprVxulp(b'\xf5'), chr(0b1010010 + 0o22) + '\x65' + chr(0b11000 + 0o113) + '\157' + '\x64' + chr(101))(chr(0b1010101 + 0o40) + chr(648 - 532) + '\x66' + '\055' + chr(535 - 479)) toKQXlEvBKaK += hXMPsSrOQzbh.ui.FfKOThdpoDTb(field=roI3spqORKae(ES5oEprVxulp(b'\xbeUaF\xb1zk\x1d'), chr(3372 - 3272) + chr(1342 - 1241) + chr(0b1010011 + 0o20) + chr(111) + chr(5126 - 5026) + chr(1883 - 1782))('\165' + chr(458 - 342) + chr(0b100011 + 0o103) + chr(0b10010 + 0o33) + chr(3018 - 2962)), value=jLW6pRf2DSRk(v3B6eeO_B_ws[roI3spqORKae(ES5oEprVxulp(b'\x9eUaF\xb1zk\x1d'), chr(9743 - 9643) + '\x65' + '\143' + chr(0b1010000 + 0o37) + chr(0b1100100) + chr(0b1010000 + 0o25))(chr(117) + chr(0b1110100) + '\146' + '\055' + '\x38')][roI3spqORKae(ES5oEprVxulp(b'\x9eUaF\xb1zk\x1d'), chr(6290 - 6190) + '\145' + chr(0b10 + 0o141) + '\157' + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + chr(56))] * nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + chr(0b110100) + '\064', 8)), unit=roI3spqORKae(ES5oEprVxulp(b'\xda'), chr(0b1100100) + '\145' + '\143' + chr(0b1101111) + chr(2145 - 2045) + chr(101))('\165' + chr(0b1110100) + chr(0b1100110) + '\x2d' + '\070'), indent=nzTpIcepk0o8(chr(0b110000) + '\157' + '\x34', 8)) + roI3spqORKae(ES5oEprVxulp(b'\xf5'), '\x64' + '\x65' + chr(0b1100011) + chr(6475 - 6364) + '\144' + chr(5079 - 4978))(chr(0b1110101) + '\x74' + chr(0b1100110) + '\x2d' + '\x38') return toKQXlEvBKaK
TUT-ARG/sed_eval
sed_eval/sound_event.py
SoundEventMetrics.result_report_class_wise_average
def result_report_class_wise_average(self): """Report class-wise averages Returns ------- str result report in string format """ results = self.results_class_wise_average_metrics() output = self.ui.section_header('Class-wise average metrics (macro-average)', indent=2) + '\n' if results['f_measure']: output += self.ui.line('F-measure', indent=2) + '\n' output += self.ui.data(field='F-measure (F1)', value=float(results['f_measure']['f_measure']) * 100, unit='%', indent=4) + '\n' output += self.ui.data(field='Precision', value=float(results['f_measure']['precision']) * 100, unit='%', indent=4) + '\n' output += self.ui.data(field='Recall', value=float(results['f_measure']['recall']) * 100, unit='%', indent=4) + '\n' if results['error_rate']: output += self.ui.line('Error rate', indent=2) + '\n' output += self.ui.data(field='Error rate (ER)', value=float(results['error_rate']['error_rate']), indent=4) + '\n' output += self.ui.data(field='Deletion rate', value=float(results['error_rate']['deletion_rate']), indent=4) + '\n' output += self.ui.data(field='Insertion rate', value=float(results['error_rate']['insertion_rate']), indent=4) + '\n' if results['accuracy']: output += self.ui.line('Accuracy', indent=2) + '\n' output += self.ui.data(field='Sensitivity', value=float(results['accuracy']['sensitivity']*100), unit='%', indent=4) + '\n' output += self.ui.data(field='Specificity', value=float(results['accuracy']['specificity'] * 100), unit='%', indent=4) + '\n' output += self.ui.data(field='Balanced accuracy', value=float(results['accuracy']['balanced_accuracy'] * 100), unit='%', indent=4) + '\n' output += self.ui.data(field='Accuracy', value=float(results['accuracy']['accuracy'] * 100), unit='%', indent=4) + '\n' output += " \n" return output
python
def result_report_class_wise_average(self): """Report class-wise averages Returns ------- str result report in string format """ results = self.results_class_wise_average_metrics() output = self.ui.section_header('Class-wise average metrics (macro-average)', indent=2) + '\n' if results['f_measure']: output += self.ui.line('F-measure', indent=2) + '\n' output += self.ui.data(field='F-measure (F1)', value=float(results['f_measure']['f_measure']) * 100, unit='%', indent=4) + '\n' output += self.ui.data(field='Precision', value=float(results['f_measure']['precision']) * 100, unit='%', indent=4) + '\n' output += self.ui.data(field='Recall', value=float(results['f_measure']['recall']) * 100, unit='%', indent=4) + '\n' if results['error_rate']: output += self.ui.line('Error rate', indent=2) + '\n' output += self.ui.data(field='Error rate (ER)', value=float(results['error_rate']['error_rate']), indent=4) + '\n' output += self.ui.data(field='Deletion rate', value=float(results['error_rate']['deletion_rate']), indent=4) + '\n' output += self.ui.data(field='Insertion rate', value=float(results['error_rate']['insertion_rate']), indent=4) + '\n' if results['accuracy']: output += self.ui.line('Accuracy', indent=2) + '\n' output += self.ui.data(field='Sensitivity', value=float(results['accuracy']['sensitivity']*100), unit='%', indent=4) + '\n' output += self.ui.data(field='Specificity', value=float(results['accuracy']['specificity'] * 100), unit='%', indent=4) + '\n' output += self.ui.data(field='Balanced accuracy', value=float(results['accuracy']['balanced_accuracy'] * 100), unit='%', indent=4) + '\n' output += self.ui.data(field='Accuracy', value=float(results['accuracy']['accuracy'] * 100), unit='%', indent=4) + '\n' output += " \n" return output
[ "def", "result_report_class_wise_average", "(", "self", ")", ":", "results", "=", "self", ".", "results_class_wise_average_metrics", "(", ")", "output", "=", "self", ".", "ui", ".", "section_header", "(", "'Class-wise average metrics (macro-average)'", ",", "indent", ...
Report class-wise averages Returns ------- str result report in string format
[ "Report", "class", "-", "wise", "averages" ]
0cb1b6d11ceec4fe500cc9b31079c9d8666ed6eb
https://github.com/TUT-ARG/sed_eval/blob/0cb1b6d11ceec4fe500cc9b31079c9d8666ed6eb/sed_eval/sound_event.py#L309-L354
train
Report class - wise average metrics for a single object
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ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PAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(0b1000110 + 0o51) + '\x33' + chr(1970 - 1922) + '\060', 25149 - 25141), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(111) + chr(0b11110 + 0o24) + chr(0b110001) + '\x34', 64577 - 64569), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(4208 - 4097) + chr(1379 - 1330) + '\x30' + chr(957 - 905), 0b1000), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1101111) + '\063' + chr(0b110011) + '\064', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b1100 + 0o51) + chr(274 - 224), ord("\x08")), nzTpIcepk0o8(chr(744 - 696) + chr(798 - 687) + chr(1096 - 1044) + '\065', 57735 - 57727), nzTpIcepk0o8(chr(927 - 879) + chr(0b1101111) + chr(0b110001) + '\067' + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(111) + chr(1703 - 1654) + chr(53) + '\064', 0b1000), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\x6f' + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(439 - 391) + chr(0b1010000 + 0o37) + chr(0b110010) + chr(54) + '\064', 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + '\x33' + chr(0b110010), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\066' + '\x35', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b10 + 0o60) + chr(53) + chr(2551 - 2500), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(5683 - 5572) + '\x32' + chr(0b110001) + '\x36', 0o10), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(111) + chr(50) + chr(50) + '\x32', 65164 - 65156), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(11220 - 11109) + chr(51) + chr(0b110100) + '\x30', 0o10), nzTpIcepk0o8('\060' + '\157' + '\x31' + chr(0b110111) + '\064', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + chr(55) + chr(1195 - 1144), 0b1000), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b1 + 0o156) + '\x32' + chr(0b11 + 0o63) + chr(55), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + '\066', 36478 - 36470), nzTpIcepk0o8(chr(0b1101 + 0o43) + '\x6f' + '\061' + chr(0b101 + 0o57) + chr(0b110101), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(51) + chr(0b110001) + chr(0b1010 + 0o47), 0o10), nzTpIcepk0o8(chr(0b10111 + 0o31) + '\x6f' + chr(2275 - 2226) + '\067' + chr(0b110110), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(2347 - 2297) + '\065' + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(80 - 32) + chr(4469 - 4358) + chr(1338 - 1287) + '\x31' + '\064', 0b1000), nzTpIcepk0o8(chr(1325 - 1277) + chr(111) + chr(835 - 786) + chr(0b100111 + 0o17) + chr(50), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(2155 - 2106) + chr(0b110110) + chr(55), 60868 - 60860), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b10010 + 0o135) + chr(0b110110) + chr(0b100001 + 0o26), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b1110 + 0o43) + chr(0b0 + 0o60) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(1271 - 1223) + chr(0b1001001 + 0o46) + chr(50) + '\x32' + chr(49), 28411 - 28403), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + '\x36' + chr(53), 51483 - 51475), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x33' + '\x32' + chr(1268 - 1215), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(6754 - 6643) + chr(51) + chr(497 - 442) + chr(0b110100), 52457 - 52449), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x33' + '\066' + '\064', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(1308 - 1197) + '\x31' + chr(1343 - 1295) + chr(0b1 + 0o66), 0b1000), nzTpIcepk0o8(chr(2283 - 2235) + chr(3290 - 3179) + chr(341 - 290) + chr(885 - 831) + chr(55), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101100 + 0o3) + chr(1477 - 1426) + '\060' + chr(0b1101 + 0o50), ord("\x08")), nzTpIcepk0o8(chr(952 - 904) + '\x6f' + chr(0b10000 + 0o41) + '\065' + '\x30', 0b1000), nzTpIcepk0o8('\060' + chr(0b110001 + 0o76) + chr(51) + chr(48), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + chr(951 - 902) + chr(53), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(4990 - 4879) + chr(896 - 843) + chr(48), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xee'), '\x64' + chr(101) + chr(0b1100011) + chr(111) + chr(0b1010011 + 0o21) + chr(5166 - 5065))(chr(0b1110101) + '\164' + chr(0b1010000 + 0o26) + chr(0b101101) + chr(0b1100 + 0o54)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def kYitezoOK2ON(hXMPsSrOQzbh): v3B6eeO_B_ws = hXMPsSrOQzbh.results_class_wise_average_metrics() toKQXlEvBKaK = hXMPsSrOQzbh.ui.section_header(roI3spqORKae(ES5oEprVxulp(b'\x83\xe0%\xafY\x08\x08\x05r\xd1\xbaT\xdd\xeb\xe0\x81\x1b\x9e\x97s\x00\xbd\x0c\xc4\xaf\x01W\x1f,\xf0\x96\xa7\x93\xd9&\x81\xa0\x1ay\xea\xa5\xa5'), '\x64' + '\145' + '\143' + chr(111) + chr(0b11000 + 0o114) + chr(0b100011 + 0o102))(chr(0b1101011 + 0o12) + chr(0b1110100) + chr(0b110100 + 0o62) + chr(1296 - 1251) + chr(0b111000)), indent=nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b1101111) + chr(0b10011 + 0o37), 0o10)) + roI3spqORKae(ES5oEprVxulp(b'\xca'), chr(0b1010110 + 0o16) + chr(101) + chr(0b1100011) + chr(111) + chr(8379 - 8279) + chr(1466 - 1365))(chr(0b1110101) + chr(408 - 292) + chr(102) + '\x2d' + chr(0b10000 + 0o50)) if v3B6eeO_B_ws[roI3spqORKae(ES5oEprVxulp(b'\xa6\xd3)\xb9KV\n\x1ed'), '\144' + chr(6865 - 6764) + chr(0b1100011) + chr(111) + chr(7863 - 7763) + '\145')('\x75' + '\164' + chr(102) + chr(45) + chr(56))]: toKQXlEvBKaK += hXMPsSrOQzbh.ui.ffiOpFBWGmZU(roI3spqORKae(ES5oEprVxulp(b'\x86\xa1)\xb9KV\n\x1ed'), '\144' + '\x65' + chr(4436 - 4337) + chr(0b1101111) + '\x64' + '\145')(chr(12805 - 12688) + '\x74' + chr(102) + chr(109 - 64) + chr(0b101100 + 0o14)), indent=nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32', 8)) + roI3spqORKae(ES5oEprVxulp(b'\xca'), chr(0b1100100) + chr(101) + chr(99) + chr(0b1011110 + 0o21) + '\144' + '\145')(chr(13002 - 12885) + '\164' + chr(7585 - 7483) + '\x2d' + '\x38') toKQXlEvBKaK += hXMPsSrOQzbh.ui.FfKOThdpoDTb(field=roI3spqORKae(ES5oEprVxulp(b'\x86\xa1)\xb9KV\n\x1ed\x94\xb2s\x9a\xa7'), chr(3035 - 2935) + chr(0b1100101) + chr(99) + chr(0b110110 + 0o71) + chr(100) + chr(0b1110 + 0o127))('\x75' + '\164' + chr(0b1100110) + chr(0b11111 + 0o16) + chr(0b110100 + 0o4)), value=jLW6pRf2DSRk(v3B6eeO_B_ws[roI3spqORKae(ES5oEprVxulp(b'\xa6\xd3)\xb9KV\n\x1ed'), chr(9517 - 9417) + '\x65' + '\143' + '\x6f' + chr(2928 - 2828) + '\x65')(chr(1203 - 1086) + chr(0b1110100) + '\x66' + chr(45) + chr(0b101010 + 0o16))][roI3spqORKae(ES5oEprVxulp(b'\xa6\xd3)\xb9KV\n\x1ed'), chr(100) + '\x65' + '\x63' + chr(0b1010110 + 0o31) + chr(0b100111 + 0o75) + chr(101))(chr(1849 - 1732) + chr(116) + chr(0b0 + 0o146) + chr(0b111 + 0o46) + '\x38')]) * nzTpIcepk0o8(chr(0b110000) + chr(0b1101001 + 0o6) + chr(0b10000 + 0o41) + '\064' + chr(0b100001 + 0o23), 0b1000), unit=roI3spqORKae(ES5oEprVxulp(b'\xe5'), chr(0b100111 + 0o75) + '\x65' + '\x63' + chr(121 - 10) + chr(0b101100 + 0o70) + '\145')('\165' + chr(0b1001110 + 0o46) + '\x66' + '\x2d' + chr(0b111000)), indent=nzTpIcepk0o8(chr(48) + chr(0b1001100 + 0o43) + chr(0b110100), 9159 - 9151)) + roI3spqORKae(ES5oEprVxulp(b'\xca'), chr(0b1100000 + 0o4) + chr(0b110100 + 0o61) + chr(99) + chr(0b1001001 + 0o46) + chr(0b111111 + 0o45) + chr(0b1010000 + 0o25))(chr(13181 - 13064) + chr(0b1110100) + '\146' + chr(0b101101) + '\070') toKQXlEvBKaK += hXMPsSrOQzbh.ui.FfKOThdpoDTb(field=roI3spqORKae(ES5oEprVxulp(b'\x90\xfe!\xbfCV\x16\x03o'), chr(189 - 89) + '\145' + chr(3851 - 3752) + chr(0b1101111) + '\x64' + '\145')(chr(0b1100110 + 0o17) + '\164' + '\x66' + chr(0b101101) + chr(0b10000 + 0o50)), value=jLW6pRf2DSRk(v3B6eeO_B_ws[roI3spqORKae(ES5oEprVxulp(b'\xa6\xd3)\xb9KV\n\x1ed'), '\144' + chr(101) + chr(7971 - 7872) + chr(5980 - 5869) + chr(0b1100100) + chr(101))(chr(2475 - 2358) + chr(116) + '\146' + '\x2d' + chr(0b111000))][roI3spqORKae(ES5oEprVxulp(b'\xb0\xfe!\xbfCV\x16\x03o'), '\144' + '\x65' + chr(5711 - 5612) + '\157' + '\144' + chr(0b1001110 + 0o27))(chr(0b1110101) + chr(0b1110100) + '\146' + '\x2d' + chr(2243 - 2187))]) * nzTpIcepk0o8('\060' + chr(0b1010100 + 0o33) + '\061' + chr(52) + chr(2228 - 2176), 8), unit=roI3spqORKae(ES5oEprVxulp(b'\xe5'), chr(0b111101 + 0o47) + '\x65' + chr(0b1100011) + chr(111) + chr(2113 - 2013) + '\x65')(chr(117) + chr(0b110 + 0o156) + chr(0b1000010 + 0o44) + chr(840 - 795) + '\x38'), indent=nzTpIcepk0o8(chr(0b1 + 0o57) + '\x6f' + chr(0b110100), 8)) + roI3spqORKae(ES5oEprVxulp(b'\xca'), chr(100) + chr(0b1100101) + '\x63' + '\157' + '\x64' + chr(5928 - 5827))(chr(10961 - 10844) + chr(9047 - 8931) + chr(8991 - 8889) + '\x2d' + '\x38') toKQXlEvBKaK += hXMPsSrOQzbh.ui.FfKOThdpoDTb(field=roI3spqORKae(ES5oEprVxulp(b"\x92\xe9'\xbdFI"), chr(971 - 871) + chr(0b11 + 0o142) + chr(0b1100011) + '\x6f' + chr(5502 - 5402) + '\x65')(chr(117) + chr(0b1110000 + 0o4) + '\146' + '\x2d' + '\x38'), value=jLW6pRf2DSRk(v3B6eeO_B_ws[roI3spqORKae(ES5oEprVxulp(b'\xa6\xd3)\xb9KV\n\x1ed'), chr(100) + '\145' + chr(3268 - 3169) + chr(0b1101111) + '\x64' + chr(0b1100101))('\x75' + chr(9544 - 9428) + chr(0b1100110) + chr(0b101101) + chr(0b111000))][roI3spqORKae(ES5oEprVxulp(b"\xb2\xe9'\xbdFI"), '\x64' + chr(0b1100101) + chr(99) + chr(0b1101111) + '\x64' + chr(7115 - 7014))(chr(11810 - 11693) + chr(0b1100100 + 0o20) + '\146' + '\055' + chr(0b111000))]) * nzTpIcepk0o8(chr(48) + chr(0b110000 + 0o77) + '\061' + chr(0b110100) + chr(0b11101 + 0o27), 8), unit=roI3spqORKae(ES5oEprVxulp(b'\xe5'), '\x64' + chr(0b1100101) + chr(2591 - 2492) + '\x6f' + chr(0b1101 + 0o127) + chr(101))(chr(0b1100011 + 0o22) + chr(0b1110100) + '\x66' + chr(816 - 771) + '\x38'), indent=nzTpIcepk0o8('\x30' + '\x6f' + chr(951 - 899), 8)) + roI3spqORKae(ES5oEprVxulp(b'\xca'), chr(0b1100100) + '\145' + '\143' + chr(0b1101111) + chr(512 - 412) + chr(101))(chr(9757 - 9640) + chr(9608 - 9492) + '\146' + chr(0b101011 + 0o2) + chr(312 - 256)) if v3B6eeO_B_ws[roI3spqORKae(ES5oEprVxulp(b'\xa5\xfe6\xb3Xz\r\ru\xd1'), chr(100) + '\145' + chr(7321 - 7222) + chr(8466 - 8355) + '\x64' + chr(292 - 191))(chr(0b1110101) + chr(116) + chr(1553 - 1451) + '\055' + chr(2242 - 2186))]: toKQXlEvBKaK += hXMPsSrOQzbh.ui.ffiOpFBWGmZU(roI3spqORKae(ES5oEprVxulp(b'\x85\xfe6\xb3X\x05\r\ru\xd1'), chr(5030 - 4930) + '\x65' + '\143' + chr(0b1001000 + 0o47) + chr(8756 - 8656) + chr(0b1100101 + 0o0))('\x75' + chr(116) + chr(3066 - 2964) + chr(0b101101) + chr(0b10000 + 0o50)), indent=nzTpIcepk0o8(chr(1950 - 1902) + chr(0b1101111) + '\062', 8)) + roI3spqORKae(ES5oEprVxulp(b'\xca'), '\144' + '\145' + '\143' + chr(0b1 + 0o156) + '\144' + chr(101))('\x75' + '\164' + chr(0b1100110) + '\055' + chr(2141 - 2085)) toKQXlEvBKaK += hXMPsSrOQzbh.ui.FfKOThdpoDTb(field=roI3spqORKae(ES5oEprVxulp(b'\x85\xfe6\xb3X\x05\r\ru\xd1\xba\x1d\xee\xdc\xbb'), chr(1561 - 1461) + '\145' + chr(0b1100011) + chr(111) + chr(1636 - 1536) + '\x65')(chr(2299 - 2182) + chr(6669 - 6553) + chr(0b10001 + 0o125) + '\x2d' + chr(0b101111 + 0o11)), value=jLW6pRf2DSRk(v3B6eeO_B_ws[roI3spqORKae(ES5oEprVxulp(b'\xa5\xfe6\xb3Xz\r\ru\xd1'), chr(408 - 308) + chr(3007 - 2906) + chr(947 - 848) + chr(0b0 + 0o157) + '\x64' + '\x65')('\x75' + chr(6734 - 6618) + '\146' + chr(362 - 317) + chr(56))][roI3spqORKae(ES5oEprVxulp(b'\xa5\xfe6\xb3Xz\r\ru\xd1'), chr(100) + chr(0b111110 + 0o47) + '\x63' + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(0b1110101) + '\164' + chr(0b1100110) + '\x2d' + chr(0b101011 + 0o15))]), indent=nzTpIcepk0o8(chr(0b110000) + chr(6803 - 6692) + '\064', 8)) + roI3spqORKae(ES5oEprVxulp(b'\xca'), chr(0b1100100) + chr(101) + chr(99) + '\157' + chr(100) + chr(101))(chr(0b1110101) + chr(12713 - 12597) + chr(102) + chr(0b101101) + '\070') toKQXlEvBKaK += hXMPsSrOQzbh.ui.FfKOThdpoDTb(field=roI3spqORKae(ES5oEprVxulp(b'\x84\xe9(\xb9^L\x10\x02!\xc6\xfbA\xce'), '\144' + chr(9085 - 8984) + chr(8393 - 8294) + chr(0b1101111) + chr(0b1100100) + chr(8235 - 8134))(chr(8651 - 8534) + chr(2828 - 2712) + chr(7733 - 7631) + '\x2d' + chr(0b111000)), value=jLW6pRf2DSRk(v3B6eeO_B_ws[roI3spqORKae(ES5oEprVxulp(b'\xa5\xfe6\xb3Xz\r\ru\xd1'), chr(100) + chr(8491 - 8390) + chr(0b100011 + 0o100) + chr(111) + chr(8483 - 8383) + chr(101))('\165' + chr(116) + chr(0b1100110) + chr(0b101101) + '\070')][roI3spqORKae(ES5oEprVxulp(b'\xa4\xe9(\xb9^L\x10\x02^\xc6\xfbA\xce'), chr(1191 - 1091) + chr(5027 - 4926) + chr(0b1001000 + 0o33) + chr(0b1101111) + '\x64' + '\145')(chr(13566 - 13449) + '\164' + chr(0b1100110) + chr(0b1000 + 0o45) + chr(0b111000))]), indent=nzTpIcepk0o8(chr(0b110000) + chr(0b1001111 + 0o40) + '\064', 8)) + roI3spqORKae(ES5oEprVxulp(b'\xca'), chr(100) + chr(6472 - 6371) + '\143' + chr(111) + '\144' + chr(101))(chr(3534 - 3417) + chr(116) + chr(6041 - 5939) + chr(1459 - 1414) + chr(0b111000)) toKQXlEvBKaK += hXMPsSrOQzbh.ui.FfKOThdpoDTb(field=roI3spqORKae(ES5oEprVxulp(b'\x89\xe27\xb9XQ\x16\x03o\x94\xe8T\xdf\xeb'), chr(6123 - 6023) + chr(425 - 324) + chr(8307 - 8208) + chr(0b1101111) + chr(0b10111 + 0o115) + chr(8092 - 7991))(chr(0b1110101) + '\x74' + '\146' + '\x2d' + chr(0b110101 + 0o3)), value=jLW6pRf2DSRk(v3B6eeO_B_ws[roI3spqORKae(ES5oEprVxulp(b'\xa5\xfe6\xb3Xz\r\ru\xd1'), '\144' + chr(7205 - 7104) + chr(4658 - 4559) + '\157' + chr(0b1100001 + 0o3) + chr(6206 - 6105))('\165' + '\x74' + chr(7574 - 7472) + chr(45) + '\x38')][roI3spqORKae(ES5oEprVxulp(b'\xa9\xe27\xb9XQ\x16\x03o\xeb\xe8T\xdf\xeb'), chr(8036 - 7936) + '\145' + '\143' + chr(9544 - 9433) + chr(5028 - 4928) + chr(2483 - 2382))(chr(0b1110101) + chr(9511 - 9395) + '\146' + '\x2d' + chr(56))]), indent=nzTpIcepk0o8('\x30' + chr(2251 - 2140) + chr(52), 8)) + roI3spqORKae(ES5oEprVxulp(b'\xca'), '\x64' + '\145' + chr(9791 - 9692) + chr(0b1011 + 0o144) + chr(5316 - 5216) + chr(0b111110 + 0o47))(chr(0b1110101) + chr(116) + chr(2206 - 2104) + '\055' + '\070') if v3B6eeO_B_ws[roI3spqORKae(ES5oEprVxulp(b"\xa1\xef'\xa9XD\x1c\x15"), chr(8612 - 8512) + chr(0b11110 + 0o107) + chr(0b1100011) + '\x6f' + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(116) + '\x66' + chr(0b101101) + chr(0b111000))]: toKQXlEvBKaK += hXMPsSrOQzbh.ui.ffiOpFBWGmZU(roI3spqORKae(ES5oEprVxulp(b"\x81\xef'\xa9XD\x1c\x15"), chr(0b10111 + 0o115) + chr(8225 - 8124) + chr(0b1100011) + chr(0b11000 + 0o127) + chr(9345 - 9245) + chr(1895 - 1794))(chr(117) + chr(0b1110100) + chr(0b1000000 + 0o46) + '\055' + chr(0b111000)), indent=nzTpIcepk0o8(chr(0b110000) + '\157' + '\062', 8)) + roI3spqORKae(ES5oEprVxulp(b'\xca'), chr(6766 - 6666) + chr(0b1100101) + chr(99) + chr(0b10100 + 0o133) + chr(9854 - 9754) + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(7751 - 7649) + '\055' + chr(56)) toKQXlEvBKaK += hXMPsSrOQzbh.ui.FfKOThdpoDTb(field=roI3spqORKae(ES5oEprVxulp(b'\x93\xe9*\xafCQ\x16\x1ah\xc0\xe3'), '\x64' + chr(0b1010000 + 0o25) + chr(8571 - 8472) + chr(0b11000 + 0o127) + '\144' + chr(101))(chr(0b110000 + 0o105) + chr(0b0 + 0o164) + chr(7001 - 6899) + chr(0b0 + 0o55) + '\x38'), value=jLW6pRf2DSRk(v3B6eeO_B_ws[roI3spqORKae(ES5oEprVxulp(b"\xa1\xef'\xa9XD\x1c\x15"), chr(0b1000000 + 0o44) + chr(0b10110 + 0o117) + chr(4052 - 3953) + chr(9236 - 9125) + chr(2820 - 2720) + '\145')('\165' + chr(8879 - 8763) + chr(0b110001 + 0o65) + '\055' + '\070')][roI3spqORKae(ES5oEprVxulp(b'\xb3\xe9*\xafCQ\x16\x1ah\xc0\xe3'), '\144' + chr(505 - 404) + chr(99) + chr(0b1100101 + 0o12) + chr(0b1000 + 0o134) + '\145')(chr(0b1110101) + '\164' + chr(3824 - 3722) + '\055' + chr(56))] * nzTpIcepk0o8('\x30' + '\157' + '\x31' + '\064' + chr(52), 8)), unit=roI3spqORKae(ES5oEprVxulp(b'\xe5'), chr(3085 - 2985) + chr(101) + chr(1728 - 1629) + chr(0b101000 + 0o107) + '\144' + chr(0b1100101))(chr(12406 - 12289) + chr(0b111011 + 0o71) + '\146' + chr(1178 - 1133) + '\070'), indent=nzTpIcepk0o8(chr(48) + chr(111) + '\064', 8)) + roI3spqORKae(ES5oEprVxulp(b'\xca'), chr(100) + chr(101) + chr(99) + '\x6f' + chr(5747 - 5647) + chr(4536 - 4435))('\165' + '\x74' + chr(0b1100110) + chr(745 - 700) + '\070') toKQXlEvBKaK += hXMPsSrOQzbh.ui.FfKOThdpoDTb(field=roI3spqORKae(ES5oEprVxulp(b'\x93\xfc!\xbfCC\x16\x0fh\xc0\xe3'), chr(100) + chr(4765 - 4664) + '\x63' + chr(111) + '\144' + chr(7780 - 7679))('\x75' + chr(6774 - 6658) + chr(102) + chr(1107 - 1062) + chr(2335 - 2279)), value=jLW6pRf2DSRk(v3B6eeO_B_ws[roI3spqORKae(ES5oEprVxulp(b"\xa1\xef'\xa9XD\x1c\x15"), '\x64' + chr(5268 - 5167) + '\143' + chr(111) + chr(100) + chr(4402 - 4301))(chr(12269 - 12152) + chr(0b1000100 + 0o60) + chr(0b111011 + 0o53) + chr(0b1101 + 0o40) + chr(0b1 + 0o67))][roI3spqORKae(ES5oEprVxulp(b'\xb3\xfc!\xbfCC\x16\x0fh\xc0\xe3'), chr(100) + '\x65' + chr(99) + '\157' + chr(0b1100100) + chr(0b1011010 + 0o13))('\165' + chr(0b1001000 + 0o54) + chr(0b110100 + 0o62) + chr(1418 - 1373) + chr(2207 - 2151))] * nzTpIcepk0o8(chr(48) + chr(111) + chr(49) + chr(539 - 487) + chr(0b110100), 8)), unit=roI3spqORKae(ES5oEprVxulp(b'\xe5'), '\x64' + chr(0b1100101) + '\143' + chr(111) + chr(5021 - 4921) + '\145')('\165' + chr(4729 - 4613) + chr(0b1011001 + 0o15) + chr(0b101101) + '\070'), indent=nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(3601 - 3490) + chr(558 - 506), 8)) + roI3spqORKae(ES5oEprVxulp(b'\xca'), chr(0b1100100) + '\x65' + chr(99) + chr(1891 - 1780) + '\x64' + chr(0b1100101))(chr(117) + '\164' + chr(0b1100110) + chr(1551 - 1506) + chr(0b101 + 0o63)) toKQXlEvBKaK += hXMPsSrOQzbh.ui.FfKOThdpoDTb(field=roI3spqORKae(ES5oEprVxulp(b'\x82\xed(\xbdDF\x1a\x08!\xd5\xf9V\xde\xfc\xf3\x83\x05'), '\144' + '\x65' + '\x63' + '\157' + chr(0b1000100 + 0o40) + '\x65')('\x75' + chr(116) + chr(0b1100110) + chr(45) + chr(0b111000)), value=jLW6pRf2DSRk(v3B6eeO_B_ws[roI3spqORKae(ES5oEprVxulp(b"\xa1\xef'\xa9XD\x1c\x15"), '\x64' + chr(0b1100101) + '\143' + '\157' + chr(1513 - 1413) + chr(0b11111 + 0o106))(chr(0b101100 + 0o111) + chr(0b1010010 + 0o42) + chr(0b1100110) + '\055' + '\070')][roI3spqORKae(ES5oEprVxulp(b'\xa2\xed(\xbdDF\x1a\x08^\xd5\xf9V\xde\xfc\xf3\x83\x05'), chr(100) + chr(0b1100101) + chr(2414 - 2315) + chr(0b1101111) + chr(0b1010101 + 0o17) + '\x65')('\x75' + '\x74' + chr(0b101001 + 0o75) + chr(45) + chr(0b111000))] * nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b1101 + 0o142) + '\x31' + '\x34' + chr(592 - 540), 8)), unit=roI3spqORKae(ES5oEprVxulp(b'\xe5'), '\x64' + chr(0b110101 + 0o60) + chr(0b1100011) + '\157' + chr(0b11111 + 0o105) + '\x65')(chr(0b1100100 + 0o21) + chr(5795 - 5679) + chr(0b1100110) + chr(600 - 555) + chr(0b101110 + 0o12)), indent=nzTpIcepk0o8(chr(1721 - 1673) + chr(10889 - 10778) + chr(1435 - 1383), 8)) + roI3spqORKae(ES5oEprVxulp(b'\xca'), '\144' + chr(0b1100101) + '\x63' + '\157' + chr(9734 - 9634) + '\145')(chr(117) + '\x74' + '\146' + chr(0b11010 + 0o23) + '\070') toKQXlEvBKaK += hXMPsSrOQzbh.ui.FfKOThdpoDTb(field=roI3spqORKae(ES5oEprVxulp(b"\x81\xef'\xa9XD\x1c\x15"), '\144' + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(0b1001111 + 0o25) + '\x65')(chr(0b1000001 + 0o64) + chr(0b1110100) + chr(102) + chr(1662 - 1617) + chr(0b111000)), value=jLW6pRf2DSRk(v3B6eeO_B_ws[roI3spqORKae(ES5oEprVxulp(b"\xa1\xef'\xa9XD\x1c\x15"), chr(5953 - 5853) + '\x65' + chr(0b10101 + 0o116) + chr(5942 - 5831) + chr(2475 - 2375) + chr(101))(chr(117) + '\x74' + chr(0b1100110) + '\x2d' + chr(1880 - 1824))][roI3spqORKae(ES5oEprVxulp(b"\xa1\xef'\xa9XD\x1c\x15"), chr(0b1100100) + chr(0b100 + 0o141) + '\143' + chr(111) + chr(0b1011000 + 0o14) + '\x65')('\x75' + '\164' + chr(2190 - 2088) + '\055' + '\070')] * nzTpIcepk0o8('\060' + '\157' + chr(1507 - 1458) + chr(0b110100) + '\064', 8)), unit=roI3spqORKae(ES5oEprVxulp(b'\xe5'), chr(0b1100100) + chr(101) + chr(0b10001 + 0o122) + chr(0b1101111) + '\x64' + chr(101))('\165' + chr(9588 - 9472) + chr(102) + '\055' + '\x38'), indent=nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(3433 - 3322) + '\064', 8)) + roI3spqORKae(ES5oEprVxulp(b'\xca'), '\x64' + chr(0b1100101) + chr(0b100110 + 0o75) + '\157' + '\144' + '\145')('\x75' + chr(0b1000001 + 0o63) + '\x66' + chr(45) + '\070') toKQXlEvBKaK += roI3spqORKae(ES5oEprVxulp(b'\xe0\xacN'), chr(0b1100100) + chr(0b1100101) + '\143' + '\x6f' + chr(100) + chr(0b1100101))(chr(0b10 + 0o163) + chr(116) + '\x66' + '\x2d' + chr(56)) return toKQXlEvBKaK