Skip to content

Solution for pool.dists =[] #21

@JinfengM

Description

@JinfengM

When the code "eps.eps = np.percentile(pool.dists, alpha, axis=0) " raised a exception, this might because pool.dists is null.
My solution is adding the following code:
res = self.mapFunc(wrapper, range(self.N))

    res_thetas=copy.deepcopy(res)
    res_dists=copy.deepcopy(res)
    res_cnts=copy.deepcopy(res)
    
    #res = self.mapFunc(wrapper, range(self.N))
    
    thetas = np.array([theta for (theta, _, _) in res_thetas])
    print('thetas is : {0}'.format(thetas))

    dists = np.array([dist for (_, dist, _) in res_dists])
    print('dists is : {0}'.format(dists))

    cnts = np.sum([cnt for (_, _, cnt) in res_cnts])
    print('cnts is : {0}'.format(cnts))
    ws = np.ones(self.N) / self.N

the same for "res = self.mapFunc(particleProposal, range(self.N))"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions