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],
])
res = np.zeros((5,5), np.long)
cooccurence(f, res, 0)
assert res[0,0] == 1
assert res[0,1] == 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))
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: Calamari-OCR/calamari
Commit Name: 8d0d0c7a6db3904f0222cbe058388a92cf21a548
Time: 2021-02-06
Author: ChWick@users.noreply.github.com
File Name: calamari_ocr/ocr/dataset/imageprocessors/center_normalizer.py
Class Name: CenterNormalizer
Method Name: dewarp
Project Name: vitchyr/rlkit
Commit Name: 9bdbb11cf27060e7847a87dcdf691dd6b96ce6df
Time: 2020-08-09
Author: 38036768+YangRui2015@users.noreply.github.com
File Name: rlkit/data_management/obs_dict_replay_buffer.py
Class Name: ObsDictRelabelingBuffer
Method Name: random_batch