BF: Bug was caused by code in test. Basically when checking if directions are sampled by multiples of 2*pi / num, I was including the comparison between the first perpendicular vector with itself. In a world with perfect percision, this would not be a problem since np.dot(d, d)=1 and np.arccos(1)=0. However, the percision of np.dot can result in values slightly larger than 1, like 1.000000000000002. In this cases, np.arccos will give NaN. To solve thisissue I remove the comparison between the selected ref perpendicular direction with itself.
BF: Bug was caused by code in test. Basically when checking if directions are sampled by multiples of 2*pi / num, I was including the comparison between the first perpendicular vector with itself. In a world with perfect percision, this would not be a problem since np.dot(d, d)=1 and np.arccos(1)=0. However, the percision of np.dot can result in values slightly larger than 1, like 1.000000000000002. In this cases, np.arccos will give NaN. To solve thisissue I remove the comparison between the selected ref perpendicular direction with itself.

nilgoyyou/dipy,jyeatman/dipy,FrancoisRheaultUS/dipy,demianw/dipy,villalonreina/dipy,demianw/dipy,matthieudumont/dipy,matthieudumont/dipy,villalonreina/dipy,sinkpoint/dipy,JohnGriffiths/dipy,jyeatman/dipy,FrancoisRheaultUS/dipy,nilgoyyou/dipy,oesteban/dipy,sinkpoint/dipy,oesteban/dipy,JohnGriffiths/dipy,StongeEtienne/dipy,StongeEtienne/dipy