ff07957b91c3d78b0e0cfa0f92715e916d2179fb,pyemma/util/numeric.py,,_hash_numpy_array,#Any#,38

Before Change


    x = np.ascontiguousarray(x)
    import hashlib
    old = x.flags.writeable
    try:
        x.flags.writeable = False
        v = hashlib.sha1(x)
    finally:
        x.flags.writeable = old
    hash_value = hash((x.shape, x.strides, v.digest()))

    return hash_value

After Change


         v.update(x.indices)
    else:
         v.update(str(x.shape).encode("ascii"))
         v.update(str(x.strides).encode("ascii"))// if x.strides is not None else ""))
         //v.update(str(x.strides).encode("ascii"))
    return hash(v.digest())
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: markovmodel/PyEMMA
Commit Name: ff07957b91c3d78b0e0cfa0f92715e916d2179fb
Time: 2019-05-22
Author: m.scherer@fu-berlin.de
File Name: pyemma/util/numeric.py
Class Name:
Method Name: _hash_numpy_array


Project Name: invesalius/invesalius3
Commit Name: f95ee382033e9f87e7452877aba92ddcd57154c1
Time: 2018-10-29
Author: 36769547+otaviocarlos@users.noreply.github.com
File Name: invesalius/data/trackers.py
Class Name:
Method Name: PlhSerialConnection


Project Name: CyberReboot/poseidon
Commit Name: efbd1a705b5d05531abe1e20362fb2f6710c5b5a
Time: 2016-07-28
Author: tlanham@cs.stanford.edu
File Name: poseidon/poseidonMonitor/NodeHistory/NodeHistory.py
Class Name: Handle_Default
Method Name: on_get