93663c2cc8c0c8bc3c6f28c27679707305948c80,tests/test_texture.py,,test_cooccurence,#,4
Before Change
cooccurence(f, res, 1)
assert res[0,0] == 1
assert res[0,1] == 0
assert res[0,2] == 2
assert res[1,0] == 0
assert res[1,1] == 2
assert res[1,2] == 1
res[:3,:3] = 0
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))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
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: 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: openai/gym
Commit Name: d1146303b070a463e9e81086a0aeff7a2c909311
Time: 2018-08-14
Author: omgtech@gmail.com
File Name: gym/envs/box2d/lunar_lander.py
Class Name: LunarLander
Method Name: step
Project Name: open-mmlab/mmdetection
Commit Name: 347618a5fbaa70fb9d2124d033275f44fdfcca2f
Time: 2020-05-19
Author: maxim@bonnaerens.be
File Name: tests/test_nms.py
Class Name:
Method Name: test_nms_device_and_dtypes_cpu