mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-17 13:58:00 +08:00
Apply yapf to python files
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
import flatbuffers
|
||||
|
||||
|
||||
class Int32Array(object):
|
||||
__slots__ = ['_tab']
|
||||
|
||||
@@ -23,14 +24,17 @@ class Int32Array(object):
|
||||
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
|
||||
if o != 0:
|
||||
a = self._tab.Vector(o)
|
||||
return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4))
|
||||
return self._tab.Get(
|
||||
flatbuffers.number_types.Int32Flags,
|
||||
a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4))
|
||||
return 0
|
||||
|
||||
# Int32Array
|
||||
def DataAsNumpy(self):
|
||||
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
|
||||
if o != 0:
|
||||
return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o)
|
||||
return self._tab.GetVectorAsNumpy(
|
||||
flatbuffers.number_types.Int32Flags, o)
|
||||
return 0
|
||||
|
||||
# Int32Array
|
||||
@@ -40,7 +44,19 @@ class Int32Array(object):
|
||||
return self._tab.VectorLen(o)
|
||||
return 0
|
||||
|
||||
def Int32ArrayStart(builder): builder.StartObject(1)
|
||||
def Int32ArrayAddData(builder, data): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(data), 0)
|
||||
def Int32ArrayStartDataVector(builder, numElems): return builder.StartVector(4, numElems, 4)
|
||||
def Int32ArrayEnd(builder): return builder.EndObject()
|
||||
|
||||
def Int32ArrayStart(builder):
|
||||
builder.StartObject(1)
|
||||
|
||||
|
||||
def Int32ArrayAddData(builder, data):
|
||||
builder.PrependUOffsetTRelativeSlot(
|
||||
0, flatbuffers.number_types.UOffsetTFlags.py_type(data), 0)
|
||||
|
||||
|
||||
def Int32ArrayStartDataVector(builder, numElems):
|
||||
return builder.StartVector(4, numElems, 4)
|
||||
|
||||
|
||||
def Int32ArrayEnd(builder):
|
||||
return builder.EndObject()
|
||||
|
||||
Reference in New Issue
Block a user