d4bed651658b585e78581ea8dd3abd4966a2e91d,dipy/direction/tests/test_peaks.py,,test_peaksFromModel,#,449
Before Change
assert_array_equal(pam.peak_indices[mask, 1:], -1)
// Test serialization and deserialization:
b = BytesIO()
pickle.dump(pam, b)
b.seek(0)
new_pam = pickle.load(b)
b.close()
for attr in ["peak_dirs", "peak_values", "peak_indices", "gfa", "qa",
"shm_coeff", "B", "odf"]:
After Change
// Test serialization and deserialization:
for normalize_peaks in [True, False]:
for return_odf in [True, False]:
for return_sh in [True, False]:
pam = peaks_from_model(model, data, _sphere, .5, 45,
normalize_peaks=normalize_peaks,
return_odf=return_odf,
return_sh=return_sh)
b = BytesIO()
pickle.dump(pam, b)
b.seek(0)
new_pam = pickle.load(b)
b.close()
for attr in ["peak_dirs", "peak_values", "peak_indices",
"gfa", "qa", "shm_coeff", "B", "odf"]:
assert_array_equal(getattr(pam, attr),
getattr(new_pam, attr))
assert_array_equal(pam.sphere.vertices,
new_pam.sphere.vertices)
def test_peaksFromModelParallel():
SNR = 100
S0 = 100
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances Project Name: nipy/dipy
Commit Name: d4bed651658b585e78581ea8dd3abd4966a2e91d
Time: 2017-03-20
Author: arokem@gmail.com
File Name: dipy/direction/tests/test_peaks.py
Class Name:
Method Name: test_peaksFromModel
Project Name: pytorch/pytorch
Commit Name: 0c60922fb0614132433779ad45ab8f30783db2ae
Time: 2021-02-03
Author: haichuan@fb.com
File Name: test/quantization/test_workflow_module.py
Class Name: TestFakeQuantize
Method Name: fake_quant_scriptable
Project Name: pytorch/pytorch
Commit Name: 0c60922fb0614132433779ad45ab8f30783db2ae
Time: 2021-02-03
Author: haichuan@fb.com
File Name: test/quantization/test_workflow_module.py
Class Name: TestFakeQuantize
Method Name: test_fq_serializable_per_tensor