Skip to content

Result ordering after using pmap to parallel #1608

Answered by hainm
xywang181 asked this question in Q&A
Discussion options

You must be logged in to vote

Dear @xywang181: Can you please try:

angle_ = pt.angle(traj, ':3 :4 :5')
distance_ = pt.distance(traj, '@10 @20')
data = pt.pmap(['angle :3 :4 :5', 'distance @10 @20'], traj, n_cores=2)
assert isinstance(data, OrderedDict), 'must be OrderDict'
arr = pt.tools.dict_to_ndarray(data)
aa_eq(angle_, arr[0])
aa_eq(distance_, arr[1])

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@hainm
Comment options

@xywang181
Comment options

@hainm
Comment options

Answer selected by hainm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants