Skip to content

Instantly share code, notes, and snippets.

@ivirshup
Created November 29, 2019 05:08
Show Gist options
  • Save ivirshup/3cfda906e75fe521971bd5f1b7fedb01 to your computer and use it in GitHub Desktop.
Save ivirshup/3cfda906e75fe521971bd5f1b7fedb01 to your computer and use it in GitHub Desktop.
Black error log
--- src
+++ dst
@@ -2612,10 +2612,20 @@
) # /Load
id=
'C', # str
) # /Name
) # /Assign
+ Return(
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'out', # str
+ ) # /Name
+ ) # /Return
iter=
Call(
args=
Name(
ctx=
@@ -2652,351 +2662,124 @@
'k', # str
) # /Name
type_comment=
None, # NoneType
) # /For
- Return(
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'out', # str
- ) # /Name
- ) # /Return
- decorator_list=
- Call(
+ FunctionDef(
args=
- func=
- Attribute(
- attr=
- 'njit', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'numba', # str
- ) # /Name
- ) # /Attribute
- keywords=
- keyword(
- arg=
- 'cache', # str
- value=
- Constant(
- value=
- True, # bool
- ) # /Constant
- ) # /keyword
- keyword(
- arg=
- 'parallel', # str
- value=
- Constant(
- value=
- True, # bool
- ) # /Constant
- ) # /keyword
- ) # /Call
- name=
- '_gearys_c_mtx_csr', # str
- returns=
- None, # NoneType
- type_comment=
- None, # NoneType
- ) # /FunctionDef
- FunctionDef(
- args=
- arguments(
- args=
- arg(
- annotation=
- None, # NoneType
- arg=
- 'g_data', # str
- type_comment=
- None, # NoneType
- ) # /arg
- arg(
- annotation=
- None, # NoneType
- arg=
- 'g_indices', # str
- type_comment=
- None, # NoneType
- ) # /arg
- arg(
- annotation=
- None, # NoneType
- arg=
- 'g_indptr', # str
- type_comment=
- None, # NoneType
- ) # /arg
- arg(
- annotation=
- None, # NoneType
- arg=
- 'X', # str
- type_comment=
- None, # NoneType
- ) # /arg
- defaults=
- kw_defaults=
- kwarg=
- None, # NoneType
- kwonlyargs=
- vararg=
- None, # NoneType
- ) # /arguments
- body=
- Assign(
- targets=
- Tuple(
- ctx=
- Store(
- ) # /Store
- elts=
- Name(
- ctx=
- Store(
- ) # /Store
- id=
- 'M', # str
- ) # /Name
- Name(
- ctx=
- Store(
- ) # /Store
- id=
- 'N', # str
- ) # /Name
- ) # /Tuple
- type_comment=
- None, # NoneType
- value=
- Attribute(
- attr=
- 'shape', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
+ arguments(
+ args=
+ arg(
+ annotation=
+ None, # NoneType
+ arg=
+ 'g_data', # str
+ type_comment=
+ None, # NoneType
+ ) # /arg
+ arg(
+ annotation=
+ None, # NoneType
+ arg=
+ 'g_indices', # str
+ type_comment=
+ None, # NoneType
+ ) # /arg
+ arg(
+ annotation=
+ None, # NoneType
+ arg=
+ 'g_indptr', # str
+ type_comment=
+ None, # NoneType
+ ) # /arg
+ arg(
+ annotation=
+ None, # NoneType
+ arg=
'X', # str
- ) # /Name
- ) # /Attribute
- ) # /Assign
- Assign(
- targets=
- Name(
- ctx=
- Store(
- ) # /Store
- id=
- 'W', # str
- ) # /Name
- type_comment=
- None, # NoneType
- value=
- Call(
- args=
- func=
- Attribute(
- attr=
- 'sum', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'g_data', # str
- ) # /Name
- ) # /Attribute
- keywords=
- ) # /Call
- ) # /Assign
- Assign(
- targets=
- Name(
- ctx=
- Store(
- ) # /Store
- id=
- 'out', # str
- ) # /Name
- type_comment=
- None, # NoneType
- value=
- Call(
- args=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'M', # str
- ) # /Name
- func=
- Attribute(
- attr=
- 'zeros', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'np', # str
- ) # /Name
- ) # /Attribute
- keywords=
- keyword(
- arg=
- 'dtype', # str
- value=
- Attribute(
- attr=
- 'float_', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'np', # str
- ) # /Name
- ) # /Attribute
- ) # /keyword
- ) # /Call
- ) # /Assign
- For(
+ type_comment=
+ None, # NoneType
+ ) # /arg
+ defaults=
+ kw_defaults=
+ kwarg=
+ None, # NoneType
+ kwonlyargs=
+ vararg=
+ None, # NoneType
+ ) # /arguments
body=
Assign(
targets=
- Name(
+ Tuple(
ctx=
Store(
) # /Store
- id=
- 'x', # str
- ) # /Name
+ elts=
+ Name(
+ ctx=
+ Store(
+ ) # /Store
+ id=
+ 'M', # str
+ ) # /Name
+ Name(
+ ctx=
+ Store(
+ ) # /Store
+ id=
+ 'N', # str
+ ) # /Name
+ ) # /Tuple
type_comment=
None, # NoneType
value=
- Call(
- args=
- Attribute(
- attr=
- 'float_', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'np', # str
- ) # /Name
- ) # /Attribute
- func=
- Attribute(
- attr=
- 'astype', # str
- ctx=
- Load(
- ) # /Load
- value=
- Subscript(
- ctx=
- Load(
- ) # /Load
- slice=
- ExtSlice(
- dims=
- Index(
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'k', # str
- ) # /Name
- ) # /Index
- Slice(
- lower=
- None, # NoneType
- step=
- None, # NoneType
- upper=
- None, # NoneType
- ) # /Slice
- ) # /ExtSlice
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'X', # str
- ) # /Name
- ) # /Subscript
- ) # /Attribute
- keywords=
- ) # /Call
+ Attribute(
+ attr=
+ 'shape', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'X', # str
+ ) # /Name
+ ) # /Attribute
) # /Assign
Assign(
targets=
Name(
ctx=
Store(
) # /Store
id=
- 'x_bar', # str
+ 'W', # str
) # /Name
type_comment=
None, # NoneType
value=
Call(
args=
func=
Attribute(
attr=
- 'mean', # str
+ 'sum', # str
ctx=
Load(
) # /Load
value=
Name(
ctx=
Load(
) # /Load
id=
- 'x', # str
+ 'g_data', # str
) # /Name
) # /Attribute
keywords=
) # /Call
) # /Assign
@@ -3005,36 +2788,289 @@
Name(
ctx=
Store(
) # /Store
id=
- 'total', # str
+ 'out', # str
) # /Name
type_comment=
None, # NoneType
value=
- Constant(
- value=
- 0.0, # float
- ) # /Constant
+ Call(
+ args=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'M', # str
+ ) # /Name
+ func=
+ Attribute(
+ attr=
+ 'zeros', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'np', # str
+ ) # /Name
+ ) # /Attribute
+ keywords=
+ keyword(
+ arg=
+ 'dtype', # str
+ value=
+ Attribute(
+ attr=
+ 'float_', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'np', # str
+ ) # /Name
+ ) # /Attribute
+ ) # /keyword
+ ) # /Call
) # /Assign
For(
body=
Assign(
targets=
Name(
ctx=
Store(
) # /Store
id=
- 's', # str
+ 'x', # str
) # /Name
type_comment=
None, # NoneType
value=
Call(
args=
+ Attribute(
+ attr=
+ 'float_', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'np', # str
+ ) # /Name
+ ) # /Attribute
+ func=
+ Attribute(
+ attr=
+ 'astype', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Subscript(
+ ctx=
+ Load(
+ ) # /Load
+ slice=
+ ExtSlice(
+ dims=
+ Index(
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'k', # str
+ ) # /Name
+ ) # /Index
+ Slice(
+ lower=
+ None, # NoneType
+ step=
+ None, # NoneType
+ upper=
+ None, # NoneType
+ ) # /Slice
+ ) # /ExtSlice
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'X', # str
+ ) # /Name
+ ) # /Subscript
+ ) # /Attribute
+ keywords=
+ ) # /Call
+ ) # /Assign
+ Assign(
+ targets=
+ Name(
+ ctx=
+ Store(
+ ) # /Store
+ id=
+ 'x_bar', # str
+ ) # /Name
+ type_comment=
+ None, # NoneType
+ value=
+ Call(
+ args=
+ func=
+ Attribute(
+ attr=
+ 'mean', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'x', # str
+ ) # /Name
+ ) # /Attribute
+ keywords=
+ ) # /Call
+ ) # /Assign
+ Assign(
+ targets=
+ Name(
+ ctx=
+ Store(
+ ) # /Store
+ id=
+ 'total', # str
+ ) # /Name
+ type_comment=
+ None, # NoneType
+ value=
+ Constant(
+ value=
+ 0.0, # float
+ ) # /Constant
+ ) # /Assign
+ For(
+ body=
+ Assign(
+ targets=
+ Name(
+ ctx=
+ Store(
+ ) # /Store
+ id=
+ 's', # str
+ ) # /Name
+ type_comment=
+ None, # NoneType
+ value=
+ Call(
+ args=
+ Subscript(
+ ctx=
+ Load(
+ ) # /Load
+ slice=
+ Index(
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'i', # str
+ ) # /Name
+ ) # /Index
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'g_indptr', # str
+ ) # /Name
+ ) # /Subscript
+ Subscript(
+ ctx=
+ Load(
+ ) # /Load
+ slice=
+ Index(
+ value=
+ BinOp(
+ left=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'i', # str
+ ) # /Name
+ op=
+ Add(
+ ) # /Add
+ right=
+ Constant(
+ value=
+ 1, # int
+ ) # /Constant
+ ) # /BinOp
+ ) # /Index
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'g_indptr', # str
+ ) # /Name
+ ) # /Subscript
+ func=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'slice', # str
+ ) # /Name
+ keywords=
+ ) # /Call
+ ) # /Assign
+ Assign(
+ targets=
+ Name(
+ ctx=
+ Store(
+ ) # /Store
+ id=
+ 'i_indices', # str
+ ) # /Name
+ type_comment=
+ None, # NoneType
+ value=
Subscript(
ctx=
Load(
) # /Load
slice=
@@ -3043,265 +3079,422 @@
Name(
ctx=
Load(
) # /Load
id=
- 'i', # str
+ 's', # str
) # /Name
) # /Index
value=
Name(
ctx=
Load(
) # /Load
id=
- 'g_indptr', # str
+ 'g_indices', # str
) # /Name
) # /Subscript
+ ) # /Assign
+ Assign(
+ targets=
+ Name(
+ ctx=
+ Store(
+ ) # /Store
+ id=
+ 'i_data', # str
+ ) # /Name
+ type_comment=
+ None, # NoneType
+ value=
Subscript(
ctx=
Load(
) # /Load
slice=
Index(
value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 's', # str
+ ) # /Name
+ ) # /Index
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'g_data', # str
+ ) # /Name
+ ) # /Subscript
+ ) # /Assign
+ AugAssign(
+ op=
+ Add(
+ ) # /Add
+ target=
+ Name(
+ ctx=
+ Store(
+ ) # /Store
+ id=
+ 'total', # str
+ ) # /Name
+ value=
+ Call(
+ args=
+ BinOp(
+ left=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'i_data', # str
+ ) # /Name
+ op=
+ Mult(
+ ) # /Mult
+ right=
BinOp(
left=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'i', # str
- ) # /Name
- op=
- Add(
- ) # /Add
- right=
- Constant(
- value=
- 1, # int
- ) # /Constant
- ) # /BinOp
- ) # /Index
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'g_indptr', # str
- ) # /Name
- ) # /Subscript
- func=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'slice', # str
- ) # /Name
- keywords=
- ) # /Call
- ) # /Assign
- Assign(
- targets=
- Name(
- ctx=
- Store(
- ) # /Store
- id=
- 'i_indices', # str
- ) # /Name
- type_comment=
- None, # NoneType
- value=
- Subscript(
- ctx=
- Load(
- ) # /Load
- slice=
- Index(
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 's', # str
- ) # /Name
- ) # /Index
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'g_indices', # str
- ) # /Name
- ) # /Subscript
- ) # /Assign
- Assign(
- targets=
- Name(
- ctx=
- Store(
- ) # /Store
- id=
- 'i_data', # str
- ) # /Name
- type_comment=
- None, # NoneType
- value=
- Subscript(
- ctx=
- Load(
- ) # /Load
- slice=
- Index(
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 's', # str
- ) # /Name
- ) # /Index
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'g_data', # str
- ) # /Name
- ) # /Subscript
- ) # /Assign
- AugAssign(
- op=
- Add(
- ) # /Add
- target=
- Name(
- ctx=
- Store(
- ) # /Store
- id=
- 'total', # str
- ) # /Name
- value=
- Call(
- args=
- BinOp(
- left=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'i_data', # str
- ) # /Name
- op=
- Mult(
- ) # /Mult
- right=
- BinOp(
- left=
- BinOp(
- left=
- Subscript(
- ctx=
- Load(
- ) # /Load
- slice=
- Index(
+ BinOp(
+ left=
+ Subscript(
+ ctx=
+ Load(
+ ) # /Load
+ slice=
+ Index(
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'i', # str
+ ) # /Name
+ ) # /Index
value=
Name(
ctx=
Load(
) # /Load
id=
- 'i', # str
+ 'x', # str
) # /Name
- ) # /Index
+ ) # /Subscript
+ op=
+ Sub(
+ ) # /Sub
+ right=
+ Subscript(
+ ctx=
+ Load(
+ ) # /Load
+ slice=
+ Index(
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'i_indices', # str
+ ) # /Name
+ ) # /Index
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'x', # str
+ ) # /Name
+ ) # /Subscript
+ ) # /BinOp
+ op=
+ Pow(
+ ) # /Pow
+ right=
+ Constant(
value=
+ 2, # int
+ ) # /Constant
+ ) # /BinOp
+ ) # /BinOp
+ func=
+ Attribute(
+ attr=
+ 'sum', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'np', # str
+ ) # /Name
+ ) # /Attribute
+ keywords=
+ ) # /Call
+ ) # /AugAssign
+ iter=
+ Call(
+ args=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'N', # str
+ ) # /Name
+ func=
+ Attribute(
+ attr=
+ 'prange', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'numba', # str
+ ) # /Name
+ ) # /Attribute
+ keywords=
+ ) # /Call
+ orelse=
+ target=
+ Name(
+ ctx=
+ Store(
+ ) # /Store
+ id=
+ 'i', # str
+ ) # /Name
+ type_comment=
+ None, # NoneType
+ ) # /For
+ Assign(
+ targets=
+ Name(
+ ctx=
+ Store(
+ ) # /Store
+ id=
+ 'numer', # str
+ ) # /Name
+ type_comment=
+ None, # NoneType
+ value=
+ BinOp(
+ left=
+ BinOp(
+ left=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'N', # str
+ ) # /Name
+ op=
+ Sub(
+ ) # /Sub
+ right=
+ Constant(
+ value=
+ 1, # int
+ ) # /Constant
+ ) # /BinOp
+ op=
+ Mult(
+ ) # /Mult
+ right=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'total', # str
+ ) # /Name
+ ) # /BinOp
+ ) # /Assign
+ Assign(
+ targets=
+ Name(
+ ctx=
+ Store(
+ ) # /Store
+ id=
+ 'denom', # str
+ ) # /Name
+ type_comment=
+ None, # NoneType
+ value=
+ BinOp(
+ left=
+ BinOp(
+ left=
+ Constant(
+ value=
+ 2, # int
+ ) # /Constant
+ op=
+ Mult(
+ ) # /Mult
+ right=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'W', # str
+ ) # /Name
+ ) # /BinOp
+ op=
+ Mult(
+ ) # /Mult
+ right=
+ Call(
+ args=
+ func=
+ Attribute(
+ attr=
+ 'sum', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ BinOp(
+ left=
+ BinOp(
+ left=
Name(
ctx=
Load(
) # /Load
id=
'x', # str
) # /Name
- ) # /Subscript
- op=
- Sub(
- ) # /Sub
- right=
- Subscript(
- ctx=
- Load(
- ) # /Load
- slice=
- Index(
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'i_indices', # str
- ) # /Name
- ) # /Index
- value=
+ op=
+ Sub(
+ ) # /Sub
+ right=
Name(
ctx=
Load(
) # /Load
id=
- 'x', # str
+ 'x_bar', # str
) # /Name
- ) # /Subscript
+ ) # /BinOp
+ op=
+ Pow(
+ ) # /Pow
+ right=
+ Constant(
+ value=
+ 2, # int
+ ) # /Constant
) # /BinOp
- op=
- Pow(
- ) # /Pow
- right=
- Constant(
- value=
- 2, # int
- ) # /Constant
- ) # /BinOp
- ) # /BinOp
- func=
- Attribute(
- attr=
- 'sum', # str
- ctx=
- Load(
- ) # /Load
+ ) # /Attribute
+ keywords=
+ ) # /Call
+ ) # /BinOp
+ ) # /Assign
+ Assign(
+ targets=
+ Name(
+ ctx=
+ Store(
+ ) # /Store
+ id=
+ 'C', # str
+ ) # /Name
+ type_comment=
+ None, # NoneType
+ value=
+ BinOp(
+ left=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'numer', # str
+ ) # /Name
+ op=
+ Div(
+ ) # /Div
+ right=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'denom', # str
+ ) # /Name
+ ) # /BinOp
+ ) # /Assign
+ Assign(
+ targets=
+ Subscript(
+ ctx=
+ Store(
+ ) # /Store
+ slice=
+ Index(
value=
Name(
ctx=
Load(
) # /Load
id=
- 'np', # str
+ 'k', # str
) # /Name
- ) # /Attribute
- keywords=
- ) # /Call
- ) # /AugAssign
+ ) # /Index
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'out', # str
+ ) # /Name
+ ) # /Subscript
+ type_comment=
+ None, # NoneType
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'C', # str
+ ) # /Name
+ ) # /Assign
iter=
Call(
args=
Name(
ctx=
Load(
) # /Load
id=
- 'N', # str
+ 'M', # str
) # /Name
func=
Attribute(
attr=
'prange', # str
@@ -3324,228 +3517,32 @@
Name(
ctx=
Store(
) # /Store
id=
- 'i', # str
+ 'k', # str
) # /Name
type_comment=
None, # NoneType
) # /For
- Assign(
- targets=
- Name(
- ctx=
- Store(
- ) # /Store
- id=
- 'numer', # str
- ) # /Name
- type_comment=
- None, # NoneType
- value=
- BinOp(
- left=
- BinOp(
- left=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'N', # str
- ) # /Name
- op=
- Sub(
- ) # /Sub
- right=
- Constant(
- value=
- 1, # int
- ) # /Constant
- ) # /BinOp
- op=
- Mult(
- ) # /Mult
- right=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'total', # str
- ) # /Name
- ) # /BinOp
- ) # /Assign
- Assign(
- targets=
- Name(
- ctx=
- Store(
- ) # /Store
- id=
- 'denom', # str
- ) # /Name
- type_comment=
- None, # NoneType
- value=
- BinOp(
- left=
- BinOp(
- left=
- Constant(
- value=
- 2, # int
- ) # /Constant
- op=
- Mult(
- ) # /Mult
- right=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'W', # str
- ) # /Name
- ) # /BinOp
- op=
- Mult(
- ) # /Mult
- right=
- Call(
- args=
- func=
- Attribute(
- attr=
- 'sum', # str
- ctx=
- Load(
- ) # /Load
- value=
- BinOp(
- left=
- BinOp(
- left=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'x', # str
- ) # /Name
- op=
- Sub(
- ) # /Sub
- right=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'x_bar', # str
- ) # /Name
- ) # /BinOp
- op=
- Pow(
- ) # /Pow
- right=
- Constant(
- value=
- 2, # int
- ) # /Constant
- ) # /BinOp
- ) # /Attribute
- keywords=
- ) # /Call
- ) # /BinOp
- ) # /Assign
- Assign(
- targets=
- Name(
- ctx=
- Store(
- ) # /Store
- id=
- 'C', # str
- ) # /Name
- type_comment=
- None, # NoneType
- value=
- BinOp(
- left=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'numer', # str
- ) # /Name
- op=
- Div(
- ) # /Div
- right=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'denom', # str
- ) # /Name
- ) # /BinOp
- ) # /Assign
- Assign(
- targets=
- Subscript(
- ctx=
- Store(
- ) # /Store
- slice=
- Index(
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'k', # str
- ) # /Name
- ) # /Index
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'out', # str
- ) # /Name
- ) # /Subscript
- type_comment=
- None, # NoneType
+ Return(
value=
Name(
ctx=
Load(
) # /Load
id=
- 'C', # str
+ 'out', # str
) # /Name
- ) # /Assign
- iter=
+ ) # /Return
+ decorator_list=
Call(
args=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'M', # str
- ) # /Name
func=
Attribute(
attr=
- 'prange', # str
+ 'njit', # str
ctx=
Load(
) # /Load
value=
Name(
@@ -3555,283 +3552,90 @@
id=
'numba', # str
) # /Name
) # /Attribute
keywords=
+ keyword(
+ arg=
+ 'cache', # str
+ value=
+ Constant(
+ value=
+ True, # bool
+ ) # /Constant
+ ) # /keyword
+ keyword(
+ arg=
+ 'parallel', # str
+ value=
+ Constant(
+ value=
+ True, # bool
+ ) # /Constant
+ ) # /keyword
) # /Call
- orelse=
- target=
- Name(
- ctx=
- Store(
- ) # /Store
- id=
- 'k', # str
- ) # /Name
+ name=
+ '_gearys_c_mtx', # str
+ returns=
+ None, # NoneType
type_comment=
None, # NoneType
- ) # /For
- Return(
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'out', # str
- ) # /Name
- ) # /Return
- decorator_list=
- Call(
+ ) # /FunctionDef
+ FunctionDef(
args=
- func=
- Attribute(
- attr=
- 'njit', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'numba', # str
- ) # /Name
- ) # /Attribute
- keywords=
- keyword(
- arg=
- 'cache', # str
- value=
+ arguments(
+ args=
+ arg(
+ annotation=
+ None, # NoneType
+ arg=
+ 'g', # str
+ type_comment=
+ None, # NoneType
+ ) # /arg
+ arg(
+ annotation=
+ None, # NoneType
+ arg=
+ 'vals', # str
+ type_comment=
+ None, # NoneType
+ ) # /arg
+ defaults=
+ kw_defaults=
+ kwarg=
+ None, # NoneType
+ kwonlyargs=
+ vararg=
+ None, # NoneType
+ ) # /arguments
+ body=
+ Assert(
+ msg=
Constant(
value=
- True, # bool
+ '`g` should be a square adjacency matrix', # str
) # /Constant
- ) # /keyword
- keyword(
- arg=
- 'parallel', # str
- value=
- Constant(
- value=
- True, # bool
- ) # /Constant
- ) # /keyword
- ) # /Call
- name=
- '_gearys_c_mtx', # str
- returns=
- None, # NoneType
- type_comment=
- None, # NoneType
- ) # /FunctionDef
- FunctionDef(
- args=
- arguments(
- args=
- arg(
- annotation=
- None, # NoneType
- arg=
- 'g', # str
- type_comment=
- None, # NoneType
- ) # /arg
- arg(
- annotation=
- None, # NoneType
- arg=
- 'vals', # str
- type_comment=
- None, # NoneType
- ) # /arg
- defaults=
- kw_defaults=
- kwarg=
- None, # NoneType
- kwonlyargs=
- vararg=
- None, # NoneType
- ) # /arguments
- body=
- Assert(
- msg=
- Constant(
- value=
- '`g` should be a square adjacency matrix', # str
- ) # /Constant
- test=
- Compare(
- comparators=
- Subscript(
- ctx=
- Load(
- ) # /Load
- slice=
- Index(
- value=
- Constant(
- value=
- 1, # int
- ) # /Constant
- ) # /Index
- value=
- Attribute(
- attr=
- 'shape', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'g', # str
- ) # /Name
- ) # /Attribute
- ) # /Subscript
- left=
- Subscript(
- ctx=
- Load(
- ) # /Load
- slice=
- Index(
- value=
- Constant(
- value=
- 0, # int
- ) # /Constant
- ) # /Index
- value=
- Attribute(
- attr=
- 'shape', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'g', # str
- ) # /Name
- ) # /Attribute
- ) # /Subscript
- ops=
- Eq(
- ) # /Eq
- ) # /Compare
- ) # /Assert
- Assert(
- msg=
- None, # NoneType
- test=
- Compare(
- comparators=
- Subscript(
- ctx=
- Load(
- ) # /Load
- slice=
- Index(
- value=
- Constant(
- value=
- 1, # int
- ) # /Constant
- ) # /Index
- value=
- Attribute(
- attr=
- 'shape', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'vals', # str
- ) # /Name
- ) # /Attribute
- ) # /Subscript
- left=
- Subscript(
- ctx=
- Load(
- ) # /Load
- slice=
- Index(
- value=
- Constant(
- value=
- 0, # int
- ) # /Constant
- ) # /Index
- value=
- Attribute(
- attr=
- 'shape', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'g', # str
- ) # /Name
- ) # /Attribute
- ) # /Subscript
- ops=
- Eq(
- ) # /Eq
- ) # /Compare
- ) # /Assert
- Return(
- value=
- Call(
- args=
- Call(
- args=
- Attribute(
- attr=
- 'float_', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'np', # str
- ) # /Name
- ) # /Attribute
- func=
- Attribute(
- attr=
- 'astype', # str
- ctx=
- Load(
- ) # /Load
+ test=
+ Compare(
+ comparators=
+ Subscript(
+ ctx=
+ Load(
+ ) # /Load
+ slice=
+ Index(
+ value=
+ Constant(
+ value=
+ 1, # int
+ ) # /Constant
+ ) # /Index
value=
Attribute(
attr=
- 'data', # str
+ 'shape', # str
ctx=
Load(
) # /Load
value=
Name(
@@ -3840,478 +3644,46 @@
) # /Load
id=
'g', # str
) # /Name
) # /Attribute
- ) # /Attribute
- keywords=
- keyword(
- arg=
- 'copy', # str
- value=
- Constant(
- value=
- False, # bool
- ) # /Constant
- ) # /keyword
- ) # /Call
- Attribute(
- attr=
- 'indices', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'g', # str
- ) # /Name
- ) # /Attribute
- Attribute(
- attr=
- 'indptr', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'g', # str
- ) # /Name
- ) # /Attribute
- Call(
- args=
- Attribute(
- attr=
- 'float_', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'np', # str
- ) # /Name
- ) # /Attribute
- func=
- Attribute(
- attr=
- 'astype', # str
- ctx=
- Load(
- ) # /Load
+ ) # /Subscript
+ left=
+ Subscript(
+ ctx=
+ Load(
+ ) # /Load
+ slice=
+ Index(
+ value=
+ Constant(
+ value=
+ 0, # int
+ ) # /Constant
+ ) # /Index
value=
Attribute(
attr=
- 'data', # str
+ 'shape', # str
ctx=
Load(
) # /Load
value=
Name(
ctx=
Load(
) # /Load
id=
- 'vals', # str
+ 'g', # str
) # /Name
) # /Attribute
- ) # /Attribute
- keywords=
- keyword(
- arg=
- 'copy', # str
- value=
- Constant(
- value=
- False, # bool
- ) # /Constant
- ) # /keyword
- ) # /Call
- Attribute(
- attr=
- 'indices', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'vals', # str
- ) # /Name
- ) # /Attribute
- Attribute(
- attr=
- 'indptr', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'vals', # str
- ) # /Name
- ) # /Attribute
- Attribute(
- attr=
- 'shape', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'vals', # str
- ) # /Name
- ) # /Attribute
- func=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- '_gearys_c_mtx_csr', # str
- ) # /Name
- keywords=
- ) # /Call
- ) # /Return
- decorator_list=
- Call(
- args=
- Attribute(
- attr=
- 'csr_matrix', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'sparse', # str
- ) # /Name
- ) # /Attribute
- Attribute(
- attr=
- 'csr_matrix', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'sparse', # str
- ) # /Name
- ) # /Attribute
- func=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'dispatch', # str
- ) # /Name
- keywords=
- ) # /Call
- name=
- 'gearys_c', # str
- returns=
- Attribute(
- attr=
- 'ndarray', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'np', # str
- ) # /Name
- ) # /Attribute
- type_comment=
- None, # NoneType
- ) # /FunctionDef
- FunctionDef(
- args=
- arguments(
- args=
- arg(
- annotation=
- None, # NoneType
- arg=
- 'g', # str
- type_comment=
- None, # NoneType
- ) # /arg
- arg(
- annotation=
- None, # NoneType
- arg=
- 'vals', # str
- type_comment=
- None, # NoneType
- ) # /arg
- defaults=
- kw_defaults=
- kwarg=
- None, # NoneType
- kwonlyargs=
- vararg=
- None, # NoneType
- ) # /arguments
- body=
- Expr(
- value=
- Constant(
- value=
- " Params\n ------\n g\n Connectivity graph as a scipy sparse matrix. Should have shape:\n `(n_obs, n_obs)`.\n vals\n Values to calculate Geary's C for. If one dimensional, should have\n shape `(n_obs,)`. If two dimensional (i.e calculating Geary's C for\n multiple variables) should have shape `(n_vars, n_obs)`.\n ", # str
- ) # /Constant
- ) # /Expr
- Assert(
- msg=
- Constant(
- value=
- '`g` should be a square matrix.', # str
- ) # /Constant
- test=
- Compare(
- comparators=
- Subscript(
- ctx=
- Load(
- ) # /Load
- slice=
- Index(
- value=
- Constant(
- value=
- 1, # int
- ) # /Constant
- ) # /Index
- value=
- Attribute(
- attr=
- 'shape', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'g', # str
- ) # /Name
- ) # /Attribute
- ) # /Subscript
- left=
- Subscript(
- ctx=
- Load(
- ) # /Load
- slice=
- Index(
- value=
- Constant(
- value=
- 0, # int
- ) # /Constant
- ) # /Index
- value=
- Attribute(
- attr=
- 'shape', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'g', # str
- ) # /Name
- ) # /Attribute
- ) # /Subscript
- ops=
- Eq(
- ) # /Eq
- ) # /Compare
- ) # /Assert
- If(
- body=
- Assign(
- targets=
- Name(
- ctx=
- Store(
- ) # /Store
- id=
- 'g', # str
- ) # /Name
- type_comment=
- None, # NoneType
- value=
- Call(
- args=
- func=
- Attribute(
- attr=
- 'tocsr', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'g', # str
- ) # /Name
- ) # /Attribute
- keywords=
- ) # /Call
- ) # /Assign
- orelse=
- test=
- UnaryOp(
- op=
- Not(
- ) # /Not
- operand=
- Call(
- args=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'g', # str
- ) # /Name
- Attribute(
- attr=
- 'csr_matrix', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'sparse', # str
- ) # /Name
- ) # /Attribute
- func=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'isinstance', # str
- ) # /Name
- keywords=
- ) # /Call
- ) # /UnaryOp
- ) # /If
- Assign(
- targets=
- Name(
- ctx=
- Store(
- ) # /Store
- id=
- 'g_data', # str
- ) # /Name
- type_comment=
- None, # NoneType
- value=
- Call(
- args=
- Attribute(
- attr=
- 'float_', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'np', # str
- ) # /Name
- ) # /Attribute
- func=
- Attribute(
- attr=
- 'astype', # str
- ctx=
- Load(
- ) # /Load
- value=
- Attribute(
- attr=
- 'data', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'g', # str
- ) # /Name
- ) # /Attribute
- ) # /Attribute
- keywords=
- keyword(
- arg=
- 'copy', # str
- value=
- Constant(
- value=
- False, # bool
- ) # /Constant
- ) # /keyword
- ) # /Call
- ) # /Assign
- If(
- body=
+ ) # /Subscript
+ ops=
+ Eq(
+ ) # /Eq
+ ) # /Compare
+ ) # /Assert
Assert(
msg=
None, # NoneType
test=
Compare(
@@ -4323,11 +3695,11 @@
slice=
Index(
value=
Constant(
value=
- 0, # int
+ 1, # int
) # /Constant
) # /Index
value=
Attribute(
attr=
@@ -4382,17 +3754,62 @@
) # /Assert
Return(
value=
Call(
args=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'g_data', # str
- ) # /Name
+ Call(
+ args=
+ Attribute(
+ attr=
+ 'float_', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'np', # str
+ ) # /Name
+ ) # /Attribute
+ func=
+ Attribute(
+ attr=
+ 'astype', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Attribute(
+ attr=
+ 'data', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'g', # str
+ ) # /Name
+ ) # /Attribute
+ ) # /Attribute
+ keywords=
+ keyword(
+ arg=
+ 'copy', # str
+ value=
+ Constant(
+ value=
+ False, # bool
+ ) # /Constant
+ ) # /keyword
+ ) # /Call
Attribute(
attr=
'indices', # str
ctx=
Load(
@@ -4419,29 +3836,434 @@
) # /Load
id=
'g', # str
) # /Name
) # /Attribute
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'vals', # str
- ) # /Name
+ Call(
+ args=
+ Attribute(
+ attr=
+ 'float_', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'np', # str
+ ) # /Name
+ ) # /Attribute
+ func=
+ Attribute(
+ attr=
+ 'astype', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Attribute(
+ attr=
+ 'data', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'vals', # str
+ ) # /Name
+ ) # /Attribute
+ ) # /Attribute
+ keywords=
+ keyword(
+ arg=
+ 'copy', # str
+ value=
+ Constant(
+ value=
+ False, # bool
+ ) # /Constant
+ ) # /keyword
+ ) # /Call
+ Attribute(
+ attr=
+ 'indices', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'vals', # str
+ ) # /Name
+ ) # /Attribute
+ Attribute(
+ attr=
+ 'indptr', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'vals', # str
+ ) # /Name
+ ) # /Attribute
+ Attribute(
+ attr=
+ 'shape', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'vals', # str
+ ) # /Name
+ ) # /Attribute
func=
Name(
ctx=
Load(
) # /Load
id=
- '_gearys_c_vec', # str
+ '_gearys_c_mtx_csr', # str
) # /Name
keywords=
) # /Call
) # /Return
- orelse=
+ decorator_list=
+ Call(
+ args=
+ Attribute(
+ attr=
+ 'csr_matrix', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'sparse', # str
+ ) # /Name
+ ) # /Attribute
+ Attribute(
+ attr=
+ 'csr_matrix', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'sparse', # str
+ ) # /Name
+ ) # /Attribute
+ func=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'dispatch', # str
+ ) # /Name
+ keywords=
+ ) # /Call
+ name=
+ 'gearys_c', # str
+ returns=
+ Attribute(
+ attr=
+ 'ndarray', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'np', # str
+ ) # /Name
+ ) # /Attribute
+ type_comment=
+ None, # NoneType
+ ) # /FunctionDef
+ FunctionDef(
+ args=
+ arguments(
+ args=
+ arg(
+ annotation=
+ None, # NoneType
+ arg=
+ 'g', # str
+ type_comment=
+ None, # NoneType
+ ) # /arg
+ arg(
+ annotation=
+ None, # NoneType
+ arg=
+ 'vals', # str
+ type_comment=
+ None, # NoneType
+ ) # /arg
+ defaults=
+ kw_defaults=
+ kwarg=
+ None, # NoneType
+ kwonlyargs=
+ vararg=
+ None, # NoneType
+ ) # /arguments
+ body=
+ Expr(
+ value=
+ Constant(
+ value=
+ " Params\n ------\n g\n Connectivity graph as a scipy sparse matrix. Should have shape:\n `(n_obs, n_obs)`.\n vals\n Values to calculate Geary's C for. If one dimensional, should have\n shape `(n_obs,)`. If two dimensional (i.e calculating Geary's C for\n multiple variables) should have shape `(n_vars, n_obs)`.\n ", # str
+ ) # /Constant
+ ) # /Expr
+ Assert(
+ msg=
+ Constant(
+ value=
+ '`g` should be a square matrix.', # str
+ ) # /Constant
+ test=
+ Compare(
+ comparators=
+ Subscript(
+ ctx=
+ Load(
+ ) # /Load
+ slice=
+ Index(
+ value=
+ Constant(
+ value=
+ 1, # int
+ ) # /Constant
+ ) # /Index
+ value=
+ Attribute(
+ attr=
+ 'shape', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'g', # str
+ ) # /Name
+ ) # /Attribute
+ ) # /Subscript
+ left=
+ Subscript(
+ ctx=
+ Load(
+ ) # /Load
+ slice=
+ Index(
+ value=
+ Constant(
+ value=
+ 0, # int
+ ) # /Constant
+ ) # /Index
+ value=
+ Attribute(
+ attr=
+ 'shape', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'g', # str
+ ) # /Name
+ ) # /Attribute
+ ) # /Subscript
+ ops=
+ Eq(
+ ) # /Eq
+ ) # /Compare
+ ) # /Assert
+ If(
+ body=
+ Assign(
+ targets=
+ Name(
+ ctx=
+ Store(
+ ) # /Store
+ id=
+ 'g', # str
+ ) # /Name
+ type_comment=
+ None, # NoneType
+ value=
+ Call(
+ args=
+ func=
+ Attribute(
+ attr=
+ 'tocsr', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'g', # str
+ ) # /Name
+ ) # /Attribute
+ keywords=
+ ) # /Call
+ ) # /Assign
+ orelse=
+ test=
+ UnaryOp(
+ op=
+ Not(
+ ) # /Not
+ operand=
+ Call(
+ args=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'g', # str
+ ) # /Name
+ Attribute(
+ attr=
+ 'csr_matrix', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'sparse', # str
+ ) # /Name
+ ) # /Attribute
+ func=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'isinstance', # str
+ ) # /Name
+ keywords=
+ ) # /Call
+ ) # /UnaryOp
+ ) # /If
+ Assign(
+ targets=
+ Name(
+ ctx=
+ Store(
+ ) # /Store
+ id=
+ 'g_data', # str
+ ) # /Name
+ type_comment=
+ None, # NoneType
+ value=
+ Call(
+ args=
+ Attribute(
+ attr=
+ 'float_', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'np', # str
+ ) # /Name
+ ) # /Attribute
+ func=
+ Attribute(
+ attr=
+ 'astype', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Attribute(
+ attr=
+ 'data', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'g', # str
+ ) # /Name
+ ) # /Attribute
+ ) # /Attribute
+ keywords=
+ keyword(
+ arg=
+ 'copy', # str
+ value=
+ Constant(
+ value=
+ False, # bool
+ ) # /Constant
+ ) # /keyword
+ ) # /Call
+ ) # /Assign
If(
body=
Assert(
msg=
None, # NoneType
@@ -4455,11 +4277,11 @@
slice=
Index(
value=
Constant(
value=
- 1, # int
+ 0, # int
) # /Constant
) # /Index
value=
Attribute(
attr=
@@ -4564,15 +4386,1171 @@
Name(
ctx=
Load(
) # /Load
id=
- '_gearys_c_mtx', # str
+ '_gearys_c_vec', # str
) # /Name
keywords=
) # /Call
) # /Return
+ orelse=
+ If(
+ body=
+ Assert(
+ msg=
+ None, # NoneType
+ test=
+ Compare(
+ comparators=
+ Subscript(
+ ctx=
+ Load(
+ ) # /Load
+ slice=
+ Index(
+ value=
+ Constant(
+ value=
+ 1, # int
+ ) # /Constant
+ ) # /Index
+ value=
+ Attribute(
+ attr=
+ 'shape', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'vals', # str
+ ) # /Name
+ ) # /Attribute
+ ) # /Subscript
+ left=
+ Subscript(
+ ctx=
+ Load(
+ ) # /Load
+ slice=
+ Index(
+ value=
+ Constant(
+ value=
+ 0, # int
+ ) # /Constant
+ ) # /Index
+ value=
+ Attribute(
+ attr=
+ 'shape', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'g', # str
+ ) # /Name
+ ) # /Attribute
+ ) # /Subscript
+ ops=
+ Eq(
+ ) # /Eq
+ ) # /Compare
+ ) # /Assert
+ Return(
+ value=
+ Call(
+ args=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'g_data', # str
+ ) # /Name
+ Attribute(
+ attr=
+ 'indices', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'g', # str
+ ) # /Name
+ ) # /Attribute
+ Attribute(
+ attr=
+ 'indptr', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'g', # str
+ ) # /Name
+ ) # /Attribute
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'vals', # str
+ ) # /Name
+ func=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ '_gearys_c_mtx', # str
+ ) # /Name
+ keywords=
+ ) # /Call
+ ) # /Return
+ orelse=
+ Raise(
+ cause=
+ None, # NoneType
+ exc=
+ Call(
+ args=
+ func=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'ValueError', # str
+ ) # /Name
+ keywords=
+ ) # /Call
+ ) # /Raise
+ test=
+ Compare(
+ comparators=
+ Constant(
+ value=
+ 2, # int
+ ) # /Constant
+ left=
+ Attribute(
+ attr=
+ 'ndim', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'vals', # str
+ ) # /Name
+ ) # /Attribute
+ ops=
+ Eq(
+ ) # /Eq
+ ) # /Compare
+ ) # /If
+ test=
+ Compare(
+ comparators=
+ Constant(
+ value=
+ 1, # int
+ ) # /Constant
+ left=
+ Attribute(
+ attr=
+ 'ndim', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'vals', # str
+ ) # /Name
+ ) # /Attribute
+ ops=
+ Eq(
+ ) # /Eq
+ ) # /Compare
+ ) # /If
+ decorator_list=
+ Call(
+ args=
+ Attribute(
+ attr=
+ 'spmatrix', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'sparse', # str
+ ) # /Name
+ ) # /Attribute
+ Attribute(
+ attr=
+ 'ndarray', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'np', # str
+ ) # /Name
+ ) # /Attribute
+ func=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'dispatch', # str
+ ) # /Name
+ keywords=
+ ) # /Call
+ name=
+ 'gearys_c', # str
+ returns=
+ None, # NoneType
+ type_comment=
+ None, # NoneType
+ ) # /FunctionDef
+ FunctionDef(
+ args=
+ arguments(
+ args=
+ arg(
+ annotation=
+ None, # NoneType
+ arg=
+ 'g', # str
+ type_comment=
+ None, # NoneType
+ ) # /arg
+ arg(
+ annotation=
+ None, # NoneType
+ arg=
+ 'vals', # str
+ type_comment=
+ None, # NoneType
+ ) # /arg
+ defaults=
+ kw_defaults=
+ kwarg=
+ None, # NoneType
+ kwonlyargs=
+ vararg=
+ None, # NoneType
+ ) # /arguments
+ body=
+ Return(
+ value=
+ Call(
+ args=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'g', # str
+ ) # /Name
+ Attribute(
+ attr=
+ 'values', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'vals', # str
+ ) # /Name
+ ) # /Attribute
+ func=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'gearys_c', # str
+ ) # /Name
+ keywords=
+ ) # /Call
+ ) # /Return
+ decorator_list=
+ Call(
+ args=
+ Attribute(
+ attr=
+ 'spmatrix', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'sparse', # str
+ ) # /Name
+ ) # /Attribute
+ Tuple(
+ ctx=
+ Load(
+ ) # /Load
+ elts=
+ Attribute(
+ attr=
+ 'DataFrame', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'pd', # str
+ ) # /Name
+ ) # /Attribute
+ Attribute(
+ attr=
+ 'Series', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'pd', # str
+ ) # /Name
+ ) # /Attribute
+ ) # /Tuple
+ func=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'dispatch', # str
+ ) # /Name
+ keywords=
+ ) # /Call
+ name=
+ 'gearys_c', # str
+ returns=
+ None, # NoneType
+ type_comment=
+ None, # NoneType
+ ) # /FunctionDef
+ FunctionDef(
+ args=
+ arguments(
+ args=
+ arg(
+ annotation=
+ None, # NoneType
+ arg=
+ 'g', # str
+ type_comment=
+ None, # NoneType
+ ) # /arg
+ arg(
+ annotation=
+ None, # NoneType
+ arg=
+ 'vals', # str
+ type_comment=
+ None, # NoneType
+ ) # /arg
+ defaults=
+ kw_defaults=
+ kwarg=
+ None, # NoneType
+ kwonlyargs=
+ vararg=
+ None, # NoneType
+ ) # /arguments
+ body=
+ If(
+ body=
+ Assign(
+ targets=
+ Name(
+ ctx=
+ Store(
+ ) # /Store
+ id=
+ 'g', # str
+ ) # /Name
+ type_comment=
+ None, # NoneType
+ value=
+ Call(
+ args=
+ func=
+ Attribute(
+ attr=
+ 'tocsr', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'g', # str
+ ) # /Name
+ ) # /Attribute
+ keywords=
+ ) # /Call
+ ) # /Assign
+ orelse=
+ test=
+ UnaryOp(
+ op=
+ Not(
+ ) # /Not
+ operand=
+ Call(
+ args=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'g', # str
+ ) # /Name
+ Attribute(
+ attr=
+ 'csr_matrix', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'sparse', # str
+ ) # /Name
+ ) # /Attribute
+ func=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'isinstance', # str
+ ) # /Name
+ keywords=
+ ) # /Call
+ ) # /UnaryOp
+ ) # /If
+ If(
+ body=
+ Assign(
+ targets=
+ Name(
+ ctx=
+ Store(
+ ) # /Store
+ id=
+ 'vals', # str
+ ) # /Name
+ type_comment=
+ None, # NoneType
+ value=
+ Call(
+ args=
+ func=
+ Attribute(
+ attr=
+ 'tocsr', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'vals', # str
+ ) # /Name
+ ) # /Attribute
+ keywords=
+ ) # /Call
+ ) # /Assign
+ orelse=
+ test=
+ UnaryOp(
+ op=
+ Not(
+ ) # /Not
+ operand=
+ Call(
+ args=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'vals', # str
+ ) # /Name
+ Attribute(
+ attr=
+ 'csr_matrix', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'sparse', # str
+ ) # /Name
+ ) # /Attribute
+ func=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'isinstance', # str
+ ) # /Name
+ keywords=
+ ) # /Call
+ ) # /UnaryOp
+ ) # /If
+ Return(
+ value=
+ Call(
+ args=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'g', # str
+ ) # /Name
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'vals', # str
+ ) # /Name
+ func=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'gearys_c', # str
+ ) # /Name
+ keywords=
+ ) # /Call
+ ) # /Return
+ decorator_list=
+ Call(
+ args=
+ Attribute(
+ attr=
+ 'spmatrix', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'sparse', # str
+ ) # /Name
+ ) # /Attribute
+ Attribute(
+ attr=
+ 'spmatrix', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'sparse', # str
+ ) # /Name
+ ) # /Attribute
+ func=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'dispatch', # str
+ ) # /Name
+ keywords=
+ ) # /Call
+ name=
+ 'gearys_c', # str
+ returns=
+ Attribute(
+ attr=
+ 'ndarray', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'np', # str
+ ) # /Name
+ ) # /Attribute
+ type_comment=
+ None, # NoneType
+ ) # /FunctionDef
+ FunctionDef(
+ args=
+ arguments(
+ args=
+ arg(
+ annotation=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'AnnData', # str
+ ) # /Name
+ arg=
+ 'adata', # str
+ type_comment=
+ None, # NoneType
+ ) # /arg
+ defaults=
+ kw_defaults=
+ Constant(
+ value=
+ None, # NoneType
+ ) # /Constant
+ Constant(
+ value=
+ None, # NoneType
+ ) # /Constant
+ Constant(
+ value=
+ None, # NoneType
+ ) # /Constant
+ Constant(
+ value=
+ None, # NoneType
+ ) # /Constant
+ Constant(
+ value=
+ None, # NoneType
+ ) # /Constant
+ Constant(
+ value=
+ False, # bool
+ ) # /Constant
+ kwarg=
+ None, # NoneType
+ kwonlyargs=
+ arg(
+ annotation=
+ Subscript(
+ ctx=
+ Load(
+ ) # /Load
+ slice=
+ Index(
+ value=
+ Subscript(
+ ctx=
+ Load(
+ ) # /Load
+ slice=
+ Index(
+ value=
+ Tuple(
+ ctx=
+ Load(
+ ) # /Load
+ elts=
+ Attribute(
+ attr=
+ 'ndarray', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'np', # str
+ ) # /Name
+ ) # /Attribute
+ Attribute(
+ attr=
+ 'spmatrix', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'sparse', # str
+ ) # /Name
+ ) # /Attribute
+ ) # /Tuple
+ ) # /Index
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'Union', # str
+ ) # /Name
+ ) # /Subscript
+ ) # /Index
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'Optional', # str
+ ) # /Name
+ ) # /Subscript
+ arg=
+ 'vals', # str
+ type_comment=
+ None, # NoneType
+ ) # /arg
+ arg(
+ annotation=
+ Subscript(
+ ctx=
+ Load(
+ ) # /Load
+ slice=
+ Index(
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'str', # str
+ ) # /Name
+ ) # /Index
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'Optional', # str
+ ) # /Name
+ ) # /Subscript
+ arg=
+ 'use_graph', # str
+ type_comment=
+ None, # NoneType
+ ) # /arg
+ arg(
+ annotation=
+ Subscript(
+ ctx=
+ Load(
+ ) # /Load
+ slice=
+ Index(
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'str', # str
+ ) # /Name
+ ) # /Index
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'Optional', # str
+ ) # /Name
+ ) # /Subscript
+ arg=
+ 'layer', # str
+ type_comment=
+ None, # NoneType
+ ) # /arg
+ arg(
+ annotation=
+ Subscript(
+ ctx=
+ Load(
+ ) # /Load
+ slice=
+ Index(
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'str', # str
+ ) # /Name
+ ) # /Index
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'Optional', # str
+ ) # /Name
+ ) # /Subscript
+ arg=
+ 'obsm', # str
+ type_comment=
+ None, # NoneType
+ ) # /arg
+ arg(
+ annotation=
+ Subscript(
+ ctx=
+ Load(
+ ) # /Load
+ slice=
+ Index(
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'str', # str
+ ) # /Name
+ ) # /Index
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'Optional', # str
+ ) # /Name
+ ) # /Subscript
+ arg=
+ 'obsp', # str
+ type_comment=
+ None, # NoneType
+ ) # /arg
+ arg(
+ annotation=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'bool', # str
+ ) # /Name
+ arg=
+ 'use_raw', # str
+ type_comment=
+ None, # NoneType
+ ) # /arg
+ vararg=
+ None, # NoneType
+ ) # /arguments
+ body=
+ Expr(
+ value=
+ Constant(
+ value=
+ " Calculate `Geary's C` <https://en.wikipedia.org/wiki/Geary's_C>`_, as used\n by `VISION <https://doi.org/10.1038/s41467-019-12235-0>`_.\n\n Geary's C is a measure of autocorrelation for some measure on a graph. This\n can be to whether measures are correlated between neighboring cells. Lower\n values indicate greater correlation.\n\n ..math\n\n C =\n \x0crac{\n (N - 1)\\sum_{i,j} w_{i,j} (x_i - x_j)^2\n }{\n 2W \\sum_i (x_i - \x08ar{x})^2\n }\n\n Params\n ------\n adata\n vals\n Values to calculate Geary's C for. If this is two dimensional, should\n be of shape `(n_features, n_cells)`. Otherwise should be of shape\n `(n_cells,)`. This matrix can be selected from elements of the anndata\n object by using key word arguments: `layer`, `obsm`, `obsp`, or\n `use_raw`.\n use_graph\n Key to use for graph in anndata object. If not provided, default\n neighbors connectivities will be used instead.\n layer\n Key for `adata.layers` to choose `vals`.\n obsm\n Key for `adata.obsm` to choose `vals`.\n obsp\n Key for `adata.obsp` to choose `vals`.\n use_raw\n Whether to use `adata.raw.X` for `vals`.\n\n Returns\n -------\n If vals is two dimensional, returns a 1 dimensional ndarray array. Returns\n a scalar if `vals` is 1d.\n ", # str
+ ) # /Constant
+ ) # /Expr
+ If(
+ body=
+ If(
+ body=
+ Assign(
+ targets=
+ Name(
+ ctx=
+ Store(
+ ) # /Store
+ id=
+ 'g', # str
+ ) # /Name
+ type_comment=
+ None, # NoneType
+ value=
+ Subscript(
+ ctx=
+ Load(
+ ) # /Load
+ slice=
+ Index(
+ value=
+ Constant(
+ value=
+ 'connectivities', # str
+ ) # /Constant
+ ) # /Index
+ value=
+ Attribute(
+ attr=
+ 'obsp', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'adata', # str
+ ) # /Name
+ ) # /Attribute
+ ) # /Subscript
+ ) # /Assign
+ orelse=
+ If(
+ body=
+ Assign(
+ targets=
+ Name(
+ ctx=
+ Store(
+ ) # /Store
+ id=
+ 'g', # str
+ ) # /Name
+ type_comment=
+ None, # NoneType
+ value=
+ Subscript(
+ ctx=
+ Load(
+ ) # /Load
+ slice=
+ Index(
+ value=
+ Constant(
+ value=
+ 'connectivities', # str
+ ) # /Constant
+ ) # /Index
+ value=
+ Subscript(
+ ctx=
+ Load(
+ ) # /Load
+ slice=
+ Index(
+ value=
+ Constant(
+ value=
+ 'neighbors', # str
+ ) # /Constant
+ ) # /Index
+ value=
+ Attribute(
+ attr=
+ 'uns', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'adata', # str
+ ) # /Name
+ ) # /Attribute
+ ) # /Subscript
+ ) # /Subscript
+ ) # /Assign
+ orelse=
+ Raise(
+ cause=
+ None, # NoneType
+ exc=
+ Call(
+ args=
+ Constant(
+ value=
+ 'Must run neighbors first.', # str
+ ) # /Constant
+ func=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'ValueError', # str
+ ) # /Name
+ keywords=
+ ) # /Call
+ ) # /Raise
+ test=
+ Compare(
+ comparators=
+ Attribute(
+ attr=
+ 'uns', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'adata', # str
+ ) # /Name
+ ) # /Attribute
+ left=
+ Constant(
+ value=
+ 'neighbors', # str
+ ) # /Constant
+ ops=
+ In(
+ ) # /In
+ ) # /Compare
+ ) # /If
+ test=
+ BoolOp(
+ op=
+ And(
+ ) # /And
+ values=
+ Call(
+ args=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'adata', # str
+ ) # /Name
+ Constant(
+ value=
+ 'obsp', # str
+ ) # /Constant
+ func=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'hasattr', # str
+ ) # /Name
+ keywords=
+ ) # /Call
+ Compare(
+ comparators=
+ Attribute(
+ attr=
+ 'obsp', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'adata', # str
+ ) # /Name
+ ) # /Attribute
+ left=
+ Constant(
+ value=
+ 'connectivities', # str
+ ) # /Constant
+ ops=
+ In(
+ ) # /In
+ ) # /Compare
+ ) # /BoolOp
+ ) # /If
orelse=
Raise(
cause=
None, # NoneType
exc=
@@ -4582,1267 +5560,289 @@
Name(
ctx=
Load(
) # /Load
id=
- 'ValueError', # str
+ 'NotImplementedError', # str
) # /Name
keywords=
) # /Call
) # /Raise
test=
Compare(
comparators=
Constant(
value=
- 2, # int
+ None, # NoneType
) # /Constant
left=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'use_graph', # str
+ ) # /Name
+ ops=
+ Is(
+ ) # /Is
+ ) # /Compare
+ ) # /If
+ If(
+ body=
+ Assign(
+ targets=
+ Name(
+ ctx=
+ Store(
+ ) # /Store
+ id=
+ 'vals', # str
+ ) # /Name
+ type_comment=
+ None, # NoneType
+ value=
Attribute(
attr=
- 'ndim', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'vals', # str
- ) # /Name
+ 'T', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Call(
+ args=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'adata', # str
+ ) # /Name
+ func=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ '_choose_obs_rep', # str
+ ) # /Name
+ keywords=
+ keyword(
+ arg=
+ 'use_raw', # str
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'use_raw', # str
+ ) # /Name
+ ) # /keyword
+ keyword(
+ arg=
+ 'layer', # str
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'layer', # str
+ ) # /Name
+ ) # /keyword
+ keyword(
+ arg=
+ 'obsm', # str
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'obsm', # str
+ ) # /Name
+ ) # /keyword
+ keyword(
+ arg=
+ 'obsp', # str
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'obsp', # str
+ ) # /Name
+ ) # /keyword
+ ) # /Call
) # /Attribute
+ ) # /Assign
+ orelse=
+ test=
+ Compare(
+ comparators=
+ Constant(
+ value=
+ None, # NoneType
+ ) # /Constant
+ left=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'vals', # str
+ ) # /Name
ops=
- Eq(
- ) # /Eq
+ Is(
+ ) # /Is
) # /Compare
) # /If
- test=
- Compare(
- comparators=
- Constant(
- value=
- 1, # int
- ) # /Constant
- left=
- Attribute(
- attr=
- 'ndim', # str
+ Return(
+ value=
+ Call(
+ args=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'g', # str
+ ) # /Name
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'vals', # str
+ ) # /Name
+ func=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'gearys_c', # str
+ ) # /Name
+ keywords=
+ ) # /Call
+ ) # /Return
+ decorator_list=
+ Call(
+ args=
+ Name(
ctx=
Load(
) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'vals', # str
- ) # /Name
- ) # /Attribute
- ops=
- Eq(
- ) # /Eq
- ) # /Compare
- ) # /If
+ id=
+ 'AnnData', # str
+ ) # /Name
+ func=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'dispatch', # str
+ ) # /Name
+ keywords=
+ ) # /Call
+ name=
+ 'gearys_c', # str
+ returns=
+ Subscript(
+ ctx=
+ Load(
+ ) # /Load
+ slice=
+ Index(
+ value=
+ Tuple(
+ ctx=
+ Load(
+ ) # /Load
+ elts=
+ Attribute(
+ attr=
+ 'ndarray', # str
+ ctx=
+ Load(
+ ) # /Load
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'np', # str
+ ) # /Name
+ ) # /Attribute
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'float', # str
+ ) # /Name
+ ) # /Tuple
+ ) # /Index
+ value=
+ Name(
+ ctx=
+ Load(
+ ) # /Load
+ id=
+ 'Union', # str
+ ) # /Name
+ ) # /Subscript
+ type_comment=
+ None, # NoneType
+ ) # /FunctionDef
decorator_list=
Call(
args=
+ func=
Attribute(
attr=
- 'spmatrix', # str
+ 'njit', # str
ctx=
Load(
) # /Load
value=
Name(
ctx=
Load(
) # /Load
id=
- 'sparse', # str
+ 'numba', # str
) # /Name
) # /Attribute
- Attribute(
- attr=
- 'ndarray', # str
- ctx=
- Load(
- ) # /Load
+ keywords=
+ keyword(
+ arg=
+ 'cache', # str
value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'np', # str
- ) # /Name
- ) # /Attribute
- func=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'dispatch', # str
- ) # /Name
- keywords=
+ Constant(
+ value=
+ True, # bool
+ ) # /Constant
+ ) # /keyword
+ keyword(
+ arg=
+ 'parallel', # str
+ value=
+ Constant(
+ value=
+ True, # bool
+ ) # /Constant
+ ) # /keyword
) # /Call
name=
- 'gearys_c', # str
+ '_gearys_c_mtx_csr', # str
returns=
None, # NoneType
type_comment=
None, # NoneType
) # /FunctionDef
- FunctionDef(
- args=
- arguments(
- args=
- arg(
- annotation=
- None, # NoneType
- arg=
- 'g', # str
- type_comment=
- None, # NoneType
- ) # /arg
- arg(
- annotation=
- None, # NoneType
- arg=
- 'vals', # str
- type_comment=
- None, # NoneType
- ) # /arg
- defaults=
- kw_defaults=
- kwarg=
- None, # NoneType
- kwonlyargs=
- vararg=
- None, # NoneType
- ) # /arguments
- body=
- Return(
- value=
- Call(
- args=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'g', # str
- ) # /Name
- Attribute(
- attr=
- 'values', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'vals', # str
- ) # /Name
- ) # /Attribute
- func=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'gearys_c', # str
- ) # /Name
- keywords=
- ) # /Call
- ) # /Return
- decorator_list=
- Call(
- args=
- Attribute(
- attr=
- 'spmatrix', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'sparse', # str
- ) # /Name
- ) # /Attribute
- Tuple(
- ctx=
- Load(
- ) # /Load
- elts=
- Attribute(
- attr=
- 'DataFrame', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'pd', # str
- ) # /Name
- ) # /Attribute
- Attribute(
- attr=
- 'Series', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'pd', # str
- ) # /Name
- ) # /Attribute
- ) # /Tuple
- func=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'dispatch', # str
- ) # /Name
- keywords=
- ) # /Call
- name=
- 'gearys_c', # str
- returns=
- None, # NoneType
- type_comment=
- None, # NoneType
- ) # /FunctionDef
- FunctionDef(
- args=
- arguments(
- args=
- arg(
- annotation=
- None, # NoneType
- arg=
- 'g', # str
- type_comment=
- None, # NoneType
- ) # /arg
- arg(
- annotation=
- None, # NoneType
- arg=
- 'vals', # str
- type_comment=
- None, # NoneType
- ) # /arg
- defaults=
- kw_defaults=
- kwarg=
- None, # NoneType
- kwonlyargs=
- vararg=
- None, # NoneType
- ) # /arguments
- body=
- If(
- body=
- Assign(
- targets=
- Name(
- ctx=
- Store(
- ) # /Store
- id=
- 'g', # str
- ) # /Name
- type_comment=
- None, # NoneType
- value=
- Call(
- args=
- func=
- Attribute(
- attr=
- 'tocsr', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'g', # str
- ) # /Name
- ) # /Attribute
- keywords=
- ) # /Call
- ) # /Assign
- orelse=
- test=
- UnaryOp(
- op=
- Not(
- ) # /Not
- operand=
- Call(
- args=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'g', # str
- ) # /Name
- Attribute(
- attr=
- 'csr_matrix', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'sparse', # str
- ) # /Name
- ) # /Attribute
- func=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'isinstance', # str
- ) # /Name
- keywords=
- ) # /Call
- ) # /UnaryOp
- ) # /If
- If(
- body=
- Assign(
- targets=
- Name(
- ctx=
- Store(
- ) # /Store
- id=
- 'vals', # str
- ) # /Name
- type_comment=
- None, # NoneType
- value=
- Call(
- args=
- func=
- Attribute(
- attr=
- 'tocsr', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'vals', # str
- ) # /Name
- ) # /Attribute
- keywords=
- ) # /Call
- ) # /Assign
- orelse=
- test=
- UnaryOp(
- op=
- Not(
- ) # /Not
- operand=
- Call(
- args=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'vals', # str
- ) # /Name
- Attribute(
- attr=
- 'csr_matrix', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'sparse', # str
- ) # /Name
- ) # /Attribute
- func=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'isinstance', # str
- ) # /Name
- keywords=
- ) # /Call
- ) # /UnaryOp
- ) # /If
- Return(
- value=
- Call(
- args=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'g', # str
- ) # /Name
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'vals', # str
- ) # /Name
- func=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'gearys_c', # str
- ) # /Name
- keywords=
- ) # /Call
- ) # /Return
- decorator_list=
- Call(
- args=
- Attribute(
- attr=
- 'spmatrix', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'sparse', # str
- ) # /Name
- ) # /Attribute
- Attribute(
- attr=
- 'spmatrix', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'sparse', # str
- ) # /Name
- ) # /Attribute
- func=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'dispatch', # str
- ) # /Name
- keywords=
- ) # /Call
- name=
- 'gearys_c', # str
- returns=
- Attribute(
- attr=
- 'ndarray', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'np', # str
- ) # /Name
- ) # /Attribute
- type_comment=
- None, # NoneType
- ) # /FunctionDef
- FunctionDef(
- args=
- arguments(
- args=
- arg(
- annotation=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'AnnData', # str
- ) # /Name
- arg=
- 'adata', # str
- type_comment=
- None, # NoneType
- ) # /arg
- defaults=
- kw_defaults=
- Constant(
- value=
- None, # NoneType
- ) # /Constant
- Constant(
- value=
- None, # NoneType
- ) # /Constant
- Constant(
- value=
- None, # NoneType
- ) # /Constant
- Constant(
- value=
- None, # NoneType
- ) # /Constant
- Constant(
- value=
- None, # NoneType
- ) # /Constant
- Constant(
- value=
- False, # bool
- ) # /Constant
- kwarg=
- None, # NoneType
- kwonlyargs=
- arg(
- annotation=
- Subscript(
- ctx=
- Load(
- ) # /Load
- slice=
- Index(
- value=
- Subscript(
- ctx=
- Load(
- ) # /Load
- slice=
- Index(
- value=
- Tuple(
- ctx=
- Load(
- ) # /Load
- elts=
- Attribute(
- attr=
- 'ndarray', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'np', # str
- ) # /Name
- ) # /Attribute
- Attribute(
- attr=
- 'spmatrix', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'sparse', # str
- ) # /Name
- ) # /Attribute
- ) # /Tuple
- ) # /Index
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'Union', # str
- ) # /Name
- ) # /Subscript
- ) # /Index
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'Optional', # str
- ) # /Name
- ) # /Subscript
- arg=
- 'vals', # str
- type_comment=
- None, # NoneType
- ) # /arg
- arg(
- annotation=
- Subscript(
- ctx=
- Load(
- ) # /Load
- slice=
- Index(
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'str', # str
- ) # /Name
- ) # /Index
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'Optional', # str
- ) # /Name
- ) # /Subscript
- arg=
- 'use_graph', # str
- type_comment=
- None, # NoneType
- ) # /arg
- arg(
- annotation=
- Subscript(
- ctx=
- Load(
- ) # /Load
- slice=
- Index(
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'str', # str
- ) # /Name
- ) # /Index
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'Optional', # str
- ) # /Name
- ) # /Subscript
- arg=
- 'layer', # str
- type_comment=
- None, # NoneType
- ) # /arg
- arg(
- annotation=
- Subscript(
- ctx=
- Load(
- ) # /Load
- slice=
- Index(
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'str', # str
- ) # /Name
- ) # /Index
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'Optional', # str
- ) # /Name
- ) # /Subscript
- arg=
- 'obsm', # str
- type_comment=
- None, # NoneType
- ) # /arg
- arg(
- annotation=
- Subscript(
- ctx=
- Load(
- ) # /Load
- slice=
- Index(
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'str', # str
- ) # /Name
- ) # /Index
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'Optional', # str
- ) # /Name
- ) # /Subscript
- arg=
- 'obsp', # str
- type_comment=
- None, # NoneType
- ) # /arg
- arg(
- annotation=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'bool', # str
- ) # /Name
- arg=
- 'use_raw', # str
- type_comment=
- None, # NoneType
- ) # /arg
- vararg=
- None, # NoneType
- ) # /arguments
- body=
- Expr(
- value=
- Constant(
- value=
- " Calculate `Geary's C` <https://en.wikipedia.org/wiki/Geary's_C>`_, as used\n by `VISION <https://doi.org/10.1038/s41467-019-12235-0>`_.\n\n Geary's C is a measure of autocorrelation for some measure on a graph. This\n can be to whether measures are correlated between neighboring cells. Lower\n values indicate greater correlation.\n\n ..math\n\n C =\n \x0crac{\n (N - 1)\\sum_{i,j} w_{i,j} (x_i - x_j)^2\n }{\n 2W \\sum_i (x_i - \x08ar{x})^2\n }\n\n Params\n ------\n adata\n vals\n Values to calculate Geary's C for. If this is two dimensional, should\n be of shape `(n_features, n_cells)`. Otherwise should be of shape\n `(n_cells,)`. This matrix can be selected from elements of the anndata\n object by using key word arguments: `layer`, `obsm`, `obsp`, or\n `use_raw`.\n use_graph\n Key to use for graph in anndata object. If not provided, default\n neighbors connectivities will be used instead.\n layer\n Key for `adata.layers` to choose `vals`.\n obsm\n Key for `adata.obsm` to choose `vals`.\n obsp\n Key for `adata.obsp` to choose `vals`.\n use_raw\n Whether to use `adata.raw.X` for `vals`.\n\n Returns\n -------\n If vals is two dimensional, returns a 1 dimensional ndarray array. Returns\n a scalar if `vals` is 1d.\n ", # str
- ) # /Constant
- ) # /Expr
- If(
- body=
- If(
- body=
- Assign(
- targets=
- Name(
- ctx=
- Store(
- ) # /Store
- id=
- 'g', # str
- ) # /Name
- type_comment=
- None, # NoneType
- value=
- Subscript(
- ctx=
- Load(
- ) # /Load
- slice=
- Index(
- value=
- Constant(
- value=
- 'connectivities', # str
- ) # /Constant
- ) # /Index
- value=
- Attribute(
- attr=
- 'obsp', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'adata', # str
- ) # /Name
- ) # /Attribute
- ) # /Subscript
- ) # /Assign
- orelse=
- If(
- body=
- Assign(
- targets=
- Name(
- ctx=
- Store(
- ) # /Store
- id=
- 'g', # str
- ) # /Name
- type_comment=
- None, # NoneType
- value=
- Subscript(
- ctx=
- Load(
- ) # /Load
- slice=
- Index(
- value=
- Constant(
- value=
- 'connectivities', # str
- ) # /Constant
- ) # /Index
- value=
- Subscript(
- ctx=
- Load(
- ) # /Load
- slice=
- Index(
- value=
- Constant(
- value=
- 'neighbors', # str
- ) # /Constant
- ) # /Index
- value=
- Attribute(
- attr=
- 'uns', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'adata', # str
- ) # /Name
- ) # /Attribute
- ) # /Subscript
- ) # /Subscript
- ) # /Assign
- orelse=
- Raise(
- cause=
- None, # NoneType
- exc=
- Call(
- args=
- Constant(
- value=
- 'Must run neighbors first.', # str
- ) # /Constant
- func=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'ValueError', # str
- ) # /Name
- keywords=
- ) # /Call
- ) # /Raise
- test=
- Compare(
- comparators=
- Attribute(
- attr=
- 'uns', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'adata', # str
- ) # /Name
- ) # /Attribute
- left=
- Constant(
- value=
- 'neighbors', # str
- ) # /Constant
- ops=
- In(
- ) # /In
- ) # /Compare
- ) # /If
- test=
- BoolOp(
- op=
- And(
- ) # /And
- values=
- Call(
- args=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'adata', # str
- ) # /Name
- Constant(
- value=
- 'obsp', # str
- ) # /Constant
- func=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'hasattr', # str
- ) # /Name
- keywords=
- ) # /Call
- Compare(
- comparators=
- Attribute(
- attr=
- 'obsp', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'adata', # str
- ) # /Name
- ) # /Attribute
- left=
- Constant(
- value=
- 'connectivities', # str
- ) # /Constant
- ops=
- In(
- ) # /In
- ) # /Compare
- ) # /BoolOp
- ) # /If
- orelse=
- Raise(
- cause=
- None, # NoneType
- exc=
- Call(
- args=
- func=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'NotImplementedError', # str
- ) # /Name
- keywords=
- ) # /Call
- ) # /Raise
- test=
- Compare(
- comparators=
- Constant(
- value=
- None, # NoneType
- ) # /Constant
- left=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'use_graph', # str
- ) # /Name
- ops=
- Is(
- ) # /Is
- ) # /Compare
- ) # /If
- If(
- body=
- Assign(
- targets=
- Name(
- ctx=
- Store(
- ) # /Store
- id=
- 'vals', # str
- ) # /Name
- type_comment=
- None, # NoneType
- value=
- Attribute(
- attr=
- 'T', # str
- ctx=
- Load(
- ) # /Load
- value=
- Call(
- args=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'adata', # str
- ) # /Name
- func=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- '_choose_obs_rep', # str
- ) # /Name
- keywords=
- keyword(
- arg=
- 'use_raw', # str
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'use_raw', # str
- ) # /Name
- ) # /keyword
- keyword(
- arg=
- 'layer', # str
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'layer', # str
- ) # /Name
- ) # /keyword
- keyword(
- arg=
- 'obsm', # str
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'obsm', # str
- ) # /Name
- ) # /keyword
- keyword(
- arg=
- 'obsp', # str
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'obsp', # str
- ) # /Name
- ) # /keyword
- ) # /Call
- ) # /Attribute
- ) # /Assign
- orelse=
- test=
- Compare(
- comparators=
- Constant(
- value=
- None, # NoneType
- ) # /Constant
- left=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'vals', # str
- ) # /Name
- ops=
- Is(
- ) # /Is
- ) # /Compare
- ) # /If
- Return(
- value=
- Call(
- args=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'g', # str
- ) # /Name
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'vals', # str
- ) # /Name
- func=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'gearys_c', # str
- ) # /Name
- keywords=
- ) # /Call
- ) # /Return
- decorator_list=
- Call(
- args=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'AnnData', # str
- ) # /Name
- func=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'dispatch', # str
- ) # /Name
- keywords=
- ) # /Call
- name=
- 'gearys_c', # str
- returns=
- Subscript(
- ctx=
- Load(
- ) # /Load
- slice=
- Index(
- value=
- Tuple(
- ctx=
- Load(
- ) # /Load
- elts=
- Attribute(
- attr=
- 'ndarray', # str
- ctx=
- Load(
- ) # /Load
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'np', # str
- ) # /Name
- ) # /Attribute
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'float', # str
- ) # /Name
- ) # /Tuple
- ) # /Index
- value=
- Name(
- ctx=
- Load(
- ) # /Load
- id=
- 'Union', # str
- ) # /Name
- ) # /Subscript
- type_comment=
- None, # NoneType
- ) # /FunctionDef
type_ignores=
) # /Module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment