93663c2cc8c0c8bc3c6f28c27679707305948c80,tests/test_texture.py,,test_cooccurence,#,4

Before Change


def test_cooccurence():
    cooccurence = mahotas._texture.cooccurence
    f = np.array([
          [0,1,1,1],
          [0,0,1,1],
          [2,2,2,2],
        ])

After Change



def test_cooccurence():
    np.random.seed(222)
    f = np.random.rand(32, 32)
    f = (f * 255).astype(np.int32)

    assert np.all(mahotas.texture.cooccurence(f, 0) == brute_force(f, 0, 1))
    assert np.all(mahotas.texture.cooccurence(f, 1) == brute_force(f, 1, 1))
    assert np.all(mahotas.texture.cooccurence(f, 2) == brute_force(f, 1, 0))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: luispedro/mahotas
Commit Name: 93663c2cc8c0c8bc3c6f28c27679707305948c80
Time: 2010-05-11
Author: lpc@cmu.edu
File Name: tests/test_texture.py
Class Name:
Method Name: test_cooccurence


Project Name: nipy/dipy
Commit Name: d5be66f320d8e09165ad1f9b44ca5ab2c9586ad2
Time: 2019-11-30
Author: garyfallidis@gmail.com
File Name: dipy/workflows/tests/test_viz.py
Class Name:
Method Name: test_horizon_flow


Project Name: pytorch/tutorials
Commit Name: c47c4d90d3e48e33a762ad6cd18e0d9c0c2389c8
Time: 2018-12-07
Author: yf225@cornell.edu
File Name: beginner_source/hybrid_frontend/learning_hybrid_frontend_through_example_tutorial.py
Class Name:
Method Name: