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

Before Change


        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: 6

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: ray-project/ray
Commit Name: ef498e8aa5cdfe09247d9c9efc7ef636378165c2
Time: 2020-05-15
Author: ed.nmi.oakes@gmail.com
File Name: python/ray/serve/policy.py
Class Name: PowerOfTwoPolicy
Method Name: flush


Project Name: sobhe/hazm
Commit Name: 44d3cc8e594304051b8fd20b9723a0c978068fe7
Time: 2013-12-26
Author: alireza.nournia@gmail.com
File Name: hazm/DependencyParser.py
Class Name: DependencyParser
Method Name: tagged_batch_parse


Project Name: mozilla/bugbug
Commit Name: 0b77df59635715ac4538e35ed2257f1d3dba8d83
Time: 2020-03-11
Author: babadie@mozilla.com
File Name: http_service/tests/conftest.py
Class Name:
Method Name: mock_repo


Project Name: tensorflow/datasets
Commit Name: 33dc406485d7e7bd829ebac07085f4c262e74280
Time: 2020-12-07
Author: epot@google.com
File Name: tensorflow_datasets/core/hashing.py
Class Name:
Method Name: _to_bytes


Project Name: asyml/texar
Commit Name: 80e9e26deca028ef6b1b51c307b61bb305dc9b1c
Time: 2017-09-04
Author: zhitinghu@gmail.com
File Name: txtgen/data/embedding_test.py
Class Name: EmbeddingTest
Method Name: test_load_glove