MCPcopy Create free account
hub / github.com/DeepGraphLearning/graphvite / __array_wrap__

Method __array_wrap__

python/graphvite/util.py:115–123  ·  view source on GitHub ↗
(self, arr, context=None)

Source from the content-addressed store, hash-verified

113 return self.__class__.from_memmap, (self.filename, self.dtype, self.mode, self.offset, self.shape, order)
114
115 def __array_wrap__(self, arr, context=None):
116 arr = super(np.memmap, self).__array_wrap__(arr, context)
117
118 if self is arr or type(self) is not SharedNDArray:
119 return arr
120 if arr.shape == ():
121 return arr[()]
122
123 return arr.view(np.ndarray)
124
125
126class Monitor(object):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected