MCPcopy Create free account
hub / github.com/CyberPoint/libpgm / copy

Method copy

libpgm/tablecpdfactor.py:256–263  ·  view source on GitHub ↗

Return a copy of the factor.

(self)

Source from the content-addressed store, hash-verified

254 del(self.stride[vertex])
255
256 def copy(self):
257 '''Return a copy of the factor.'''
258 copy = TableCPDFactor(self.inputvertex, self.inputbn)
259 copy.vals = self.vals[:]
260 copy.stride = self.stride.copy()
261 copy.scope = self.scope[:]
262 copy.card = self.card[:]
263 return copy
264
265
266

Callers 2

nextMethod · 0.80
test_copyMethod · 0.80

Calls 1

TableCPDFactorClass · 0.85

Tested by 1

test_copyMethod · 0.64