(self, include_metas=True)
return cs
Return a checksum over X, Y, metas and W.
Return a checksum over X, Y, metas and W.
Return a checksum over X Y metas and W .
def checksum(self, include_metas=True):
        # TODO: zlib.adler32 does not work for numpy arrays with dtype object
        # (after pickling and unpickling such arrays, checksum changes)
        # Why, and should we fix it or remove it?
        """Return a checksum over X, Y, metas and W."""
        cs = zlib.adler32(np.ascontiguousarray(self._X))
        cs = zlib.adler32(np.ascontiguousarray(self._Y), cs)
        if include_metas:
            cs = zlib.adler32(np.ascontiguousarray(self._metas), cs)
        cs = zlib.adler32(np.ascontiguousarray(self._W), cs)
        return cs
def checksum ( self , include_metas = True ) : # TODO: zlib.adler32 does not work for numpy arrays with dtype object # (after pickling and unpickling such arrays, checksum changes) # Why, and should we fix it or remove it? cs = zlib . adler32 ( np . ascontiguousarray ( self . _X ) ) cs = zlib . adler32 ( np . ascontiguousarray ( self . _Y ) , cs ) if include_metas : cs = zlib . adler32 ( np . ascontiguousarray ( self . _metas ) , cs ) cs = zlib . adler32 ( np . ascontiguousarray ( self . _W ) , cs ) return cs