cd8ee58da1f0d8ab1fdb6abd8b7a19759878604a,dscribe/descriptors/sinematrix.py,SineMatrix,create,#SineMatrix#Any#Any#Any#,47
Before Change
inp = [(i_sys,) for i_sys in system]
// Here we precalculate the size for each job to preallocate memory.
if self._flatten:
n_samples = len(system)
k, m = divmod(n_samples, n_jobs)
jobs = (inp[i * k + min(i, m):(i + 1) * k + min(i + 1, m)] for i in range(n_jobs))
output_sizes = [len(job) for job in jobs]
else:
output_sizes = None
// Create in parallel
output = self.create_parallel(inp, self.create_single, n_jobs, output_sizes, verbose=verbose)
return output
After Change
inp = [(i_sys,) for i_sys in system]
// Determine if the outputs have a fixed size
n_features = self.get_number_of_features()
if self._flatten:
static_size = [n_features]
elif self.permutation == "eigenspectrum":
static_size = [self.n_atoms_max]
else:
static_size = [self.n_atoms_max, self.n_atoms_max]
// Create in parallel
output = self.create_parallel(inp, self.create_single, n_jobs, static_size, verbose=verbose)
return output
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 36
Instances
Project Name: SINGROUP/dscribe
Commit Name: cd8ee58da1f0d8ab1fdb6abd8b7a19759878604a
Time: 2021-02-05
Author: lauri.himanen@gmail.com
File Name: dscribe/descriptors/sinematrix.py
Class Name: SineMatrix
Method Name: create
Project Name: SINGROUP/dscribe
Commit Name: cd8ee58da1f0d8ab1fdb6abd8b7a19759878604a
Time: 2021-02-05
Author: lauri.himanen@gmail.com
File Name: dscribe/descriptors/sinematrix.py
Class Name: SineMatrix
Method Name: create
Project Name: SINGROUP/dscribe
Commit Name: 24c799a9ad0f0e4ebfdaafeeee3c20c119059498
Time: 2021-02-05
Author: lauri.himanen@gmail.com
File Name: dscribe/descriptors/coulombmatrix.py
Class Name: CoulombMatrix
Method Name: create
Project Name: SINGROUP/dscribe
Commit Name: 7f67c4ba6e955bef7d5645b8317a493281881b3d
Time: 2021-02-05
Author: lauri.himanen@gmail.com
File Name: dscribe/descriptors/ewaldsummatrix.py
Class Name: EwaldSumMatrix
Method Name: create